From ea6635cc0f0510d156f5a062aed34883b145dac5 Mon Sep 17 00:00:00 2001 From: Guillaume Auger Date: Tue, 27 Jan 2015 16:44:29 -0500 Subject: [PATCH 1/7] Port account_move_line_report_xls: moving files --- .../__init__.py | 0 .../__openerp__.py | 0 .../account_move_line.py | 0 .../i18n/fr.po | 0 .../i18n/nl.po | 0 .../report/__init__.py | 0 .../report/move_line_list_xls.py | 0 .../report/move_line_list_xls.xml | 0 .../static/src/img/icon.png | Bin 9 files changed, 0 insertions(+), 0 deletions(-) rename {__unported__/account_move_line_report_xls => account_move_line_report_xls}/__init__.py (100%) rename {__unported__/account_move_line_report_xls => account_move_line_report_xls}/__openerp__.py (100%) rename {__unported__/account_move_line_report_xls => account_move_line_report_xls}/account_move_line.py (100%) rename {__unported__/account_move_line_report_xls => account_move_line_report_xls}/i18n/fr.po (100%) rename {__unported__/account_move_line_report_xls => account_move_line_report_xls}/i18n/nl.po (100%) rename {__unported__/account_move_line_report_xls => account_move_line_report_xls}/report/__init__.py (100%) rename {__unported__/account_move_line_report_xls => account_move_line_report_xls}/report/move_line_list_xls.py (100%) rename {__unported__/account_move_line_report_xls => account_move_line_report_xls}/report/move_line_list_xls.xml (100%) rename {__unported__/account_move_line_report_xls => account_move_line_report_xls}/static/src/img/icon.png (100%) 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/__unported__/account_move_line_report_xls/__openerp__.py b/account_move_line_report_xls/__openerp__.py similarity index 100% rename from __unported__/account_move_line_report_xls/__openerp__.py rename to account_move_line_report_xls/__openerp__.py 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 100% rename from __unported__/account_move_line_report_xls/account_move_line.py rename to account_move_line_report_xls/account_move_line.py 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 100% 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 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 From 3422b554dcc59a547624f29b2282db69df722e8d Mon Sep 17 00:00:00 2001 From: Guillaume Auger Date: Wed, 28 Jan 2015 14:31:02 -0500 Subject: [PATCH 2/7] Port account_move_line_report_xls: V8 API --- account_move_line_report_xls/__init__.py | 4 ++-- account_move_line_report_xls/account_move_line.py | 10 ++++++---- account_move_line_report_xls/report/__init__.py | 2 +- .../report/move_line_list_xls.py | 4 ++-- 4 files changed, 11 insertions(+), 9 deletions(-) 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], From 46622551bdb14600340dff578eb6120c83338e18 Mon Sep 17 00:00:00 2001 From: Guillaume Auger Date: Thu, 29 Jan 2015 09:36:47 -0500 Subject: [PATCH 3/7] Some improvement --- account_move_line_report_xls/__init__.py | 4 ++-- account_move_line_report_xls/account_move_line.py | 4 ++-- account_move_line_report_xls/report/__init__.py | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/account_move_line_report_xls/__init__.py b/account_move_line_report_xls/__init__.py index e2205ebc..0d4ee376 100644 --- a/account_move_line_report_xls/__init__.py +++ b/account_move_line_report_xls/__init__.py @@ -21,8 +21,8 @@ ############################################################################## try: - import account_move_line - import report + from . import account_move_line + from . 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 8162e31a..c13a74f9 100644 --- a/account_move_line_report_xls/account_move_line.py +++ b/account_move_line_report_xls/account_move_line.py @@ -27,7 +27,7 @@ class account_move_line(models.Model): _inherit = 'account.move.line' # override list in custom module to add/drop columns or change order - @api.multi + @api.model def _report_xls_fields(self): return [ 'move', 'name', 'date', 'journal', 'period', 'partner', 'account', @@ -41,7 +41,7 @@ class account_move_line(models.Model): ] # Change/Add Template entries - @api.multi + @api.model 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 465c9b68..395e361c 100644 --- a/account_move_line_report_xls/report/__init__.py +++ b/account_move_line_report_xls/report/__init__.py @@ -20,4 +20,5 @@ # ############################################################################## -import move_line_list_xls +from . import move_line_list_xls + From c602b249f4bcd4c852af9b5d9e7f6efac9815629 Mon Sep 17 00:00:00 2001 From: Guillaume Auger Date: Fri, 30 Jan 2015 10:05:08 -0500 Subject: [PATCH 4/7] Small refacts --- account_move_line_report_xls/report/__init__.py | 1 - account_move_line_report_xls/report/move_line_list_xls.py | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/account_move_line_report_xls/report/__init__.py b/account_move_line_report_xls/report/__init__.py index 395e361c..4938e74e 100644 --- a/account_move_line_report_xls/report/__init__.py +++ b/account_move_line_report_xls/report/__init__.py @@ -21,4 +21,3 @@ ############################################################################## from . 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 f2a960aa..0bb4e496 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 @@ -136,9 +136,9 @@ class move_line_xls(report_xls): [1, 0, _render("line.date_maturity and 'date' or 'text'"), _render( - "line.date_maturity \ - 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': { From 3f6d228b00864bad7b6ea517a7c347f4798d5e59 Mon Sep 17 00:00:00 2001 From: Guillaume Auger Date: Thu, 5 Feb 2015 10:47:56 -0500 Subject: [PATCH 5/7] [IMP] Add README.rst to account_move_line_repost_xls --- account_move_line_report_xls/README.rst | 40 ++++++++++++++++++++ account_move_line_report_xls/__openerp__.py | 41 --------------------- 2 files changed, 40 insertions(+), 41 deletions(-) create mode 100644 account_move_line_report_xls/README.rst diff --git a/account_move_line_report_xls/README.rst b/account_move_line_report_xls/README.rst new file mode 100644 index 00000000..1536a51e --- /dev/null +++ b/account_move_line_report_xls/README.rst @@ -0,0 +1,40 @@ +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. + diff --git a/account_move_line_report_xls/__openerp__.py b/account_move_line_report_xls/__openerp__.py index f343efbb..6df0d979 100644 --- a/account_move_line_report_xls/__openerp__.py +++ b/account_move_line_report_xls/__openerp__.py @@ -26,47 +26,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', From 9d9645cbc8c798b2faf68d640050d9536a0b0924 Mon Sep 17 00:00:00 2001 From: Guillaume Auger Date: Fri, 6 Feb 2015 09:58:51 -0500 Subject: [PATCH 6/7] [IMP] Using the template for the README --- account_move_line_report_xls/README.rst | 33 +++++++++++++++++++------ 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/account_move_line_report_xls/README.rst b/account_move_line_report_xls/README.rst index 1536a51e..d7bd9c6b 100644 --- a/account_move_line_report_xls/README.rst +++ b/account_move_line_report_xls/README.rst @@ -1,15 +1,25 @@ 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. +This module extends the functionality of the journal items +('account.move.line') list view and allow you to export the selected lines. -If you are installing this module manually, you need also the **report_xls** +Installation +============ + +To install this module manually, you need also the **report_xls** module located in: + https://launchpad.net/openerp-reporting-engines -Report customisation -'''''''''''''''''''' +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: @@ -33,8 +43,15 @@ of the 'account.move.line' object: Change/extend the Excel template. -Customisation assistance -'''''''''''''''''''''''' +Credits +======= + +Contributors +------------ +* Guillaume Auger + +Maintainer +---------- Contact info@noviat.com for help with the customisation and/or development -of Excel reports in OpenERP. +of Excel reports in Odoo. From 3c594293f1f7597526425fb5b3b5a3fb0e7a1e0d Mon Sep 17 00:00:00 2001 From: Guillaume Auger Date: Fri, 6 Feb 2015 10:49:01 -0500 Subject: [PATCH 7/7] [FIX] Correcting account_move_line_report_xls README --- account_move_line_report_xls/README.rst | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/account_move_line_report_xls/README.rst b/account_move_line_report_xls/README.rst index d7bd9c6b..804d92e5 100644 --- a/account_move_line_report_xls/README.rst +++ b/account_move_line_report_xls/README.rst @@ -48,10 +48,19 @@ Credits Contributors ------------ +* Noviat * Guillaume Auger Maintainer ---------- -Contact info@noviat.com for help with the customisation and/or development -of Excel reports in Odoo. +.. 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.