Odoo Help


OpenERP Report over multiple purchase orders using openoffice / libreoffice

Raza Ali
on 3/10/13, 1:31 PM 2,028 views

I was able to add a report record for object purchase.order. It shows up when I select and open a specific PO.

How do I print a report over multiple purchase orders, or multiple stock moves, or multiple sales orders etc.?

What do I specify in "object" (model) for the report record and where would this print menu show up?

(I am using aeroo reports engine and I was able to specify a <for each..> ... </for> loop but it only prints one record (which is the currently selected PO).




| 4 4 8
Ahmedabad, India

Odoo Expert

On 4/11/13, 7:07 AM

By creating a wizard in which you are able to select multiple Purchase Orders or stock moves or sales orders and can generate report accordingly otherwise it could be done by using search method in report.py file.By search method you can to find specific purchase orders or stock moves or sales orders.

I have a report working ok, when I add ... I get an error: except_orm: (u'Aeroo Reports: Error while generating the report.\nlist index out of range\nlist index out of range\nFor more reference inspect error logs.', (, Exception('Aeroo Reports: Error while generating the report.', IndexError('list index out of range',), 'list index out of range', 'For more reference inspect error logs.'), ))

Andres Brigard
on 10/28/15, 8:27 PM
Andres Brigard
On 11/8/15, 10:12 PM

I was finally able to do it by changing the parser file: This was the parser file that worked for me:

It prints the selected records as different rows in the same page.

from openerp.report import report_sxw
from openerp.report.report_sxw import rml_parse

class Parser(rml_parse):
def __init__(self, cr, uid, name, context):
super(self.__class__, self).__init__(cr, uid, name, context)

model = self.pool.get(context['active_model'])
ids = context['active_ids']
rows = model.browse(cr, uid, ids, context=context)
'rows': rows

The for sentence would be:

<for each="r in rows">
<r.field1> <r.field2> etc.

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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 3/10/13, 1:31 PM
Seen: 2028 times
Last updated: 11/8/15, 10:12 PM