8f88570ca18061716fd6e246b9d16aa2cbc24f3a
Context: After a module update, the records present in ir_model_data table but not in self.pool.loaded_xmlids are considered as no longer needed and should be removed. An exception is done with noupdate=true entries. Bug 1: Entries with noupdate=NULL are not considered in the evaluation and are ignored while it may be worth deleting. Bug 2: Some records with their external id being automatically created are not present in self.pool.loaded_xmlids and may get removed after updating a module. By a lucky coincidence, bug 1 make it so that records targeted by bug 2 are ignored and not deleted (the "automagically" created ir.model.data often lack a noupdate value). Fix Bug 1: Use a COALESCE to find both records with noupdate=NULL and noupdate=false Fix Bug 2: Depends on the source of the generated external id: - ir.model: The entries created through _reflect_model were not loaded in self.loaded_xmlids Use the proper ORM method _update_xmlids that correctly populates self.pool.loaded_xmlids - 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 considered for removal. - ir.property: Are always created in noupdate in data files but in stock_account it was manually created without being in noupdate closes odoo/odoo#32881 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com> Co-authored-by: Raphael Collet <rco@odoo.com>
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
Then follow the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%