This question has been flagged

We run multiple Odoo instances and have written management software for them which uses the Odoo RPC API. When we deploy a new version of one of our modules, our software copies the files to each of the servers and upgrades the module by logging in and 'clicking' the module upgrade button via RPC.

This works great unless we add a field to a core model, such as res.partner, via 'Extension' inheritance. In that case, because the code is executed before the module is upgraded, the SELECT on the database includes the new field name and Odoo crashes.

Googling around shows plenty of people who have run into this issue and the advice is always to perform the module upgrade from the command line.

I am seeking an approach that will allow us to modify existing core modules as described above, but perform the module upgrade via RPC (and the UI).

Thanks in advance

Avatar
Discard
Author

I guess a partial solution to this problem would be to use Delegation inheritance. However, this would prevent overloading of existing methods (e.g. create, write etc), and make all the other plumbing surrounding the new field (e.g. extending the view to inclue it) much messier.