[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.
This commit is contained in:
@@ -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);
|
||||
},
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user