Reputation: 1052
i am using odoo 10. Here i want to add an extra state in purchase module.Current states are open,draft and done. I want to add another state named new. How can i achieve this?
Upvotes: 1
Views: 1141
Reputation: 21
state = fields.Selection(selection_add=[('remove','Removed'),('payment','PAYMENT'),('approved','APPROVED')])
in xml.
<xpath expr="//field[@name='state']" position="replace">
<field name="state" widget="statusbar"/>
Upvotes: 0
Reputation: 4174
Use selection_add
attribute.
Try below code:
state = fields.Selecion(selection_add=[('new_state','New State')])
Hope this will help you.
Upvotes: 5