From 054ec9151dbba335649df46cbe2cabde0381ac8c Mon Sep 17 00:00:00 2001 From: git_admin Date: Fri, 1 May 2026 14:20:35 +0000 Subject: [PATCH] Tower: upload accounting_pdf_reports 1.0.2 (via marketplace) --- .../wizard/account_report_print_journal.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 addons/accounting_pdf_reports/wizard/account_report_print_journal.py diff --git a/addons/accounting_pdf_reports/wizard/account_report_print_journal.py b/addons/accounting_pdf_reports/wizard/account_report_print_journal.py new file mode 100644 index 0000000..21ced66 --- /dev/null +++ b/addons/accounting_pdf_reports/wizard/account_report_print_journal.py @@ -0,0 +1,21 @@ +from odoo import fields, models + + +class AccountPrintJournal(models.TransientModel): + _inherit = "account.common.journal.report" + _name = "account.print.journal" + _description = "Account Print Journal" + + sort_selection = fields.Selection( + [('date', 'Date'), ('move_name', 'Journal Entry Number')], + 'Entries Sorted by', required=True, default='move_name' + ) + journal_ids = fields.Many2many( + 'account.journal', string='Journals', required=True, + default=lambda self: self.env['account.journal'].search([('type', 'in', ['sale', 'purchase'])]) + ) + + def _print_report(self, data): + data = self.pre_print_report(data) + data['form'].update({'sort_selection': self.sort_selection}) + return self.env.ref('account.action_report_journal').with_context(landscape=True).report_action(self, data=data)