summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml/base.xml
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2015-10-27 11:55:56 +0100
committerNicolas Lempereur <nle@odoo.com>2015-10-28 15:32:31 +0100
commit665bc1c935657c66e2ca9558d02685d605028baf (patch)
treedd2f67d2c37caea0a94122d38f82bc607c5afd27 /addons/web/static/src/xml/base.xml
parent9593c086735f07fcd5ba2ff18bd1fa9089a7226a (diff)
[FIX] web{,_kanban}: too much and too little shortcuts
When several accesskey with the same key, are defined on elements, the last one (even if not displayed) is the one which will be actioned and the key sequence is pressed. This caused an issue since the "Pager" template is shared between all elements, even the x2many relational widgets. Also there was shortcut for Create/Save/Discard on the form view, but those shortcuts should also be enabled in the list and kanban view. closes #9267 opw-652888
Diffstat (limited to 'addons/web/static/src/xml/base.xml')
-rw-r--r--addons/web/static/src/xml/base.xml15
1 files changed, 10 insertions, 5 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index a2f09524bf9..819dc46b41e 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -216,8 +216,13 @@
<t t-raw="0"/>
</div>
<div class="btn-group btn-group-sm oe-pager-buttons" style="display: inline-block">
- <a class="fa fa-chevron-left btn btn-default oe-pager-button" accesskey="O" type="button" data-pager-action="previous"></a>
- <a class="fa fa-chevron-right btn btn-default oe-pager-button" accesskey="P" type="button" data-pager-action="next"></a>
+ <!-- accesskeys not wanted in X2Many widgets -->
+ <t t-if="!widget.x2m">
+ <t t-set="att_prev" t-value="{'accesskey': 'O'}" />
+ <t t-set="att_next" t-value="{'accesskey': 'P'}" />
+ </t>
+ <a class="fa fa-chevron-left btn btn-default oe-pager-button" t-att="att_prev" type="button" data-pager-action="previous"></a>
+ <a class="fa fa-chevron-right btn btn-default oe-pager-button" t-att="att_next" type="button" data-pager-action="next"></a>
</div>
</span>
@@ -361,7 +366,7 @@
<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">
+ <button type="button" class="btn btn-sm btn-primary o_list_button_add" accesskey="C">
<t t-esc="widget.options.addable"/>
</button>
</div>
@@ -402,10 +407,10 @@
</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">
+ <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">
+ <button type="button" class="btn btn-default btn-sm o_list_button_discard" accesskey="D">
Discard
</button>
</t>