[14.0][FWD] partner_statement
- Added html and xlsx support for activity outgoing statement
This commit is contained in:
committed by
Miquel Raïch
parent
f3e1ac3b18
commit
17a596997a
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user