summaryrefslogtreecommitdiff
path: root/addons/web/static/tests/fields/basic_fields_tests.js
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2017-04-20 11:13:28 +0200
committerAaron Bohy <aab@odoo.com>2017-04-20 13:12:50 +0200
commite61454f148583c90fca625de75fce85b5d0129c8 (patch)
tree93300640f7483373db97a2b581bbb9029335e04c /addons/web/static/tests/fields/basic_fields_tests.js
parent6a5f18f9709674ffa1a8557afe16448f38c29487 (diff)
[FIX] web: BasicRenderer: don't reset this.defs too soon
The 'defs' attribute of the BasicRenderer is used to push the rendering deferred of asynchronous fields. It is set to an empty array before the rendering, and for each asynchronous field, its deferred is pushed in the array, so that the renderer can wait for all its fields to be rendered (no flickering). The function '_applyModifiers' is called during the whole view rendering (for each field in the view), and when some fields change, as the modifiers are then re-evaluated. As it is called during the whole view rendering, it can't delete the 'defs' attribute, otherwise it will crash if one of the remaining fields in the view uses an asynchronous widget (trying to push a deferred in an undefined variable). This rev. moves the deletion of 'defs' to the function that is called when all modifiers are re-evaluated and applied.
Diffstat (limited to 'addons/web/static/tests/fields/basic_fields_tests.js')
0 files changed, 0 insertions, 0 deletions