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.

24 lines
726 B

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