diff options
| author | Jeremy Kersten <jke@odoo.com> | 2017-03-24 09:55:21 +0100 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2017-03-24 11:39:38 +0100 |
| commit | 33069e6c02d8c28ad65d43a5cd79e625e1fd74f5 (patch) | |
| tree | 714fe079af475a0f09082aeee480babe4f9d4801 /addons/web/static/src/js/views/basic/basic_controller.js | |
| parent | 63167fc51b70cd1a51fb8bb75968aade4f0e0071 (diff) | |
[IMP] ir.values: make order deterministic: per-company > global
Refine the priorities of ir.values entries to make the result
deterministic in the presence of multiple matching default
values. We now give the priority to company-specific defaults,
before global defaults.
Before this change, the default value would be random when
both a per-company and global default value existed for the same
field (with no per-user default).
The priorities are now defined as follows (smaller number = higher prio):
1. Per-user default (user_id is set, company_id is set)
2. Per-user global default (user_id is set, company_id not set)
3. Per-company default (user_id not set, company_id set)
4. Global defaults (user_id not set, company_id not set)
The final "id" order spec ensures that the order is total.
Also added the corresponding regression test.
Closes #16038
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions
