diff options
| author | Ravi Gadhia <rga@openerp.com> | 2015-08-11 12:46:03 +0530 |
|---|---|---|
| committer | Adrien Dieudonne <adr@odoo.com> | 2016-10-11 10:22:10 +0200 |
| commit | 0afe5d4af52448c2dcaca7b8537c2c6c08c7fbb5 (patch) | |
| tree | 99eb413c2ecb746e0884e636c52f1ca99c70f688 /addons/web/static/src | |
| parent | 46f3ca0f7b0d40497f91a725f70587716a6e4bda (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')
| -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 5250d790f8e..370b2d40f8d 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -412,12 +412,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"> @@ -453,16 +461,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'" |
