how to create aeroo report template

iam newbie to openerp . Currently iam working on aeroo reports. i gone through several videos & tutorials but doesnt helped me. can you please help me out creating aeroo reports.

1 Answer
Andres Brigard
Best Answer

Hi I am far from being an expert. But I will try to help you:

1) Aeroo Report report definition: 

Once you have installed the aeroo reports module you go to Configuration -> Technical -> Aeroo Reports -> Reports -> Create Report

2) Fill the fields as I show below:

name of the report
Template Name:
any name

In  Generic tab -> Template: Mime-type and Output Mime-type select the appropriate options: pdf, odt, etc.

Template Source: File and in Template path: template of the file and filename something like:  operations/report/PrintReport.odt. It is the relative path to the Add ons path. The other fields I leave them blank.

Advanced tab:

Process Separately ( ) and Active (x)

State of Parser : File and in Parser location : the path and name of the python file, in my case: operations/report/

This is the code for I have used:

import logging
logger = logging.getLogger('report_aeroo')

from import report_sxw
from import rml_parse

class Parser(rml_parse):
def __init__(self, cr, uid, name, context):
super(self.__class__, self).__init__(cr, uid, name, context)
# extra code to be able to iterate over selected rows
model = self.pool.get(context['active_model'])
ids = context['active_ids']
rows = model.browse(cr, uid, ids, context=context)
'rows': rows

Maybe you can select Definition in State of Parser and the code that comes is the same without the from definitions.

3) The you create an odt file with Libre/Open Office. Following the instructions in this video.

4) Try the report:

Go to the button (More) and press the option Test the report. Then a wizard pops up asking for an ID. If you do not know the ID you can export some records of the table using the export option to Excel and the first column is the ID. You can use this number.

5) Create the report entry in the Print Button:

Goto the More Button and select Add Print Button. Reload the browser window and the report should show up.

Tell me if that works. Good luck.