mirror of
https://gitlab.com/flectra-community/reporting-engine.git
synced 2024-11-15 02:32:05 +00:00
30 lines
897 B
Python
30 lines
897 B
Python
|
# Copyright 2017 Avoin.Systems
|
||
|
# Copyright 2017 Eficent Business and IT Consulting Services, S.L.
|
||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||
|
|
||
|
from flectra 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(IrActionsReport, self)._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
|