mirror of
https://github.com/bringout/oca-report.git
synced 2026-04-19 19:22:08 +02:00
Initial commit: OCA Report packages (45 packages)
This commit is contained in:
commit
2f4db400df
2543 changed files with 469120 additions and 0 deletions
|
|
@ -0,0 +1 @@
|
|||
from . import main
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
# Copyright 2019 Creu Blanca
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
import json
|
||||
|
||||
from odoo.http import request, route
|
||||
|
||||
from odoo.addons.web.controllers import report as report
|
||||
|
||||
|
||||
class ReportController(report.ReportController):
|
||||
@route()
|
||||
def report_routes(self, reportname, docids=None, converter=None, **data):
|
||||
report = request.env["ir.actions.report"]._get_report_from_name(reportname)
|
||||
original_context = json.loads(data.get("context", "{}") or "{}")
|
||||
data["context"] = json.dumps(
|
||||
report.with_context(**original_context)._get_context()
|
||||
)
|
||||
return super().report_routes(
|
||||
reportname, docids=docids, converter=converter, **data
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue