Browse Source

Merge pull request #55 from JehoG/PORT-account_move_line_report_xls

Migration of account-move-line-report-xls to V8
pull/59/head
Yannick Vaucher 10 years ago
parent
commit
eaabd60b04
  1. 74
      __unported__/account_move_line_report_xls/__openerp__.py
  2. 66
      account_move_line_report_xls/README.rst
  3. 0
      account_move_line_report_xls/__init__.py
  4. 33
      account_move_line_report_xls/__openerp__.py
  5. 10
      account_move_line_report_xls/account_move_line.py
  6. 0
      account_move_line_report_xls/i18n/fr.po
  7. 0
      account_move_line_report_xls/i18n/nl.po
  8. 0
      account_move_line_report_xls/report/__init__.py
  9. 8
      account_move_line_report_xls/report/move_line_list_xls.py
  10. 0
      account_move_line_report_xls/report/move_line_list_xls.xml
  11. 0
      account_move_line_report_xls/static/src/img/icon.png

74
__unported__/account_move_line_report_xls/__openerp__.py

@ -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 <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'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',
],
}

66
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 <info@noviat.com>
* Guillaume Auger <guillaume.auger@savoirfairelinux.com>
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.

0
__unported__/account_move_line_report_xls/__init__.py → account_move_line_report_xls/__init__.py

33
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 <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'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',
],
}

10
__unported__/account_move_line_report_xls/account_move_line.py → 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' _inherit = 'account.move.line'
# override list in custom module to add/drop columns or change order # 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 [ return [
'move', 'name', 'date', 'journal', 'period', 'partner', 'account', 'move', 'name', 'date', 'journal', 'period', 'partner', 'account',
'date_maturity', 'debit', 'credit', 'balance', 'date_maturity', 'debit', 'credit', 'balance',
@ -40,7 +41,8 @@ class account_move_line(orm.Model):
] ]
# Change/Add Template entries # Change/Add Template entries
def _report_xls_template(self, cr, uid, context=None):
@api.model
def _report_xls_template(self):
""" """
Template updates, e.g. Template updates, e.g.

0
__unported__/account_move_line_report_xls/i18n/fr.po → account_move_line_report_xls/i18n/fr.po

0
__unported__/account_move_line_report_xls/i18n/nl.po → account_move_line_report_xls/i18n/nl.po

0
__unported__/account_move_line_report_xls/report/__init__.py → account_move_line_report_xls/report/__init__.py

8
__unported__/account_move_line_report_xls/report/move_line_list_xls.py → 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')")], 'header': [1, 13, 'text', _render("_('Maturity Date')")],
'lines': 'lines':
[1, 0, [1, 0,
_render("line.date_maturity.val and 'date' or 'text'"),
_render("line.date_maturity and 'date' or 'text'"),
_render( _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], None, self.aml_cell_style_date],
'totals': [1, 0, 'text', None]}, 'totals': [1, 0, 'text', None]},
'debit': { 'debit': {

0
__unported__/account_move_line_report_xls/report/move_line_list_xls.xml → account_move_line_report_xls/report/move_line_list_xls.xml

0
__unported__/account_move_line_report_xls/static/src/img/icon.png → account_move_line_report_xls/static/src/img/icon.png

Before

Width: 88  |  Height: 85  |  Size: 11 KiB

After

Width: 88  |  Height: 85  |  Size: 11 KiB

Loading…
Cancel
Save