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.
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).
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 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
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)
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.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: 3/10/13, 1:31 PM|
|Seen: 1870 times|
|Last updated: 11/8/15, 10:12 PM|