From: Xavier Morel Date: Wed, 14 Dec 2011 14:43:17 +0000 (+0100) Subject: [FIX] don't display add/remove buttons in group_by_no_leaf views X-Git-Tag: 6.1.0-rc1-addons~663 X-Git-Url: http://git.inspyration.org/?a=commitdiff_plain;h=e557a4b4c0d720c778828b73eae19920e9cf8f66;hp=efc5cabe7a85918fc87d21bf8a300ee24426f8a5;p=odoo%2Fodoo.git [FIX] don't display add/remove buttons in group_by_no_leaf views bzr revid: xmo@openerp.com-20111214144317-7k0u4s2xg9ochpte --- diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index 059bc02..bf42343 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -79,6 +79,7 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView# self.compute_aggregates(); }); + this.no_leaf = false; }, /** * Retrieves the view's number of records per page (|| section) @@ -473,6 +474,7 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView# if (_.isEmpty(group_by) && !context['group_by_no_leaf']) { group_by = null; } + this.no_leaf = !!context['group_by_no_leaf']; this.reload_view(!!group_by, context).then( $.proxy(this, 'reload_content')); diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index a861c3c..cf517fe 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -573,7 +573,7 @@ -
+