diff options
| author | Raphael Collet <rco@openerp.com> | 2015-01-14 17:17:47 +0100 |
|---|---|---|
| committer | Raphael Collet <rco@openerp.com> | 2015-01-21 11:26:23 +0100 |
| commit | 5fee95ca6366954839e6db0cec5cf1b9b06c023d (patch) | |
| tree | 291c791f658d10059a2728cc0bda5ed3be05ca22 /addons/analytic_user_function/analytic_user_function_view.xml | |
| parent | 2f06adde9c46be73d2fbf13a9cfd6b333117e395 (diff) | |
[FIX] models, fields: reorganize model setup to retrieve all inherited fields
The model setup sometimes misses entries in _inherit_fields and _all_columns.
This is because those dictionaries are computed from parent models which are
not guaranteed to be completely set up: sometimes a parent field is only
partially set up, and columns are missing (they are generated from fields after
their setup).
To avoid this bug, the setup has been split in three phases:
(1) determine all inherited and custom fields on models;
(2) setup fields, except for recomputation triggers, and generate columns;
(3) add recomputation triggers and complete the setup of the model.
Making these three phases explicit brings good invariants:
- when setting up a field, all models know all their fields;
- when adding recomputation triggers, you know that fields have been set up.
Diffstat (limited to 'addons/analytic_user_function/analytic_user_function_view.xml')
0 files changed, 0 insertions, 0 deletions
