Commit Graph

12 Commits (493df6de04fb88c42a710d17296dde2222466a0d)

Author SHA1 Message Date
Yenthe Van Ginneken 6b810c7fb5
[FIX] report_xlsx: make sure variable is known
Before this commit if another app crashes the "report_xlsx" controller it would go into the exception.
However in the exception the following is called:
_logger.exception("Error while generating report %s", reportname)

As the except clause does not have the "reportname" variable it fails:
Traceback (most recent call last):
  File "/home/odoo/src/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/home/odoo/src/odoo/odoo/http.py", line 804, in dispatch
    r = self._call_function(**self.params)
  File "/home/odoo/src/odoo/odoo/http.py", line 359, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/odoo/src/odoo/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/odoo/src/odoo/odoo/http.py", line 348, in checked_call
    result = self.endpoint(*a, **kw)
  File "/home/odoo/src/odoo/odoo/http.py", line 910, in __call__
    return self.method(*args, **kw)
  File "/home/odoo/src/odoo/odoo/http.py", line 535, in response_wrap
    response = f(*args, **kw)
  File "/home/odoo/src/user/report_xlsx/controllers/main.py", line 100, in report_download
    _logger.exception("Error while generating report %s", reportname)
Exception

By putting the "reportname" before the try it will always be available
2023-04-12 21:47:55 +02:00
Jasmin Solanki b3cd677421 [FIX] report_xlsx: Fix dynamic report download 2022-06-24 17:24:43 +05:30
Mihran Thalhath 497dd50e7c
[FIX] report_xlsx: fix generation of pdf reports
the report handler for xlsx added over here is always returning `true` even if the report being
generated is not xlsx. Due to this, the report handler doesn't check for other report types
at b309d3a99f/addons/web/static/src/webclient/actions/action_service.js (L1019)
and thus doesn't generate any other reports. So if the converter is not xlsx, return false instead of true.

Also, updating the docids and context in the report_routes controller only needs to be done if
the converter is xlsx and not in any other case.
2022-01-18 12:09:34 +05:30
Christopher Ormaza bc9203ab0b [FIX] report_xlsx: refactor controller and report hamdler 2021-12-10 11:00:22 +01:00
Joan Mateu Jordi fee318323e [MIG] report_xlsx: Migration to 15.0 2021-12-10 10:12:17 +01:00
Eugene Molotov e1aa558895 [FIX] report_xlsx: correctly handle exceptions, when generating report
Before this commit, when exception is raised while generating report,
on browser window instead of python traceback nothing was shown
on production environment or werkzeug's "Console locked" message
on development environment.
2021-12-10 10:12:17 +01:00
Saran440 63beeed36c [FIX] safe_eval object time 2021-12-10 10:12:17 +01:00
Alex Cuellar df75d408ae [MIG] report_xlsx: Migration to 14.0 2021-12-10 10:12:17 +01:00
Rod Schouteden 67ecf5c597 [MIG][IMP][13.0] rebase to include new linters 2021-12-10 10:12:17 +01:00
Kitti U b8d7bf50d6 [12.0][IMP] report_xlsx, make sure print_report_name works 2021-12-10 10:12:17 +01:00
Naglis Jonaitis 31825cafad [IMP] report_fillpdf, report_xlsx, report_xml: Use content_disposition helper 2021-12-10 10:12:17 +01:00
Enric Tobella f0455b7bf2 [MIG] report_xlsx: Migration to 11.0 2021-12-10 10:12:17 +01:00