Your first report
This is tutorial on how to create the most basic report and add it to the system - the transcript of the process. I will try to keep it as brief as possible, explaining only those parts which would not make it too complicated.
How to create a new report template
- Open OpenOffice.org Writer program;
- Insert Placeholder Text field from menu “Insert/Fields/Other...”;
- In “Placeholder” field write “objects.name”;
- Press “Insert” button;
- Save report template to accessible place on your local hard disk;
How to add report to a system
- .Start up OpenERP Client program;
- Open menu “Administration/Low Level Objects/Actions/Report Xml”
- Create new record, by pressing the “New” button;
- Fill the fields:
- Name – this will be the name for report shown on print button. For example “My Sample Report”
- Object – object name for which the print button will be shown. For example “res.partner”
- Internal Name – must be unique name of this report in system. Although it could be generated randomly, you would prefer to give it meaningful name like “partner.sample.report”.
- Report Type – must be left as it is “ir.actions.report.xml”
- Type – you may choose from two options supported by this reporting engine. “OpenOffice - odt/ods output” creates “*.odt” or “*.ods” OpenOffice.org editable files, depending on the format of your template, but “OpenOffice - pdf output” creates “*.pdf” files.
- Template Content – Here you upload your report template file. Browse for the file created in earlier steps.
- Now, when you have registered report in system, you need to assign it to the the print button(s) in client program. For user convenience, we have developed special wizard for that. Click button “Add Print Button” located next to the form;
- If you want standard behavior, press “Ok” button, without altering checkboxes. Checkbox “Add print button” is checked by default, it means that this report will be connected to client program default print button and addition print button on sidebar will be created as well. If you want to change advanced options after assignment, you would check the “Open added action” checkbox, this will open action connection object.
Note: Reports are registered in system on the fly, so you do not need to restart the server, still, you may need to reload object, if view has been opened before report registration.