[FIX] correctly set searchview id (web client)
authorGéry Debongnie <ged@odoo.com>
Tue, 25 Nov 2014 12:11:15 +0000 (13:11 +0100)
committerGéry Debongnie <ged@odoo.com>
Tue, 25 Nov 2014 12:11:15 +0000 (13:11 +0100)
The issue is that when a default searchview is requested, it is
initialized without its view_id.  Result: debug mode can't edit the
search view.  This commit makes sure that when the field_view_get is
received, the correct view_id is set.

addons/web/static/src/js/search.js

index 82ba081..797bd5d 100644 (file)
@@ -598,6 +598,7 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
     search_view_loaded: function(data) {
         var self = this;
         this.fields_view = data;
+        this.view_id = this.view_id || data.view_id;
         if (data.type !== 'search' ||
             data.arch.tag !== 'search') {
                 throw new Error(_.str.sprintf(