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

16 lines
653 B
Python

# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import _, api, models
from odoo.exceptions import UserError
class AgedReceiableCustomHandler(models.AbstractModel):
_inherit = "account.aged.receivable.report.handler"
@api.model
def action_print_report_statement_account(self, options, params):
model, record_id = self.env['account.report']._get_model_info_from_id(params['line_id'])
if model != 'res.partner':
raise UserError(_("This option is only available for customers."))
return self.env[model].browse(record_id).action_print_report_statement_account(options)