Files
odoo_source/odoo
Jeremy Kersten 33069e6c02 [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
2017-03-24 11:39:38 +01:00
..
…
…
…
…
…
…
2017-03-10 17:39:06 +01:00
…