[ADD] report_wkhtmltopdf_param

This commit is contained in:
Miku Laitinen
2017-04-26 17:21:43 +02:00
committed by Jordi Ballester
parent fd70d2e34c
commit cc08c2be97
12 changed files with 259 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Avoin.Systems
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import models
class Report(models.Model):
_inherit = 'report'
def _build_wkhtmltopdf_args(self, paperformat,
specific_paperformat_args=None):
# noinspection PyUnresolvedReferences,PyProtectedMember
command_args = super(Report, self)._build_wkhtmltopdf_args(
paperformat,
specific_paperformat_args
)
for param in paperformat.custom_params:
command_args.extend([param.name])
if param.value:
command_args.extend([param.value])
return command_args