diff --git a/__unported__/account_move_line_report_xls/__openerp__.py b/__unported__/account_move_line_report_xls/__openerp__.py deleted file mode 100644 index f343efbb..00000000 --- a/__unported__/account_move_line_report_xls/__openerp__.py +++ /dev/null @@ -1,74 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# -# Copyright (c) 2014 Noviat nv/sa (www.noviat.com). All rights reserved. -# -# 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 . -# -############################################################################## - -{ - 'name': 'Account Move Line XLS export', - 'version': '0.6', - 'license': 'AGPL-3', - 'author': 'Noviat', - 'category': 'Accounting & Finance', - 'description': """ -Journal Items Excel Export -========================== - -This module adds a button on the journal items ('account.move.line') list view -in order to export the selected lines. - -If you are installing this module manually, you need also the **report_xls** -module located in: -https://launchpad.net/openerp-reporting-engines - -Report customisation -'''''''''''''''''''' - -The Excel export can be tailored to your exact needs via the following methods -of the 'account.move.line' object: - -* **_report_xls_fields** - - Add/drop columns or change order from the list of columns that are defined - in the Excel template. - - The following fields are defined in the Excel template: - - move, name, date, journal, period, partner, account, - date_maturity, debit, credit, balance, - reconcile, reconcile_partial, analytic_account, - ref, partner_ref, tax_code, tax_amount, amount_residual, - amount_currency, currency_name, company_currency, - amount_residual_currency, product, product_ref', product_uom, quantity, - statement, invoice, narration, blocked - -* **_report_xls_template** - - Change/extend the Excel template. - -Customisation assistance -'''''''''''''''''''''''' -Contact info@noviat.com for help with the customisation and/or development -of Excel reports in OpenERP. - """, - 'depends': ['account', 'report_xls'], - 'data': [ - 'report/move_line_list_xls.xml', - ], -} diff --git a/account_move_line_report_xls/README.rst b/account_move_line_report_xls/README.rst new file mode 100644 index 00000000..804d92e5 --- /dev/null +++ b/account_move_line_report_xls/README.rst @@ -0,0 +1,66 @@ +Journal Items Excel Export +========================== + +This module extends the functionality of the journal items +('account.move.line') list view and allow you to export the selected lines. + +Installation +============ + +To install this module manually, you need also the **report_xls** +module located in: + +https://launchpad.net/openerp-reporting-engines + +Usage +===== + +To use this module, you need to: + +* go to the list view of the journal items +* select the line you wish to export +* click on the button on top to export + +The Excel export can be tailored to your exact needs via the following methods +of the 'account.move.line' object: + +* **_report_xls_fields** + + Add/drop columns or change order from the list of columns that are defined + in the Excel template. + + The following fields are defined in the Excel template: + + move, name, date, journal, period, partner, account, + date_maturity, debit, credit, balance, + reconcile, reconcile_partial, analytic_account, + ref, partner_ref, tax_code, tax_amount, amount_residual, + amount_currency, currency_name, company_currency, + amount_residual_currency, product, product_ref', product_uom, quantity, + statement, invoice, narration, blocked + +* **_report_xls_template** + + Change/extend the Excel template. + +Credits +======= + +Contributors +------------ +* Noviat +* Guillaume Auger + +Maintainer +---------- +.. image:: http://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: http://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +To contribute to this module, please visit http://odoo-community.org. diff --git a/__unported__/account_move_line_report_xls/__init__.py b/account_move_line_report_xls/__init__.py similarity index 100% rename from __unported__/account_move_line_report_xls/__init__.py rename to account_move_line_report_xls/__init__.py diff --git a/account_move_line_report_xls/__openerp__.py b/account_move_line_report_xls/__openerp__.py new file mode 100644 index 00000000..6df0d979 --- /dev/null +++ b/account_move_line_report_xls/__openerp__.py @@ -0,0 +1,33 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# +# Copyright (c) 2014 Noviat nv/sa (www.noviat.com). All rights reserved. +# +# 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 . +# +############################################################################## + +{ + 'name': 'Account Move Line XLS export', + 'version': '0.6', + 'license': 'AGPL-3', + 'author': 'Noviat', + 'category': 'Accounting & Finance', + 'depends': ['account', 'report_xls'], + 'data': [ + 'report/move_line_list_xls.xml', + ], +} diff --git a/__unported__/account_move_line_report_xls/account_move_line.py b/account_move_line_report_xls/account_move_line.py similarity index 91% rename from __unported__/account_move_line_report_xls/account_move_line.py rename to account_move_line_report_xls/account_move_line.py index 67ffef00..c13a74f9 100644 --- a/__unported__/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.model + 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.model + def _report_xls_template(self): """ Template updates, e.g. diff --git a/__unported__/account_move_line_report_xls/i18n/fr.po b/account_move_line_report_xls/i18n/fr.po similarity index 100% rename from __unported__/account_move_line_report_xls/i18n/fr.po rename to account_move_line_report_xls/i18n/fr.po diff --git a/__unported__/account_move_line_report_xls/i18n/nl.po b/account_move_line_report_xls/i18n/nl.po similarity index 100% rename from __unported__/account_move_line_report_xls/i18n/nl.po rename to account_move_line_report_xls/i18n/nl.po diff --git a/__unported__/account_move_line_report_xls/report/__init__.py b/account_move_line_report_xls/report/__init__.py similarity index 100% rename from __unported__/account_move_line_report_xls/report/__init__.py rename to account_move_line_report_xls/report/__init__.py diff --git a/__unported__/account_move_line_report_xls/report/move_line_list_xls.py b/account_move_line_report_xls/report/move_line_list_xls.py similarity index 98% rename from __unported__/account_move_line_report_xls/report/move_line_list_xls.py rename to account_move_line_report_xls/report/move_line_list_xls.py index 11c4a624..0bb4e496 100644 --- a/__unported__/account_move_line_report_xls/report/move_line_list_xls.py +++ b/account_move_line_report_xls/report/move_line_list_xls.py @@ -134,11 +134,11 @@ 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 \ - and datetime.strptime(line.date_maturity,'%Y-%m-%d') \ - or None"), + "line.date_maturity" + " and datetime.strptime(line.date_maturity,'%Y-%m-%d')" + " or None"), None, self.aml_cell_style_date], 'totals': [1, 0, 'text', None]}, 'debit': { diff --git a/__unported__/account_move_line_report_xls/report/move_line_list_xls.xml b/account_move_line_report_xls/report/move_line_list_xls.xml similarity index 100% rename from __unported__/account_move_line_report_xls/report/move_line_list_xls.xml rename to account_move_line_report_xls/report/move_line_list_xls.xml diff --git a/__unported__/account_move_line_report_xls/static/src/img/icon.png b/account_move_line_report_xls/static/src/img/icon.png similarity index 100% rename from __unported__/account_move_line_report_xls/static/src/img/icon.png rename to account_move_line_report_xls/static/src/img/icon.png