OCA reporting engine fork for dev and update.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
790 B

  1. # -*- coding: utf-8 -*-
  2. # Copyright 2017 Avoin.Systems
  3. # Copyright 2017 Eficent Business and IT Consulting Services, S.L.
  4. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  5. from odoo import models
  6. class Report(models.Model):
  7. _inherit = 'report'
  8. def _build_wkhtmltopdf_args(self, paperformat,
  9. specific_paperformat_args=None):
  10. # noinspection PyUnresolvedReferences,PyProtectedMember
  11. command_args = super(Report, self)._build_wkhtmltopdf_args(
  12. paperformat,
  13. specific_paperformat_args
  14. )
  15. for param in paperformat.custom_params:
  16. command_args.extend([param.name])
  17. if param.value:
  18. command_args.extend([param.value])
  19. return command_args