[14.0][FWD] partner_statement

- Added html and xlsx support for activity outgoing statement
This commit is contained in:
Christopher Ormaza
2021-11-29 16:08:24 -05:00
committed by Miquel Raïch
parent f3e1ac3b18
commit 17a596997a
13 changed files with 619 additions and 21 deletions

View File

@@ -50,10 +50,6 @@ class StatementCommon(models.AbstractModel):
else:
self.date_end = fields.Date.context_today(self)
def button_export_pdf(self):
self.ensure_one()
return self._export()
def _prepare_statement(self):
self.ensure_one()
return {
@@ -67,5 +63,17 @@ class StatementCommon(models.AbstractModel):
"filter_negative_balances": self.filter_negative_balances,
}
def _export(self):
raise NotImplementedError
def button_export_html(self):
self.ensure_one()
report_type = "qweb-html"
return self._export(report_type)
def button_export_pdf(self):
self.ensure_one()
report_type = "qweb-pdf"
return self._export(report_type)
def button_export_xlsx(self):
self.ensure_one()
report_type = "xlsx"
return self._export(report_type)