From e1eea38f2f940fbe252273a5a9d4d03474f81d0a Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Mon, 20 Mar 2017 10:07:27 +0100 Subject: [PATCH] [FIX] web: attributes is not reseted by setFieldProps --- addons/web/static/src/js/views/view_dialogs.js | 4 ++-- 1 file 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); },