Merge pull request #55 from JehoG/PORT-account_move_line_report_xls
Migration of account-move-line-report-xls to V8pull/59/head
commit
eaabd60b04
|
@ -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',
|
|
||||||
],
|
|
||||||
}
|
|
|
@ -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,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',
|
||||||
|
],
|
||||||
|
}
|
|
@ -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.
|
||||||
|
|
|
@ -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 \
|
"line.date_maturity"
|
||||||
and datetime.strptime(line.date_maturity,'%Y-%m-%d') \
|
" and datetime.strptime(line.date_maturity,'%Y-%m-%d')"
|
||||||
or None"),
|
" 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': {
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Loading…
Reference in New Issue