mirror of
https://github.com/bringout/oca-report.git
synced 2026-04-24 08:42:02 +02:00
update: report_xlsx to OCA 19.0 version (19.0.1.0.2)
🤖 assisted by claude
This commit is contained in:
parent
8566ac3819
commit
32a4fa90f7
23 changed files with 201 additions and 206 deletions
|
|
@ -19,14 +19,14 @@ class ReportAction(models.Model):
|
|||
@api.model
|
||||
def _render_xlsx(self, report_ref, docids, data):
|
||||
report_sudo = self._get_report(report_ref)
|
||||
report_model_name = "report.%s" % report_sudo.report_name
|
||||
report_model_name = f"report.{report_sudo.report_name}"
|
||||
report_model = self.env[report_model_name]
|
||||
ret = (
|
||||
report_model.with_context(active_model=report_sudo.model)
|
||||
.sudo(False)
|
||||
.create_xlsx_report(docids, data) # noqa
|
||||
)
|
||||
if ret and isinstance(ret, (tuple, list)): # data, "xlsx"
|
||||
if ret and isinstance(ret, (tuple | list)): # data, "xlsx"
|
||||
report_sudo.save_xlsx_report_attachment(docids, ret[0])
|
||||
return ret
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue