summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwan <wan@odoo.com>2019-02-15 10:24:09 +0000
committerwan <wan@odoo.com>2019-02-15 10:24:09 +0000
commite136a8e746220f2b018c458a07a7b39a14b4eb4e (patch)
treee1a9181e4c85ce17406f8d0442b1a3708ba5e26a
parent24b0f092b4f5ac7043430f106486fa2ab8829c21 (diff)
[FIX] account: fix rpc concurency in reconciliation widget
When there are lots of lines to be considered, the rpc can come in the wrong order, causing the client to not display the wanted lines. By asking the user to hit enter or leave the input field, we reduce the number of requests and we get rid of the concurency of rpc closes odoo/odoo#30280
-rw-r--r--addons/account/static/src/js/reconciliation/reconciliation_renderer.js2
-rw-r--r--addons/account/static/src/xml/account_reconciliation.xml3
2 files changed, 3 insertions, 2 deletions
diff --git a/addons/account/static/src/js/reconciliation/reconciliation_renderer.js b/addons/account/static/src/js/reconciliation/reconciliation_renderer.js
index 8ba23fda42f..0aedc28e770 100644
--- a/addons/account/static/src/js/reconciliation/reconciliation_renderer.js
+++ b/addons/account/static/src/js/reconciliation/reconciliation_renderer.js
@@ -255,7 +255,7 @@ var LineRenderer = Widget.extend(FieldManagerMixin, {
'click .accounting_view thead td': '_onTogglePanel',
'click .accounting_view tfoot td:not(.cell_left,.cell_right)': '_onShowPanel',
'click tfoot .cell_left, tfoot .cell_right': '_onSearchBalanceAmount',
- 'input input.filter': '_onFilterChange',
+ 'change input.filter': '_onFilterChange',
'click .match .load-more a': '_onLoadMore',
'click .match .mv_line td': '_onSelectMoveLine',
'click .accounting_view tbody .mv_line td': '_onSelectProposition',
diff --git a/addons/account/static/src/xml/account_reconciliation.xml b/addons/account/static/src/xml/account_reconciliation.xml
index 86ed3e1e71e..1560cd92907 100644
--- a/addons/account/static/src/xml/account_reconciliation.xml
+++ b/addons/account/static/src/xml/account_reconciliation.xml
@@ -144,7 +144,8 @@
<div t-name="reconciliation.line.match">
<div class="match_controls">
- <input class="filter" placeholder="Filter..." type="text" value=""/>
+ <input class="filter o_input" placeholder="Filter..." type="text" value=""/>
+ <button class="btn btn-secondary btn-sm fa fa-search" type="button"></button>
</div>
<table>
<tbody>