mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[ADD] report_label
This commit is contained in:
committed by
Stefan Rijnhart
parent
1b1e9a4d9f
commit
c6f34b6609
14
report_label/models/ir_actions_report.py
Normal file
14
report_label/models/ir_actions_report.py
Normal file
@@ -0,0 +1,14 @@
|
||||
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
|
||||
Reference in New Issue
Block a user