Search code examples
odooodoo-10odoo-view

How to inherit and add new state on a default module in odoo?


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?


Solution

  • Use selection_add attribute.

    Try below code:

    state = fields.Selecion(selection_add=[('new_state','New State')])
    

    Hope this will help you.