[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

@@ -27,6 +27,7 @@ class TestActivityStatement(TransactionCase):
self.statement_model = self.env["report.partner_statement.activity_statement"]
self.wiz = self.env["activity.statement.wizard"]
self.report_name = "partner_statement.activity_statement"
self.report_name_xlsx = "p_s.report_activity_statement_xlsx"
self.report_title = "Activity Statement"
self.today = fields.Date.context_today(self.wiz)
@@ -65,6 +66,18 @@ class TestActivityStatement(TransactionCase):
"There was an error and the PDF report was not generated.",
)
statement_xlsx = wiz_id.button_export_xlsx()
self.assertDictContainsSubset(
{
"type": "ir.actions.report",
"report_name": self.report_name_xlsx,
"report_type": "xlsx",
},
statement_xlsx,
"There was an error and the PDF report was not generated.",
)
data = wiz_id._prepare_statement()
docids = data["partner_ids"]
report = self.statement_model._get_report_values(docids, data)