Please sign in to comment.
[FIX] base: proper removal of xmlid after update
This commit fixes several bugs: 1. if a module A does the following class Foo(models.Model): _inherit = 'res.partner' def copy(self, default=None): ... a new ir.model.data 'A.model_res_partner' is created If the override is removed (code change, migration,...), after an update of the module A the ir.model.data A.model_res_partner should be removed (but not the model res.partner obviously, cf 91882dd) This was not the case as A.model_res_partner had noupdate='NULL' instead of 'false' (not specified in the query). Bug introduced at 004a0b9 Changing to '!= true' to match only the one explicitly in noupdate 2. properly populate the self.pool.loaded_xmlids All module external ids _must_ be present in loaded_xmlids otherwise will be removed after a module update. ir.model: The entries created through _reflect_model were not loaded in self.loaded_xmlids if the != true clause was merged alone, all the models defined in a module would be tested for removal, even if the code is still present cf opw-1962321 ir.model.category: The categories were generated when the db was initalised, doing SQL was not avoidable. Create the categories in noupdate to avoid it being deleted. ir.property: Are always created in noupdate in data files but in stock_account it was manually created without being in noupdate Co-authored-by: Raphael Collet <firstname.lastname@example.org>
- Loading branch information...
Showing with 7 additions and 13 deletions.