Add multiple headers for reporting

by
Odoo
v 6.0 Third Party 263
Download for v 6.0
Availability
Odoo Online
Odoo.sh
On Premise
Technical Name base_report_header
LicenseSee License tab
Websitehttp://www.openerp.net.cn
You bought this module and need support? Click here!

SUMMARY

This extension to Base module simply adds multi-header capabilities for reporting with a dedicated report header's table. Initially this module aims at adding extra landscape headers for external documents (in base module, only 3 headers are available in the company definition: 1 for external docs and 2 for internal), which is a problem if you have external reports both in portrait and landscape mode.

HOW IT WORKS

A specific table res_header stores the headers in rml format (same as in the company definition). To be filled in Administration/Reporting/Reporting Headers.

This module gives an example of wrapping the function to use the specific table. _add_header(self, rml_dom, header='external')

Check the report example given in the module to see how to add _add_header() function to your own reports. Once added, you will be able to create and use different header in the following function calls:

report_sxw.report_sxw('report.name', 'model.name', 'path_to_rml/report.rml', parser=parser_function, header='name_of_header)

On top of current headers ('internal', 'external' and 'internal landscape'), you can specify for 'header=' whatever header's name you created in the report header's table located in Administration/Reporting/Reporting Headers.

RESTRICTION

  • 'internal', 'external' and 'internal landscape' are OpenERP reserved name
  • You have to manually fill in the headers in the interface (2 default entries are added in the database though)

(an ready-to-use header example is given in the file l10n_cn_report_header_example.xml)

TODO

  • add multi-company capability
  • generate default entries for the table res_header.
Odoo Proprietary License v1.0

This software and associated files (the "Software") may only be used (executed,
modified, executed after modifications) if you have purchased a valid license
from the authors, typically via Odoo Apps, or if you have received a written
agreement from the authors of the Software (see the COPYRIGHT file).

You may develop Odoo modules that use the Software as a library (typically
by depending on it, importing it and using its resources), but without copying
any source code or material from the Software. You may distribute those
modules under the license of your choice, provided that this license is
compatible with the terms of the Odoo Proprietary License (For example:
LGPL, MIT, or proprietary licenses similar to this one).

It is forbidden to publish, distribute, sublicense, or sell copies of the Software
or modified copies of the Software.

The above copyright notice and this permission notice must be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.