[Erp5-users] DOC: how to add a report
Bartłomiej Górny
bartek at redpoint.mn.pl
Fri Jan 20 13:52:03 CET 2006
Seb, another one for your doc collection:
How to add a report
====================
v 0.1, 2006-01-20
This describes a process of adding a report to the report dialog - how
to actually create the report, is another story. We assume it is going
to be an accounting report, but it works the same way for other modules
(I think).
1. Add an entry to the "Report select" dropdown
Go to portal_types -> Accounting Transaction Module -> Actions.
Add an action - give it a name and an id, assign an action (for
consistency, the name should be like:
string:${object_url}/AccountingTransactionModule_view<my_new_report>ReportDialog
Set Permission to View, Category to object_report.
Your report will now appear in the dropdown.
2. Create a dialog
The report dialog is an ERP5 Form - the best way is to copy one of the
stock report dialogs and customize for your needs. An
important thing is that if the report is going to be an ERP5Form
printout, the dialog has to have a hidden field "my_portal
_skin", defaulting to "Print"; if the report is a ERP5 PDF Form or ERP5
PDF Template, it is not needed.
In the dialog's settings, its Page Template has to be form_dialog, and
its action is the report.
For consistency, name the report
"AccountingTransactionModule_view<my_new_report>Report.
Bartek
--
"Software is largely a service industry operating under the persistent
but unfounded delusion that it is a manufacturing industry."
Eric S.Raymond, "The Magic Cauldron"
More information about the Erp5-users
mailing list