mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
And add an icon to allow users to navigate to the statement lines. Currently it's not possible to open the statement form view. When editing the view an error occurs, related with the recomputation of running balances.
16 lines
457 B
Python
16 lines
457 B
Python
from odoo import models
|
|
|
|
|
|
class AccountBankStatement(models.Model):
|
|
_inherit = "account.bank.statement"
|
|
|
|
def action_open_statement_lines(self):
|
|
self.ensure_one()
|
|
if not self:
|
|
return {}
|
|
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)]})
|
|
return action
|