diff options
| author | Ravi Gadhia <rga@openerp.com> | 2015-08-11 12:46:03 +0530 |
|---|---|---|
| committer | Raphael Collet <rco@openerp.com> | 2015-11-02 10:57:18 +0100 |
| commit | 7507b18b5d5f5c00ff223d93d2894a165d6e4920 (patch) | |
| tree | 3860f5fb68441151bdd0d059d9fd5e2a7fd67558 /addons/web/static/src/xml/base.xml | |
| parent | cb835f8a3b762f79a824d85579863c3c0c5584e9 (diff) | |
[FIX] web: hide "Create" button for editable tree views with `create="false"`
Make it such that the buttons "Save" and "Discard" are still visible.
Diffstat (limited to 'addons/web/static/src/xml/base.xml')
| -rw-r--r-- | addons/web/static/src/xml/base.xml | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index fa9dadc0c72..d11f5ad0847 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -364,12 +364,20 @@ </tfoot> </table> <t t-name="ListView.buttons"> - <t t-if="!widget.no_leaf and widget.options.action_buttons !== false and widget.options.addable and widget.is_action_enabled('create')"> - <div class="oe_list_buttons"> - <button type="button" class="btn btn-sm btn-primary o_list_button_add" accesskey="C"> - <t t-esc="widget.options.addable"/> - </button> - </div> + <t t-if="!widget.no_leaf and widget.options.action_buttons !== false"> + <div class="oe_list_buttons"> + <t t-if="widget.options.addable and widget.is_action_enabled('create')"> + <button type="button" class="btn btn-sm btn-primary o_list_button_add" accesskey="C"> + <t t-esc="widget.options.addable"/> + </button> + </t> + <button type="button" class="btn btn-primary btn-sm o_list_button_save" accesskey="S"> + Save + </button> + <button type="button" class="btn btn-default btn-sm o_list_button_discard" accesskey="D"> + Discard + </button> + </div> </t> </t> <t t-name="ListView.pager" t-if="!widget.no_leaf and widget.options.pager !== false" t-call="ViewPager"> @@ -405,16 +413,6 @@ <span name="delete" class="fa fa-trash-o"/> </td> </tr> -<t t-extend="ListView.buttons"> - <t t-jquery="button.o_list_button_add" t-operation="after"> - <button type="button" class="btn btn-primary btn-sm o_list_button_save" accesskey="S"> - Save - </button> - <button type="button" class="btn btn-default btn-sm o_list_button_discard" accesskey="D"> - Discard - </button> - </t> -</t> <button t-name="ListView.row.text_button" type="button" t-att-title="widget.string" t-att-disabled="disabled || undefined" t-att-class="disabled ? 'oe_list_button_disabled btn_txt oe_link' : 'btn_txt oe_link'" |
