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.

14 lines
423 B

  1. from odoo import api, models
  2. class IrActionsReport(models.Model):
  3. _inherit = "ir.actions.report"
  4. @api.model
  5. def get_paperformat(self):
  6. # Allow to define paperformat via context
  7. res = super().get_paperformat()
  8. if self.env.context.get("paperformat_id"):
  9. res = self.env["report.paperformat"].browse(
  10. self.env.context.get("paperformat_id"))
  11. return res