From bc0c3579be0813f106843d4d54faac9f91fb32fd Mon Sep 17 00:00:00 2001 From: Vipul Bhatt Date: Tue, 19 Apr 2016 17:24:36 +0530 Subject: [PATCH] [IMP] point_of_sale: remove custom account_statement report model There's no point to it, as we can easily do what we need directly in the report. --- addons/point_of_sale/report/__init__.py | 1 - .../point_of_sale/report/account_statement.py | 38 ------------------- .../point_of_sale/views/report_statement.xml | 6 +-- 3 files changed, 1 insertion(+), 44 deletions(-) delete mode 100644 addons/point_of_sale/report/account_statement.py diff --git a/addons/point_of_sale/report/__init__.py b/addons/point_of_sale/report/__init__.py index 3de0210b9f0..33f207d9d1a 100644 --- a/addons/point_of_sale/report/__init__.py +++ b/addons/point_of_sale/report/__init__.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. -import account_statement import pos_invoice import pos_order_report import pos_receipt diff --git a/addons/point_of_sale/report/account_statement.py b/addons/point_of_sale/report/account_statement.py deleted file mode 100644 index 1d255ce82ef..00000000000 --- a/addons/point_of_sale/report/account_statement.py +++ /dev/null @@ -1,38 +0,0 @@ -# -*- coding: utf-8 -*- -# Part of Odoo. See LICENSE file for full copyright and licensing details. - -import time -from openerp.osv import osv -from openerp.report import report_sxw - - -class account_statement(report_sxw.rml_parse): - - def __init__(self, cr, uid, name, context): - super(account_statement, self).__init__(cr, uid, name, context=context) - self.total = 0.0 - 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 - - -class report_account_statement(osv.AbstractModel): - _name = 'report.point_of_sale.report_statement' - _inherit = 'report.abstract_report' - _template = 'point_of_sale.report_statement' - _wrapped_report_class = account_statement diff --git a/addons/point_of_sale/views/report_statement.xml b/addons/point_of_sale/views/report_statement.xml index 6b5010d133a..bc4cc70b473 100644 --- a/addons/point_of_sale/views/report_statement.xml +++ b/addons/point_of_sale/views/report_statement.xml @@ -32,10 +32,6 @@ Opening Date:
-
Starting Balance:
@@ -71,7 +67,7 @@ - +
Total