diff --git a/addons/point_of_sale/report/account_statement.py b/addons/point_of_sale/report/account_statement.py index 391adb7569f..dc492651bb2 100644 --- a/addons/point_of_sale/report/account_statement.py +++ b/addons/point_of_sale/report/account_statement.py @@ -31,10 +31,21 @@ class account_statement(report_sxw.rml_parse): self.localcontext.update({ 'time': time, 'get_total':self._get_total, + 'get_data':self._get_data, }) + + def _get_data(self, statement): + lines = [] + for line in statement.line_ids: + lines.append(line) + + return lines + def _get_total(self, statement_line_ids): total = 0.0 for line in statement_line_ids: total += line.amount return total + report_sxw.report_sxw('report.account.statement', 'account.bank.statement', 'addons/statement/report/account_statement.rml', parser=account_statement,header='internal') + diff --git a/addons/point_of_sale/report/account_statement.rml b/addons/point_of_sale/report/account_statement.rml index e4c3b99b6ee..ed26143aa4e 100644 --- a/addons/point_of_sale/report/account_statement.rml +++ b/addons/point_of_sale/report/account_statement.rml @@ -216,10 +216,10 @@ [[ formatLang(statement.closing_date,date=True) ]] - [[ formatLang(statement.balance_start) ]][[ company.currency_id.symbol ]] + [[ formatLang(statement.balance_start, digits=get_digits(dp='Account')) ]][[ company.currency_id.symbol ]] - [[ formatLang(statement.balance_end_real) ]][[ company.currency_id.symbol ]] + [[ formatLang(statement.balance_end_real, digits=get_digits(dp='Account')) ]][[ company.currency_id.symbol ]] @@ -247,13 +247,14 @@ [[ repeatIn(statement.line_ids,'line_ids') and ' ' or removeParentNode('blockTable') ]] [[ repeatIn(get_data(statement), 'line_ids')]] - [[ line_ids.name ]] + + [[ line_ids['name'] ]] [[ line_ids.partner_id.name ]] - [[ formatLang(line_ids.amount) ]][[ company.currency_id.symbol ]] + [[ formatLang(line_ids.amount, digits=get_digits(dp='Account')) ]][[ company.currency_id.symbol ]] @@ -268,7 +269,7 @@ Total : - [[ formatLang(get_total(statement.line_ids)) ]][[ company.currency_id.symbol ]] + [[ formatLang(get_total(statement.line_ids), digits=get_digits(dp='Account')) ]][[ company.currency_id.symbol ]] @@ -282,4 +283,4 @@ - \ No newline at end of file +