[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

@@ -26,6 +26,7 @@ class TestOutstandingStatement(TransactionCase):
]
self.wiz = self.env["outstanding.statement.wizard"]
self.report_name = "partner_statement.outstanding_statement"
self.report_name_xlsx = "p_s.report_outstanding_statement_xlsx"
self.report_title = "Outstanding Statement"
def _create_user(self, login, groups, company):
@@ -61,6 +62,18 @@ class TestOutstandingStatement(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)