Community: Framework mailing list archives

Re: Problem with inheriting standard field with type changing

Numa Extreme Systems, Gustavo Marino
- 12/11/2014 09:36:42
It's look like a serious bug of the ORM.

Database structure update should be delayed till all modules are loaded. No workaround. For sure there are many other user cases where the intermediate update could be mortal.

Odoo SA should should provide an statement

Gustavo Adrian Marino


Mobile:  +54 911 5498 2515


Skype: gustavo.adrian.marino


<img border="0" width="213" height="94" src="cid:image001.jpg@01CC37F5.99B4CD20" alt="Descripción: Numa Logo V 1-0">

2014-12-11 8:27 GMT-03:00 Denis Karataev <>:
Hi dear developers,

When we download and install new version of sources for v7 with new bugfixes, we have a problem with iherited fields.

For example we inherit the field "function" in res.partner model and we change type of the field from char to many2one to keep our records unique. I mean now we have model res.partner.function with unique values and users just select values from the dropdown list on the partner form. Ok good, it works, but when we install new sources and run database with "-u all", all values for the field become empty! I think it's because:

1)base module is updated first and in this module the field "function" has char type. OpenERP looks into database and there is another type of the field, and OpenERP changes the type to char.
2)our module is updated next and inherit the field "function" again and changes type to many2one.

It's my thoughts why we get this field empty after every update. Please could you give any recommendation how to avoid it, but to have "function" with many2one, not char?

Thank you!

Denis Karataev
CEO at Transparent Technologies

Post to: