diff options
| author | Xavier Morel <xmo@openerp.com> | 2011-12-14 15:43:17 +0100 |
|---|---|---|
| committer | Xavier Morel <xmo@openerp.com> | 2011-12-14 15:43:17 +0100 |
| commit | e557a4b4c0d720c778828b73eae19920e9cf8f66 (patch) | |
| tree | b686c46ed052ed59482b54e8ad44234fa5830a78 /addons/web/static/src | |
| parent | efc5cabe7a85918fc87d21bf8a300ee24426f8a5 (diff) | |
[FIX] don't display add/remove buttons in group_by_no_leaf views
bzr revid: xmo@openerp.com-20111214144317-7k0u4s2xg9ochpte
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/view_list.js | 2 | ||||
| -rw-r--r-- | addons/web/static/src/xml/base.xml | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index 059bc020682..bf423434ecc 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 a861c3c93f5..cf517fef490 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -573,7 +573,7 @@ <th t-att-colspan="columns_count"> <table> <tr> - <td t-if="options.action_buttons !== false" class="oe-actions"> + <td t-if="!no_leaf and options.action_buttons !== false" class="oe-actions"> <button type="button" class="oe-list-add" t-if="options.addable"> <t t-esc="options.addable"/> @@ -634,7 +634,7 @@ this.prepend($title); </t> </t> -<th t-name="Listview.navigation.button" t-if="options.pager !== false" +<th t-name="Listview.navigation.button" t-if="!no_leaf and options.pager !== false" class="oe-list-pager" t-att-colspan="columns_count"> <button type="button" disabled="disabled" data-pager-action="first">First</button> |
