From fa5a12e8b71ba21002ff3ccdb61f4e3a94647680 Mon Sep 17 00:00:00 2001 From: git_admin Date: Fri, 1 May 2026 14:25:52 +0000 Subject: [PATCH] Tower: upload base_accounting_kit 19.0.2.3.1 (via marketplace) --- .../report/multiple_invoice_report.py | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 addons/base_accounting_kit/report/multiple_invoice_report.py diff --git a/addons/base_accounting_kit/report/multiple_invoice_report.py b/addons/base_accounting_kit/report/multiple_invoice_report.py new file mode 100644 index 0000000..6f0334c --- /dev/null +++ b/addons/base_accounting_kit/report/multiple_invoice_report.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import api, models + + +class ReportInvoiceMultiple(models.AbstractModel): + _name = 'report.base_accounting_kit.report_multiple_invoice' + _inherit = 'report.account.report_invoice' + _description = 'Report Invoice Multiple' + + @api.model + def _get_report_values(self, docids, data=None): + rslt = super()._get_report_values(docids, data) + + inv = rslt['docs'] + layout = inv.journal_id.company_id.external_report_layout_id.key + + if layout == 'web.external_layout_boxed': + new_layout = 'base_accounting_kit.boxed' + + elif layout == 'web.external_layout_bold': + new_layout = 'base_accounting_kit.bold' + + elif layout == 'web.external_layout_striped': + new_layout = 'base_accounting_kit.striped' + + else: + new_layout = 'base_accounting_kit.standard' + + rslt['mi_type'] = inv.journal_id.multiple_invoice_type + rslt['mi_ids'] = inv.journal_id.multiple_invoice_ids + rslt['txt_position'] = inv.journal_id.text_position + rslt['body_txt_position'] = inv.journal_id.body_text_position + rslt['txt_align'] = inv.journal_id.text_align + rslt['layout'] = new_layout + rslt['report_type'] = data.get('report_type') if data else '' + return rslt