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.

29 lines
894 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. ):
  15. # noinspection PyUnresolvedReferences,PyProtectedMember
  16. command_args = super(IrActionsReport, self)._build_wkhtmltopdf_args(
  17. paperformat_id, landscape, specific_paperformat_args, set_viewport_size
  18. )
  19. for param in paperformat_id.custom_params:
  20. command_args.extend([param.name])
  21. if param.value:
  22. command_args.extend([param.value])
  23. return command_args