summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic
diff options
context:
space:
mode:
authorAdrien Dieudonne <adr@odoo.com>2017-07-25 11:34:11 +0200
committerAdrien Dieudonne <adr@odoo.com>2017-07-27 13:58:43 +0200
commita71f22370217d2da6ad13bd29c2fa412a40ebe4c (patch)
tree46111315eab16d62944a7f22ce81f6a96ee61979 /addons/web/static/src/js/views/basic
parentecdcc65a9080fee876ca9cd82ab6385988557205 (diff)
[FIX] web: InputField: don't re-render if dirty
Let's assume that we have a form view with a one2many field displayed as a list containing two fields A and B (an input field, e.g. a char field). An onchange on the one2many is triggered as soon as A changes. This triggers a reset of the one2many which thus redraws the corresponding line by resetting its widgets. A problem occured when the user updated A, and directly (before the onchange returned) updated the input field B, as in this case the new value in B was erased when the onchanged returned, as the widget was reset with its former value (or with the value returned by the onchange, if any). Note that the model was aware of the change on B, so the model and the UI were actually desynchronized. This was quite hard to reproduce in practice, by hand, but it occured in the tour testing 'the flow', in the form view of account.bank_statement, with fields partner_id and amount of the line_ids one2many. With this rev., we don't re-render the input fields if there are pending changes that haven't been acknowledged by the model.
Diffstat (limited to 'addons/web/static/src/js/views/basic')
0 files changed, 0 insertions, 0 deletions