[FIX]-Can not print xlsx report for Activity Statement, Outstanding Statement and Detailed Activity Statement

This commit is contained in:
Hieu.VMB
2024-05-07 11:46:39 +07:00
committed by Miquel Raïch
parent 8d504516d8
commit 3397031434
6 changed files with 9 additions and 6 deletions

View File

@@ -47,13 +47,14 @@ class ActivityStatementWizard(models.TransientModel):
report_name = "p_s.report_activity_statement_xlsx"
else:
report_name = "partner_statement.activity_statement"
partners = self.env["res.partner"].browse(self._context["active_ids"])
return (
self.env["ir.actions.report"]
.search(
[("report_name", "=", report_name), ("report_type", "=", report_type)],
limit=1,
)
.report_action(self, data=data)
.report_action(partners, data=data)
)
def _export(self, report_type):