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.

31 lines
944 B

  1. # Copyright 2017 Avoin.Systems
  2. # Copyright 2017 Eficent Business and IT Consulting Services, S.L.
  3. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
  4. from odoo import api, models
  5. class IrActionsReport(models.Model):
  6. _inherit = 'ir.actions.report'
  7. @api.model
  8. def _build_wkhtmltopdf_args(
  9. self,
  10. paperformat_id,
  11. landscape,
  12. specific_paperformat_args=None,
  13. set_viewport_size=False):
  14. # noinspection PyUnresolvedReferences,PyProtectedMember
  15. command_args = super(IrActionsReport, self)._build_wkhtmltopdf_args(
  16. paperformat_id,
  17. landscape,
  18. specific_paperformat_args,
  19. set_viewport_size
  20. )
  21. for param in paperformat_id.custom_params:
  22. command_args.extend([param.name])
  23. if param.value:
  24. command_args.extend([param.value])
  25. return command_args