diff options
| author | Yannick Tivisse <yti@odoo.com> | 2018-08-07 12:10:09 +0200 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2018-08-08 17:35:34 +0200 |
| commit | 64f6e50d0ce6bfbb9474b416b08a55af2acbfa8a (patch) | |
| tree | 61b3b5e7d9a1b1282140cd27894a2ccf020e21a9 /addons/web/static/src | |
| parent | 91b62235f8e1d686e86d06d9334e83d268cf7ba3 (diff) | |
[FIX] web: Reset correctly the selection on reference fields
Purpose
=======
If the model on a reference fields is not modified from the interface
by the user but by the server, the selection is not correctly
recomputed on the interface.
Specification
=============
By calling super first on the '_reset' method, the new model
is taken into account when resetting the selection.
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/fields/relational_fields.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/fields/relational_fields.js b/addons/web/static/src/js/fields/relational_fields.js index 5f10d1bf0cb..a016ed1aa03 100644 --- a/addons/web/static/src/js/fields/relational_fields.js +++ b/addons/web/static/src/js/fields/relational_fields.js @@ -2499,9 +2499,9 @@ var FieldReference = FieldMany2One.extend({ * @private */ _reset: function () { + this._super.apply(this, arguments); var value = this.$('select').val(); this._setState(); - this._super.apply(this, arguments); this.$('select').val(this.value && this.value.model || value); }, /** |
