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
|Asked: 2/27/14, 2:41 PM|
|Seen: 1784 times|
|Last updated: 9/19/15, 6:34 AM|