Ir al contenido
Menú
Se marcó esta pregunta

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
Descartar
Autor

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.

Publicaciones relacionadas Respuestas Vistas Actividad
3
mar 21
7707
1
abr 18
10788
0
jul 17
3812
4
feb 25
2713
1
ago 24
2238