summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/basic_fields.js
diff options
context:
space:
mode:
authorXavier-Do <xdo@odoo.com>2020-02-10 15:01:17 +0000
committerRaphael Collet <rco@odoo.com>2020-02-12 10:16:11 +0000
commit7483fdfce0ec6290237448b82cf29003332db6b0 (patch)
tree61b2b26de5d0881e57507114e789f17a3000a4b6 /addons/web/static/src/js/fields/basic_fields.js
parente95ccf0908c263f6cf23c91c477a8e252e936ff1 (diff)
[FIX] core: flush env after pre upgrade scripts
In some case, a pre-migration script calls `xml_import.parse` to force reload a no-update data in pre-script. It is possible that fields are marked to recompute in the process. The problem is that the reference to the field added in `env.all.tocompute` won't be the same as the reference of the same field after calling `registry.setup_models()`, leading to an infinite loop while recomputing this field, since `fields.__get__` wont find `self` in `env.all.tocompute`. This problem was discovered when trying to migrate a database with all modules installed (no demo data) from 12.0 to 13.0 (for commit references: http://runbot.odoo.com/runbot/build/1176576 with database comming from http://runbot.odoo.com/runbot/build/1171714). This commit adds a check before executing `registry.setup_models()` in order to log when some fields to compute remain before breaking fields references, and adds a `flush()` after pre-scripts to fix the current issue. X-original-commit: 41b9d810066774736c4077bba1dc9c9fba004f48
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
0 files changed, 0 insertions, 0 deletions