summaryrefslogtreecommitdiff
path: root/doc/python3.rst
diff options
context:
space:
mode:
authorXavier Morel <xmo@odoo.com>2017-05-19 17:01:42 +0200
committerXavier Morel <xmo@odoo.com>2017-06-12 11:04:23 +0200
commitb62ba7ee1adc8e3c41040cafde30c2c93154ce69 (patch)
treee5287e6e53d58e4ea5e8104d8c2a9fa885cfb713 /doc/python3.rst
parent1d579221d7e5a33add17e1ef7c973c6c4d8db850 (diff)
[FIX] P3: initialisation order of columns
Python 3's hash randomisation means columns can be iterated — and thus initialised — in any order (within a given model/override anyway), which means there can be an implicit dependency on column initialisation order e.g. (res.company).currency_id has a default which fetches the currency_id of the company_id of the administrator, and res.company has a _order=sequence,name, if the currency_id field is created before the sequence the SELECT query will blow up as the sequence column will not exist yet. Attempt to always manipulate (iterate & initialize) fields based on their order of definition using a global sequence number.
Diffstat (limited to 'doc/python3.rst')
0 files changed, 0 insertions, 0 deletions