Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
The Question has been closedby
Hello everyone, does anyone know if you inherit a model and inherit all the fields with it, can you add more selections to a selection field in the inherited model. For example, if I have a new module that inherits the res.partner table and I want to add more selections to the "type" field, then can I add those new selections in the new module without having to add them to the original module? I know you can create new fields to the inherited model, but I'm not sure you can modify the original fields by giving them more options to choose from like the selection fields. Thank you everyone
Yes Eric you can do so. But for that you have to include original values with you new values.
Ex: Original value is
'state': fields.selection([('draft', 'New')])
Now I want to add some more values by inherit the object and override the field like this:
'state': fields.selection([('draft', 'New'), ('in_progress', ' In Progress')])
Hope this will help you.
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 2/27/14, 2:41 PM|
|Seen: 2115 times|
|Last updated: 9/19/15, 6:34 AM|