2011-01-07 07:48:48 |
Fabien (Open ERP) |
description |
When updating several modules (launching the server with -u all), at the end of the process it removes old records (records that have an XML ID but those XML ID are not referenced by the data/demo files of the module). It's working efficiently for all the modules but not for the 'base' module. This makes the migration of the base module very difficult.
Technically speaking:
* The problem is in addons/__init__.py
* The module base is installed before others with skip_cleanup=True
* then all others modules are installed with skip_cleanup=False
* skip cleanup calls _process_end on the obejct ir.model.data, which uses self.loads that includes all IDS parsed from data files and compare this with IDS in ir.model.data for the selected module.
You can not set skip_cleanup=False for base. (because some modules references records with base.group_hr_manager). We can not cleanup base moduel alone. So, the _process_end must be called only once, for all the modules at the end of the whole process. (with all modules, including base) |
When updating several modules (launching the server with -u all), at the end of the process it removes old records (records that have an XML ID but those XML ID are not referenced by the data/demo files of the module). It's working efficiently for all the modules but not for the 'base' module. This makes the migration of the base module very difficult.
Technically speaking:
* The problem is in addons/__init__.py
* The module base is installed before others with skip_cleanup=True
* then all others modules are installed with skip_cleanup=False
* skip cleanup calls _process_end on the obejct ir.model.data, which uses self.loads that includes all IDS parsed from data files and compare this with IDS in ir.model.data for the selected module.
You can not set skip_cleanup=False for base. (because some modules references records with base.group_hr_manager). We can not cleanup base moduel alone. So, the _process_end must be called only once, for all the modules at the end of the whole process. (with all modules, including base)
How to replicate:
- remove a record in a XML file of the data of the base module (like the Customers menu)
- update all modules
- check that the menu disappeared (currently it does not disappears)
- reput the record in the XML file
- update all modules
- check that the menu appears again |
|