From 38374976fc54b8cee49754e2cbb5ee3cf13e3ae7 Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Wed, 29 May 2024 12:15:30 +0200 Subject: [PATCH] [FIX] account_reconcile_oca: orser of statements on list --- .../static/src/js/reconcile/reconcile_renderer.esm.js | 6 ++++-- account_reconcile_oca/views/account_bank_statement.xml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/account_reconcile_oca/static/src/js/reconcile/reconcile_renderer.esm.js b/account_reconcile_oca/static/src/js/reconcile/reconcile_renderer.esm.js index 552de9ba..b3c0cfe6 100644 --- a/account_reconcile_oca/static/src/js/reconcile/reconcile_renderer.esm.js +++ b/account_reconcile_oca/static/src/js/reconcile/reconcile_renderer.esm.js @@ -20,10 +20,11 @@ export class ReconcileRenderer extends KanbanRenderer { const {list} = this.props; const statements = []; for (const record of list.records) { - const statementId = record.data.statement_id && record.data.statement_id[0]; + var statementId = record.data.statement_id && record.data.statement_id[0]; if ( statementId && - (!statements.length || statements[0].id !== statementId) + (!statements.length || + statements[statements.length - 1].id !== statementId) ) { statements.push({ id: statementId, @@ -35,6 +36,7 @@ export class ReconcileRenderer extends KanbanRenderer { }); } } + console.log(statements); return statements; } async onClickStatement(statementId) { diff --git a/account_reconcile_oca/views/account_bank_statement.xml b/account_reconcile_oca/views/account_bank_statement.xml index ac615d7f..c3e1e0d0 100644 --- a/account_reconcile_oca/views/account_bank_statement.xml +++ b/account_reconcile_oca/views/account_bank_statement.xml @@ -12,7 +12,7 @@