summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/views/view_dialogs.js4
1 files changed, 2 insertions, 2 deletions
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);
},