Pedro M. Baeza
10 years ago
9 changed files with 182 additions and 40 deletions
-
1report_xls/__init__.py
-
30report_xls/__openerp__.py
-
36report_xls/ir_report.py
-
68report_xls/report_xls.py
-
BINreport_xls/static/description/help.png
-
0report_xls/static/description/icon.png
-
84report_xls/static/description/index.html
-
BINreport_xls/static/description/open_receivables.png
-
3report_xls/utils.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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################## |
||||
|
|
||||
|
from openerp.osv import 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: |
After Width: 300 | Height: 235 | Size: 30 KiB |
Before Width: 88 | Height: 85 | Size: 11 KiB After Width: 88 | Height: 85 | Size: 11 KiB |
@ -0,0 +1,84 @@ |
|||||
|
<section class="oe_container"> |
||||
|
<div class="oe_row oe_spaced"> |
||||
|
<div class="oe_span12"> |
||||
|
<h2 class="oe_slogan">Excel report engine</h2> |
||||
|
</div> |
||||
|
<div class="oe_span6"> |
||||
|
<div class="oe_demo oe_picture oe_screenshot"> |
||||
|
<img src="open_receivables.png"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="oe_span6"> |
||||
|
<p class="oe_mt32"> |
||||
|
<br><br>This module adds Excel export capabilities to the standard odoo reporting engine. |
||||
|
</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
|
||||
|
<section class="oe_spaced oe_container oe_dark"> |
||||
|
<div class="oe_row"> |
||||
|
<h2 class="oe_slogan">Report development</h2> |
||||
|
<p class="oe_mt32"> |
||||
|
In order to create an Excel report you can |
||||
|
<ul> |
||||
|
<li>define a report of type 'xls'</li> |
||||
|
<li>pass <code>{'xls_export': 1}</code> via the context to the report create method</li> |
||||
|
</ul> |
||||
|
</p> |
||||
|
<p class="oe_mt32"> |
||||
|
The <code>report_xls</code> class contains a number of attributes and methods to facilitate the creation XLS reports in odoo. |
||||
|
<ul> |
||||
|
<li> |
||||
|
cell types |
||||
|
<br>Supported cell types : text, number, boolean, date. |
||||
|
</li> |
||||
|
</ul> |
||||
|
<ul> |
||||
|
<li> |
||||
|
cell styles |
||||
|
<br>The predefined cell style definitions result in a consistent look and feel of the odoo Excel reports. |
||||
|
</li> |
||||
|
</ul> |
||||
|
<ul> |
||||
|
<li> |
||||
|
cell formulas |
||||
|
<br>Cell formulas can be easily added with the help of the <code>rowcol_to_cell()</code> function which you can import from the <code>utils.py</code> module. |
||||
|
</li> |
||||
|
</ul> |
||||
|
<ul> |
||||
|
<li> |
||||
|
Excel templates |
||||
|
<br>It is possible to define Excel templates which can be adapted by 'inherited' modules. |
||||
|
<br>Download the <b>account_move_line_report_xls</b> module from <a href="http://apps.odoo.com">http://apps.odoo.com</a> as example. |
||||
|
</li> |
||||
|
</ul> |
||||
|
<ul> |
||||
|
<li> |
||||
|
XLS with multiple sheets |
||||
|
<br>Download the <b>account_journal_report_xls</b> module from <a href="http://apps.odoo.com">http://apps.odoo.com</a> as example. |
||||
|
</li> |
||||
|
</ul> |
||||
|
</p> |
||||
|
</div> |
||||
|
</section> |
||||
|
|
||||
|
<section class="oe_container"> |
||||
|
<div class="oe_row oe_spaced"> |
||||
|
<div class="oe_span12"> |
||||
|
<h2 class="oe_slogan">Development assistance</h2> |
||||
|
</div> |
||||
|
<div class="oe_span6"> |
||||
|
<br> |
||||
|
<div class="oe_picture"> |
||||
|
<center><img src="help.png" height="150"></center> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="oe_span6"> |
||||
|
<p class="oe_mt32"> |
||||
|
<br><br>Contact <a href="mailto:info@noviat.com">info@noviat.com</a> for help with the development of Excel reports in odoo. |
||||
|
</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
|
After Width: 854 | Height: 507 | Size: 49 KiB |
Write
Preview
Loading…
Cancel
Save
Reference in new issue