[FIX] account_reconcile_oca: orser of statements on list

pull/662/head
Enric Tobella 2024-05-29 12:15:30 +02:00
parent 04fea1e2c4
commit 38374976fc
2 changed files with 5 additions and 3 deletions

View File

@ -20,10 +20,11 @@ export class ReconcileRenderer extends KanbanRenderer {
const {list} = this.props; const {list} = this.props;
const statements = []; const statements = [];
for (const record of list.records) { 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 ( if (
statementId && statementId &&
(!statements.length || statements[0].id !== statementId) (!statements.length ||
statements[statements.length - 1].id !== statementId)
) { ) {
statements.push({ statements.push({
id: statementId, id: statementId,
@ -35,6 +36,7 @@ export class ReconcileRenderer extends KanbanRenderer {
}); });
} }
} }
console.log(statements);
return statements; return statements;
} }
async onClickStatement(statementId) { async onClickStatement(statementId) {

View File

@ -12,7 +12,7 @@
<div <div
class="alert alert-warning text-center" class="alert alert-warning text-center"
role="alert" role="alert"
invisible="is_valid and is_complete" attrs="{'invisible': [('is_valid', '=',True), ('is_complete','=',True)]}"
> >
<field name="problem_description" /> <field name="problem_description" />
<field name="is_valid" invisible="1" /> <field name="is_valid" invisible="1" />