diff options
| author | qsm-odoo <qsm@odoo.com> | 2016-02-24 16:36:01 +0100 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2016-02-24 17:13:00 +0100 |
| commit | 516b1a6c72dde46f3f0c7d4f86a9b8265b4153a1 (patch) | |
| tree | 56eb5b100322d418a68f4cb51711025c40f0b325 /addons/web/static/src/xml | |
| parent | 80b7cba81272b995ed3febf21c237c47b9be6db2 (diff) | |
[FIX] web: target=new forms buttons
Launching a form view in a dialog thanks to target=new did not
display the action buttons (save, discard, ...). This is because
the action_buttons flag is set to false by default and the only way
to start an action with a different value is thanks to JS code (i.e.
the debug manager modals).
Now, action buttons are also rendered if the flag footer_to_buttons
is set to true (only happens when launching an action in a modal) and
that the formview does not have any footer tag with buttons to add
(so that wizard form keep replacing the action buttons by these footer
buttons).
Diffstat (limited to 'addons/web/static/src/xml')
| -rw-r--r-- | addons/web/static/src/xml/base.xml | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index e7e95b7b9b6..6030c1bce2b 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -487,26 +487,24 @@ <div class="oe_form_container"/> </div> </t> -<div t-name="FormView.buttons" class="oe_form_buttons"> - <t t-if="widget.options.action_buttons !== false"> - <div class="o_form_buttons_view"> - <button t-if="widget.is_action_enabled('edit')" - type="button" - class="oe_form_button_edit btn btn-default btn-sm" accesskey="E"> - Edit - </button> - <button t-if="widget.is_action_enabled('create')" - type="button" class="oe_form_button_create btn btn-default btn-sm" - accesskey="C"> - Create - </button> - </div> - <span class="o_form_buttons_edit"> - <button type="button" class="oe_form_button_save btn btn-primary btn-sm" accesskey="S">Save</button> - <button type="button" class="oe_form_button_cancel btn btn-sm btn-default" accesskey="D">Discard</button> - </span> - </t> -</div> +<t t-name="FormView.buttons"> + <div class="o_form_buttons_view"> + <button t-if="widget.is_action_enabled('edit')" + type="button" + class="oe_form_button_edit btn btn-default btn-sm" accesskey="E"> + Edit + </button> + <button t-if="widget.is_action_enabled('create')" + type="button" class="oe_form_button_create btn btn-default btn-sm" + accesskey="C"> + Create + </button> + </div> + <span class="o_form_buttons_edit"> + <button type="button" class="oe_form_button_save btn btn-primary btn-sm" accesskey="S">Save</button> + <button type="button" class="oe_form_button_cancel btn btn-sm btn-default" accesskey="D">Discard</button> + </span> +</t> <t t-name="FormView.pager" t-if="widget.options.pager !== false" t-call="ViewPager"> <span class="oe_form_pager_state"></span> </t> |
