Files
reporting-engine/report_label/models/ir_actions_report.py
Ivàn Todorovich c6f34b6609 [ADD] report_label
2022-05-10 18:00:36 +02:00

15 lines
423 B
Python

from odoo import api, models
class IrActionsReport(models.Model):
_inherit = "ir.actions.report"
@api.model
def get_paperformat(self):
# Allow to define paperformat via context
res = super().get_paperformat()
if self.env.context.get("paperformat_id"):
res = self.env["report.paperformat"].browse(
self.env.context.get("paperformat_id"))
return res