1
0
forked from Mapan/odoo17e
odoo17e-kedaikipas58/addons/account_reports/models/account_journal_dashboard.py
2024-12-10 09:04:09 +07:00

20 lines
603 B
Python

# -*- coding: utf-8 -*-
from odoo import models
import ast
class AccountJournal(models.Model):
_inherit = 'account.journal'
def action_open_bank_balance_in_gl(self):
''' Show the bank balance inside the General Ledger report.
:return: An action opening the General Ledger.
'''
self.ensure_one()
action = self.env["ir.actions.actions"]._for_xml_id("account_reports.action_account_report_general_ledger")
action['context'] = dict(ast.literal_eval(action['context']), default_filter_accounts=self.default_account_id.code)
return action