diff --git a/__unported__/report_xls/static/src/img/icon.png b/__unported__/report_xls/static/src/img/icon.png deleted file mode 100644 index 44c5db163..000000000 Binary files a/__unported__/report_xls/static/src/img/icon.png and /dev/null differ diff --git a/__unported__/report_xls/__init__.py b/report_xls/__init__.py similarity index 99% rename from __unported__/report_xls/__init__.py rename to report_xls/__init__.py index 6142d4597..e100e7861 100644 --- a/__unported__/report_xls/__init__.py +++ b/report_xls/__init__.py @@ -22,5 +22,4 @@ from . import ir_report from . import report_xls - # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/__unported__/report_xls/__openerp__.py b/report_xls/__openerp__.py similarity index 99% rename from __unported__/report_xls/__openerp__.py rename to report_xls/__openerp__.py index e53584ffe..1ca25bbc2 100644 --- a/__unported__/report_xls/__openerp__.py +++ b/report_xls/__openerp__.py @@ -77,6 +77,6 @@ Excel reports in odoo. 'depends': ['base'], 'external_dependencies': {'python': ['xlwt']}, 'active': False, - 'installable': False, + 'installable': True, } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/report_xls/ir_report.py b/report_xls/ir_report.py new file mode 100644 index 000000000..f35e60690 --- /dev/null +++ b/report_xls/ir_report.py @@ -0,0 +1,36 @@ +# -*- 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 . +# +############################################################################## + +from openerp.osv import fields, orm + + +class ir_actions_report_xml(orm.Model): + _inherit = 'ir.actions.report.xml' + + def _check_selection_field_value(self, cr, uid, + field, value, context=None): + if field == 'report_type' and value == 'xls': + return + return super(ir_actions_report_xml, self)._check_selection_field_value( + cr, uid, field, value, context=context) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/__unported__/report_xls/report_xls.py b/report_xls/report_xls.py similarity index 100% rename from __unported__/report_xls/report_xls.py rename to report_xls/report_xls.py diff --git a/report_xls/static/description/help.png b/report_xls/static/description/help.png new file mode 100644 index 000000000..3e7338c8a Binary files /dev/null and b/report_xls/static/description/help.png differ diff --git a/report_xls/static/description/icon2.png b/report_xls/static/description/icon.png similarity index 100% rename from report_xls/static/description/icon2.png rename to report_xls/static/description/icon.png diff --git a/report_xls/static/description/index.html b/report_xls/static/description/index.html new file mode 100644 index 000000000..1cdf4263c --- /dev/null +++ b/report_xls/static/description/index.html @@ -0,0 +1,84 @@ +
+
+
+

Excel report engine

+
+
+
+ +
+
+
+

+

This module adds Excel export capabilities to the standard odoo reporting engine. +

+
+
+
+ +
+
+

Report development

+

+ In order to create an Excel report you can +

    +
  • define a report of type 'xls'
  • +
  • pass {'xls_export': 1} via the context to the report create method
  • +
+

+

+ The report_xls class contains a number of attributes and methods to facilitate the creation XLS reports in odoo. +

    +
  • + cell types +
    Supported cell types : text, number, boolean, date. +
  • +
+
    +
  • + cell styles +
    The predefined cell style definitions result in a consistent look and feel of the odoo Excel reports. +
  • +
+
    +
  • + cell formulas +
    Cell formulas can be easily added with the help of the rowcol_to_cell() function which you can import from the utils.py module. +
  • +
+
    +
  • + Excel templates +
    It is possible to define Excel templates which can be adapted by 'inherited' modules. +
    Download the account_move_line_report_xls module from http://apps.odoo.com as example. +
  • +
+
    +
  • + XLS with multiple sheets +
    Download the account_journal_report_xls module from http://apps.odoo.com as example. +
  • +
+

+
+
+ +
+
+
+

Development assistance

+
+
+
+
+
+
+
+
+

+

Contact info@noviat.com for help with the development of Excel reports in odoo. +

+
+
+
+ diff --git a/report_xls/static/description/open_receivables.png b/report_xls/static/description/open_receivables.png new file mode 100644 index 000000000..a00c3ba44 Binary files /dev/null and b/report_xls/static/description/open_receivables.png differ diff --git a/__unported__/report_xls/utils.py b/report_xls/utils.py similarity index 99% rename from __unported__/report_xls/utils.py rename to report_xls/utils.py index ad9887ea4..943daae7c 100644 --- a/__unported__/report_xls/utils.py +++ b/report_xls/utils.py @@ -48,5 +48,4 @@ def rowcol_to_cell(row, col, row_abs=False, col_abs=False): # Zero index to 1-index return col_abs + chr1 + chr2 + row_abs + str(row + 1) - # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: