Contributors mailing list archives

Browse archives


Re: updating module no recreate removed `noupdate="True"` data

Pierre Verkest
- 29/03/2021 11:21:50
hum... in fact this would required to overwrite BaseModel, Is there a nice way in v14.0 to change such class from a module ?

I'm not very confident if I overwrite a BaseModel method because if such module is present in the python path it will take place event if the module is not install I suppose.
And I'm not sure how to properly monkey patch BaseModel at run time :thinking:

Le lun. 29 mars 2021 à 11:04, Pierre Verkest <> a écrit :
Hi there,

I'm wondering if there is any good reason for this default behavior from odoo that if I (as a user) remove a record created by a module using `noupdate="True"` this records is re-created by the ORM at the next update ?

Is there some module that changes that behaviour to let the record unlink while there is ir_model_data record without its related record ?

I'm on the way to suggest ir_model_norecreate module in server-bakend repo to change that behaviour.

I would be happy to hear from you, I think it could be a nice feature for next odoo version and maybe with a new tag `norecreate=True`, any thoughts ?

Pierre Verkest
06 81 12 25 20
Github: petrus-v - Twitter: petrusv84 - Linkedin: pierre-verkest