commit
fe1dbcf31a
|
@ -47,13 +47,14 @@ class ActivityStatementWizard(models.TransientModel):
|
||||||
report_name = "p_s.report_activity_statement_xlsx"
|
report_name = "p_s.report_activity_statement_xlsx"
|
||||||
else:
|
else:
|
||||||
report_name = "partner_statement.activity_statement"
|
report_name = "partner_statement.activity_statement"
|
||||||
|
partners = self.env["res.partner"].browse(self._context["active_ids"])
|
||||||
return (
|
return (
|
||||||
self.env["ir.actions.report"]
|
self.env["ir.actions.report"]
|
||||||
.search(
|
.search(
|
||||||
[("report_name", "=", report_name), ("report_type", "=", report_type)],
|
[("report_name", "=", report_name), ("report_type", "=", report_type)],
|
||||||
limit=1,
|
limit=1,
|
||||||
)
|
)
|
||||||
.report_action(self, data=data)
|
.report_action(partners, data=data)
|
||||||
)
|
)
|
||||||
|
|
||||||
def _export(self, report_type):
|
def _export(self, report_type):
|
||||||
|
|
|
@ -30,11 +30,12 @@ class DetailedActivityStatementWizard(models.TransientModel):
|
||||||
report_name = "p_s.report_detailed_activity_statement_xlsx"
|
report_name = "p_s.report_detailed_activity_statement_xlsx"
|
||||||
else:
|
else:
|
||||||
report_name = "partner_statement.detailed_activity_statement"
|
report_name = "partner_statement.detailed_activity_statement"
|
||||||
|
partners = self.env["res.partner"].browse(self._context["active_ids"])
|
||||||
return (
|
return (
|
||||||
self.env["ir.actions.report"]
|
self.env["ir.actions.report"]
|
||||||
.search(
|
.search(
|
||||||
[("report_name", "=", report_name), ("report_type", "=", report_type)],
|
[("report_name", "=", report_name), ("report_type", "=", report_type)],
|
||||||
limit=1,
|
limit=1,
|
||||||
)
|
)
|
||||||
.report_action(self, data=data)
|
.report_action(partners, data=data)
|
||||||
)
|
)
|
||||||
|
|
|
@ -27,13 +27,14 @@ class OutstandingStatementWizard(models.TransientModel):
|
||||||
report_name = "p_s.report_outstanding_statement_xlsx"
|
report_name = "p_s.report_outstanding_statement_xlsx"
|
||||||
else:
|
else:
|
||||||
report_name = "partner_statement.outstanding_statement"
|
report_name = "partner_statement.outstanding_statement"
|
||||||
|
partners = self.env["res.partner"].browse(self._context["active_ids"])
|
||||||
return (
|
return (
|
||||||
self.env["ir.actions.report"]
|
self.env["ir.actions.report"]
|
||||||
.search(
|
.search(
|
||||||
[("report_name", "=", report_name), ("report_type", "=", report_type)],
|
[("report_name", "=", report_name), ("report_type", "=", report_type)],
|
||||||
limit=1,
|
limit=1,
|
||||||
)
|
)
|
||||||
.report_action(self, data=data)
|
.report_action(partners, data=data)
|
||||||
)
|
)
|
||||||
|
|
||||||
def _export(self, report_type):
|
def _export(self, report_type):
|
||||||
|
|
Loading…
Reference in New Issue