Files
Odoo-18.0-20251222/report_wkhtmltopdf_param/models/report.py
tocmo0nlord adbe430761
Some checks failed
pre-commit / pre-commit (push) Has been cancelled
tests / Detect unreleased dependencies (push) Has been cancelled
tests / test with OCB (push) Has been cancelled
tests / test with Odoo (push) Has been cancelled
Initial commit: Odoo 18.0-20251222 extra-addons
2026-03-13 20:43:25 +00:00

30 lines
839 B
Python

# Copyright 2017 Avoin.Systems
# Copyright 2017 ForgeFlow, S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, models
class IrActionsReport(models.Model):
_inherit = "ir.actions.report"
@api.model
def _build_wkhtmltopdf_args(
self,
paperformat_id,
landscape,
specific_paperformat_args=None,
set_viewport_size=False,
):
# noinspection PyUnresolvedReferences,PyProtectedMember
command_args = super()._build_wkhtmltopdf_args(
paperformat_id, landscape, specific_paperformat_args, set_viewport_size
)
for param in paperformat_id.custom_params:
command_args.extend([param.name])
if param.value:
command_args.extend([param.value])
return command_args