[FIX] base: button label

The Owl web client does not suppress GTK-style mnemonics, so these
should be removed, as otherwise they are explicitly displayed.

Following GTK rules, the old GTK client would use the `_` letter
prefix in labels to underline the letter and use the corresponding
character as accelerator/mnemonic for activating the
control (https://docs.gtk.org/gtk4/ctor.Label.new_with_mnemonic.html).

The web client "supported" this feature by just ignoring and dropping
the `_` it found in labels, even after it gained support for keyboard
accelerators (= hotkeys).

The new Owl form just ignores GTK-style mnemonics entirely, not
performing that preprocessing on widget labels. As a result, the
mnemonic marker (`_`) now appears literally in some labels, and needs
to be removed.

closes odoo/odoo#103563

X-original-commit: ca80632a1045b26927f72d93f4ec58e7a58b5654
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
This commit is contained in:
niyasraphy
2022-10-20 08:23:54 +02:00
committed by Xavier Morel
parent 418a0c734d
commit c9ba639017
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -12,7 +12,7 @@
<field name="menu_id"/>
</group>
<footer>
<button name="menu_create" string="Create _Menu" type="object" class="btn-primary" data-hotkey="q"/>
<button name="menu_create" string="Create Menu" type="object" class="btn-primary" data-hotkey="q"/>
<button string="Cancel" class="btn-secondary" special="cancel" data-hotkey="z" />
</footer>
</form>
@@ -15,7 +15,7 @@
<field name="overwrite" groups="base.group_no_one"/>
</group>
<footer>
<button name="import_lang" string="_Import" type="object" class="btn-primary" data-hotkey="q"/>
<button name="import_lang" string="Import" type="object" class="btn-primary" data-hotkey="q"/>
<button string="Cancel" class="btn-secondary" special="cancel" data-hotkey="z" />
</footer>
</form>