Friday, November 27, 2015
1 change · master
Enhancements to existing features
This update improves how Odoo prepares and updates its internal data models during module installation or schema changes. It reduces the risk of missed setup steps, especially for automatically calculated stored fields, making upgrades and maintenance more reliable.
Original PR description
- Change name and signature of function `init_module_models(cr, module, models)` to a slightly more general `init_models(models, cr, context)`. - Change its implementation to use the new API; this enables to define methods `_auto_init()`, `init()` and `_auto_end` in the new API. - Avoid bugs by letting `_auto_init` pass its todo-list by the context. - Make `ir.model` and `ir.model.fields` use the function `init_models()` to update a model's schema; this guarantees the initialization of stored computed fields, etc.