diff --git a/account_move_line_start_end_dates_xls/__init__.py b/account_move_line_start_end_dates_xls/__init__.py index a4a72bd..0c1006d 100644 --- a/account_move_line_start_end_dates_xls/__init__.py +++ b/account_move_line_start_end_dates_xls/__init__.py @@ -1,23 +1,3 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Account Move Line Start End Dates XLS module for OpenERP -# Copyright (C) 2014 Akretion (http://www.akretion.com/) -# @author: Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## from . import account_move_line diff --git a/account_move_line_start_end_dates_xls/__openerp__.py b/account_move_line_start_end_dates_xls/__openerp__.py index 159c590..b246871 100644 --- a/account_move_line_start_end_dates_xls/__openerp__.py +++ b/account_move_line_start_end_dates_xls/__openerp__.py @@ -1,8 +1,8 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # -# Account Move Line Start End Dates XLS module for OpenERP -# Copyright (C) 2014 Akretion (http://www.akretion.com/) +# Account Move Line Start End Dates XLS module for Odoo +# Copyright (C) 2014-2016 Akretion (http://www.akretion.com/) # @author: Alexis de Lattre # # This program is free software: you can redistribute it and/or modify @@ -33,11 +33,12 @@ Account Move Line Start End Dates XLS This module adds *Start Date* and *End Date* in the XLS export of the account move lines. -Please contact Alexis de Lattre from Akretion for any help or question about this module. +This module has been written by Alexis de Lattre from Akretion +. """, 'author': 'Akretion', 'website': 'http://www.akretion.com/', 'depends': ['account_cutoff_prepaid', 'account_move_line_report_xls'], 'data': [], - 'installable': False, + 'installable': True, } diff --git a/account_move_line_start_end_dates_xls/account_move_line.py b/account_move_line_start_end_dates_xls/account_move_line.py index 53c38fa..c47f24d 100644 --- a/account_move_line_start_end_dates_xls/account_move_line.py +++ b/account_move_line_start_end_dates_xls/account_move_line.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- ############################################################################## # -# Account Move Line Start End Dates XLS module for OpenERP -# Copyright (C) 2014 Akretion (http://www.akretion.com/) +# Account Move Line Start End Dates XLS module for Odoo +# Copyright (C) 2014-2016 Akretion (http://www.akretion.com/) # @author: Alexis de Lattre # # This program is free software: you can redistribute it and/or modify @@ -21,17 +21,22 @@ ############################################################################## import xlwt -from openerp.osv import orm +from openerp import models, api from openerp.addons.report_xls.utils import _render from openerp.addons.report_xls.report_xls import report_xls -class account_move_line(orm.Model): +class AccountMoveLine(models.Model): _inherit = 'account.move.line' - def _report_xls_template(self, cr, uid, context=None): - res = super(account_move_line, self)._report_xls_template( - cr, uid, context=context) + @api.model + def _report_xls_fields(self): + res = super(AccountMoveLine, self)._report_xls_fields() + return res + ['start_date', 'end_date'] + + @api.model + def _report_xls_template(self): + res = super(AccountMoveLine, self)._report_xls_template() bc = '22' aml_cell_style_date = xlwt.easyxf( 'borders: left thin, right thin, top thin, bottom thin, '