diff --git a/partner_statement/wizard/activity_statement_wizard.py b/partner_statement/wizard/activity_statement_wizard.py index 8bfe58c7..042f576e 100644 --- a/partner_statement/wizard/activity_statement_wizard.py +++ b/partner_statement/wizard/activity_statement_wizard.py @@ -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): diff --git a/partner_statement/wizard/detailed_activity_statement_wizard.py b/partner_statement/wizard/detailed_activity_statement_wizard.py index e63e3095..80ef79cf 100644 --- a/partner_statement/wizard/detailed_activity_statement_wizard.py +++ b/partner_statement/wizard/detailed_activity_statement_wizard.py @@ -30,11 +30,12 @@ class DetailedActivityStatementWizard(models.TransientModel): report_name = "p_s.report_detailed_activity_statement_xlsx" else: report_name = "partner_statement.detailed_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) ) diff --git a/partner_statement/wizard/outstanding_statement_wizard.py b/partner_statement/wizard/outstanding_statement_wizard.py index 33afee23..cde8c6c6 100644 --- a/partner_statement/wizard/outstanding_statement_wizard.py +++ b/partner_statement/wizard/outstanding_statement_wizard.py @@ -27,13 +27,14 @@ class OutstandingStatementWizard(models.TransientModel): report_name = "p_s.report_outstanding_statement_xlsx" else: report_name = "partner_statement.outstanding_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):