Add multiple headers for reporting

by
Odoo          
v 6.0 Third Party 238
Download for 6.0 series
You bought this module and need support ? Click here !
Technical name base_report_header
LicenseAGPL-3
Websitehttp://www.openerp.net.cn
Repositoryhttps://github.com/Elico-Corp/odoo-addons.git#6.0

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.

Please log in to comment on this module

Please choose a rating from 1 to 5 for this module.