From 311a0fa78837bb019d03e468b7f1870b112d1eff Mon Sep 17 00:00:00 2001 From: David Date: Wed, 4 Oct 2023 15:21:37 +0200 Subject: [PATCH] [FIX] account_reconciliation_widget: m2x record keyboard navigation We couldn't use our direction keys to go down the record list on a many2one field as the navigation events are propagated from the field it self and go up to the widget where a navigation through the reconcile keys is expected. Both behaviors are preserved. TT45219 --- .../static/src/js/reconciliation/reconciliation_action.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/account_reconciliation_widget/static/src/js/reconciliation/reconciliation_action.js b/account_reconciliation_widget/static/src/js/reconciliation/reconciliation_action.js index 7aeb9dbe..10664898 100644 --- a/account_reconciliation_widget/static/src/js/reconciliation/reconciliation_action.js +++ b/account_reconciliation_widget/static/src/js/reconciliation/reconciliation_action.js @@ -50,6 +50,13 @@ odoo.define("account.ReconciliationClientAction", function (require) { }), _onNavigationMove: function (ev) { + const $input = ev.target.$input; + // When we're on a relational field, we want to navigate inside the record + // selector, otherwise we'll be catching a wrong navigation event + if ($input && $input.hasClass("ui-autocomplete-input")) { + ev.stopPropagation(); + return; + } var non_reconciled_keys = _.keys( // eslint-disable-next-line no-unused-vars _.pick(this.model.lines, function (value, key, object) {