[FIX] web: attributes is not reseted by setFieldProps

This commit is contained in:
Christophe Matthieu
2017-04-11 19:44:38 +02:00
committed by Aaron Bohy
parent 8f7a445a03
commit e1eea38f2f
@@ -140,8 +140,8 @@ var FormViewDialog = ViewDialog.extend({
* If we changed some fieldAttrs, we need to restore them now.
*/
destroy: function () {
if (this.recordID && this.fieldAttrs) {
this.setFieldProps(this.recordID, this.previousFieldProps);
if (this.recordID && this.previousFieldProps) {
this.model.setFieldProps(this.recordID, this.previousFieldProps);
}
this._super.apply(this, arguments);
},