[IMP] account_reconcile_oca: Open reconcile view when press the name on journal

pull/768/head
Enric Tobella 2024-10-16 16:16:36 +02:00 committed by Víctor Martínez
parent 27174a0b37
commit 33493c3dd3
1 changed files with 9 additions and 0 deletions

View File

@ -34,3 +34,12 @@ class AccountJournal(models.Model):
): ):
return False return False
return _("Well done! Everything has been reconciled") 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