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

This commit is contained in:
clementthomas
2024-09-30 17:45:40 +02:00
parent e11c081adb
commit 0b96202e9b

View File

@@ -11,7 +11,18 @@ class AccountBankStatement(models.Model):
action = self.env["ir.actions.act_window"]._for_xml_id(
"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
def open_entries(self):