Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
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:||name of the report||Model:||module.table||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.
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/parser.py.
This is the code for parser.py I have used:
logger = logging.getLogger('report_aeroo')
from openerp.report import report_sxw
from openerp.report.report_sxw import 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)
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.
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 5/24/13, 7:33 AM|
|Seen: 1964 times|
|Last updated: 11/8/15, 10:18 PM|