diff --git a/addons/web/static/src/js/views/view_dialogs.js b/addons/web/static/src/js/views/view_dialogs.js index 5ca2cd5c14e..b9870a78e56 100644 --- a/addons/web/static/src/js/views/view_dialogs.js +++ b/addons/web/static/src/js/views/view_dialogs.js @@ -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); },