From 4ffde5b8b9b9e6a42d4fa4663df7e8d225b4a5c3 Mon Sep 17 00:00:00 2001 From: MerlinGuillaume Date: Thu, 18 Aug 2022 09:24:20 +0000 Subject: [PATCH] [FIX] web: use different hotkeys for 'ADD' and 'SAVE' buttons A modal using the 'ADD' and 'SAVE' buttons will have the same keyboard shortcut for both of these buttons Steps to reproduce: 1. Install Inventory 2. Go to Inventory > Operations > Transfers and open a transfer with a contact and in status 'Ready' 3. Click on 'EDIT' and open the contact in the Delivery Address with the quick edit button 4. Push on 'Alt' key: the 'ADD' and 'SAVE' buttons use the same shortcut Solution: Modify the current hotkey used for button 'SAVE' opw-2954146 closes odoo/odoo#98884 X-original-commit: 0f8d28269f4900e70d7fefbb359580390656cdf7 Signed-off-by: Aaron Bohy (aab) Signed-off-by: Guillaume Merlin (megu) --- addons/web/static/src/legacy/js/views/view_dialogs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/legacy/js/views/view_dialogs.js b/addons/web/static/src/legacy/js/views/view_dialogs.js index 23b7b5fa502..3e9f5133981 100644 --- a/addons/web/static/src/legacy/js/views/view_dialogs.js +++ b/addons/web/static/src/legacy/js/views/view_dialogs.js @@ -135,7 +135,7 @@ var FormViewDialog = ViewDialog.extend({ options.buttons.unshift({ text: options.save_text || (multi_select ? _t("Save & Close") : _t("Save")), classes: "btn-primary", - hotkey: 'c', + hotkey: 's', click: function () { self._save().then(self.close.bind(self)); }