[FIX]account_statement_base: bug on new bank statement line fixed

pull/724/head
clementthomas 2024-09-30 17:45:40 +02:00 committed by Víctor Martínez
parent 67b7a6cd9a
commit 80eb9d27dc
1 changed files with 12 additions and 1 deletions

View File

@ -11,7 +11,18 @@ class AccountBankStatement(models.Model):
action = self.env["ir.actions.act_window"]._for_xml_id( action = self.env["ir.actions.act_window"]._for_xml_id(
"account_statement_base.account_bank_statement_line_action" "account_statement_base.account_bank_statement_line_action"
) )
action.update({"domain": [("statement_id", "=", self.id)]}) action.update(
{
"domain": [("statement_id", "=", self.id)],
"context": {
"default_journal_id": self._context.get("active_id")
if self._context.get("active_model") == "account.journal"
else None,
"account_bank_statement_line_main_view": True,
},
}
)
return action return action
def open_entries(self): def open_entries(self):