From d3cf19c3f409d79aad650c8afafa18bcb99068b1 Mon Sep 17 00:00:00 2001 From: git_admin Date: Fri, 1 May 2026 14:20:47 +0000 Subject: [PATCH] Tower: upload accounting_pdf_reports 1.0.2 (via marketplace) --- .../wizard/account_report_common_account.py | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 addons/accounting_pdf_reports/wizard/account_report_common_account.py diff --git a/addons/accounting_pdf_reports/wizard/account_report_common_account.py b/addons/accounting_pdf_reports/wizard/account_report_common_account.py new file mode 100644 index 0000000..5b77c89 --- /dev/null +++ b/addons/accounting_pdf_reports/wizard/account_report_common_account.py @@ -0,0 +1,26 @@ +from odoo import api, fields, models + + +class AccountCommonAccountReport(models.TransientModel): + _name = 'account.common.account.report' + _inherit = "account.common.report" + _description = 'Account Common Account Report' + + display_account = fields.Selection([('all', 'All'), + ('movement', 'With movements'), + ('not_zero', 'With balance is not equal to 0'), ], + string='Display Accounts', + required=True, default='movement') + analytic_account_ids = fields.Many2many('account.analytic.account', + string='Analytic Accounts') + account_ids = fields.Many2many('account.account', string='Accounts') + partner_ids = fields.Many2many('res.partner', string='Partners') + + def pre_print_report(self, data): + data['form'].update(self.read(['display_account'])[0]) + data['form'].update({ + 'analytic_account_ids': self.analytic_account_ids.ids, + 'partner_ids': self.partner_ids.ids, + 'account_ids': self.account_ids.ids, + }) + return data