From 24048648da1981eb489053e45a812f82acc8d081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Tue, 4 Nov 2014 10:40:17 +0100 Subject: [PATCH] [FIX] fix a crash with create popup forms (web client) it was trying to call the forme 'hide' method on the searchview. To solve the problem, I readded the method (and renamed it to do_hide for consistency with views) --- addons/web/static/src/js/openerpframework.js | 6 ++++++ addons/web/static/src/js/view_form.js | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/openerpframework.js b/addons/web/static/src/js/openerpframework.js index fb5ae0d200a..29ad9160653 100644 --- a/addons/web/static/src/js/openerpframework.js +++ b/addons/web/static/src/js/openerpframework.js @@ -784,6 +784,12 @@ openerp.Widget = openerp.Class.extend(openerp.PropertiesMixin, { return this.$el; return this.$el.find(selector); }, + do_show: function () { + this.$el.show(); + }, + do_hide: function () { + this.$el.hide(); + }, /** * Proxies a method of the object, in order to keep the right ``this`` on * method invocations. diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 971f3622b94..7156fdaba5d 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -5368,7 +5368,7 @@ instance.web.form.SelectCreatePopup = instance.web.form.AbstractFormPopup.extend }, new_object: function() { if (this.searchview) { - this.searchview.hide(); + this.searchview.do_hide(); } if (this.view_list) { this.view_list.do_hide();