[FIX] fix a crash with create popup forms (web client)
authorGéry Debongnie <ged@odoo.com>
Tue, 4 Nov 2014 09:40:17 +0000 (10:40 +0100)
committerGéry Debongnie <ged@odoo.com>
Tue, 4 Nov 2014 10:08:51 +0000 (11:08 +0100)
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
addons/web/static/src/js/view_form.js

index fb5ae0d..29ad916 100644 (file)
@@ -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.
index 971f362..7156fda 100644 (file)
@@ -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();