import ast
from odoo import models


class AccountAccount(models.Model):
    _inherit = "account.account"

    def action_open_reconcile(self):
        self.ensure_one()
        action_values = self.env['ir.actions.act_window']._for_xml_id('odex30_account_accountant.action_move_line_posted_unreconciled')
        domain = ast.literal_eval(action_values['domain'])
        domain.append(('account_id', '=', self.id))
        action_values['domain'] = domain
        return action_values
