diff --git a/account_move_line_report_xls/__init__.py b/account_move_line_report_xls/__init__.py index 0d4ee376..e2205ebc 100644 --- a/account_move_line_report_xls/__init__.py +++ b/account_move_line_report_xls/__init__.py @@ -21,8 +21,8 @@ ############################################################################## try: - from . import account_move_line - from . import report + import account_move_line + import report except ImportError: import logging logging.getLogger('openerp.module').\ diff --git a/account_move_line_report_xls/account_move_line.py b/account_move_line_report_xls/account_move_line.py index 67ffef00..8162e31a 100644 --- a/account_move_line_report_xls/account_move_line.py +++ b/account_move_line_report_xls/account_move_line.py @@ -20,14 +20,15 @@ # ############################################################################## -from openerp.osv import orm +from openerp import models, api -class account_move_line(orm.Model): +class account_move_line(models.Model): _inherit = 'account.move.line' # override list in custom module to add/drop columns or change order - def _report_xls_fields(self, cr, uid, context=None): + @api.multi + def _report_xls_fields(self): return [ 'move', 'name', 'date', 'journal', 'period', 'partner', 'account', 'date_maturity', 'debit', 'credit', 'balance', @@ -40,7 +41,8 @@ class account_move_line(orm.Model): ] # Change/Add Template entries - def _report_xls_template(self, cr, uid, context=None): + @api.multi + def _report_xls_template(self): """ Template updates, e.g. diff --git a/account_move_line_report_xls/report/__init__.py b/account_move_line_report_xls/report/__init__.py index 4938e74e..465c9b68 100644 --- a/account_move_line_report_xls/report/__init__.py +++ b/account_move_line_report_xls/report/__init__.py @@ -20,4 +20,4 @@ # ############################################################################## -from . import move_line_list_xls +import move_line_list_xls diff --git a/account_move_line_report_xls/report/move_line_list_xls.py b/account_move_line_report_xls/report/move_line_list_xls.py index 11c4a624..f2a960aa 100644 --- a/account_move_line_report_xls/report/move_line_list_xls.py +++ b/account_move_line_report_xls/report/move_line_list_xls.py @@ -134,9 +134,9 @@ class move_line_xls(report_xls): 'header': [1, 13, 'text', _render("_('Maturity Date')")], 'lines': [1, 0, - _render("line.date_maturity.val and 'date' or 'text'"), + _render("line.date_maturity and 'date' or 'text'"), _render( - "line.date_maturity.val \ + "line.date_maturity \ and datetime.strptime(line.date_maturity,'%Y-%m-%d') \ or None"), None, self.aml_cell_style_date],