From a66dd617b630eda09aec42e69dd7ca6c3760394a Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Wed, 16 Oct 2024 16:16:36 +0200 Subject: [PATCH] [IMP] account_reconcile_oca: Open reconcile view when press the name on journal --- account_reconcile_oca/models/account_journal.py | 9 +++++++++ .../views/account_bank_statement_line.xml | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/account_reconcile_oca/models/account_journal.py b/account_reconcile_oca/models/account_journal.py index a598fa0e3f..5b69e72928 100644 --- a/account_reconcile_oca/models/account_journal.py +++ b/account_reconcile_oca/models/account_journal.py @@ -31,3 +31,12 @@ def get_rainbowman_message(self): if self.get_journal_dashboard_datas()["number_to_reconcile"] > 0: return False return _("Well done! Everything has been reconciled") + + def open_action(self): + self.ensure_one() + if self.type not in ["bank", "cash"]: + return super().open_action() + action = self.env["ir.actions.actions"]._for_xml_id( + "account_reconcile_oca.action_bank_statement_line_reconcile_all" + ) + return action diff --git a/account_reconcile_oca/views/account_bank_statement_line.xml b/account_reconcile_oca/views/account_bank_statement_line.xml index 88e72ce51b..fccb750dd2 100644 --- a/account_reconcile_oca/views/account_bank_statement_line.xml +++ b/account_reconcile_oca/views/account_bank_statement_line.xml @@ -356,12 +356,12 @@ {'default_journal_id': active_id, 'view_ref': 'account_reconcile_oca.bank_statement_line_form_reconcile_view'} - tree,kanban + kanban,tree