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 am trying to access the note field in mrp.routing.workcenter in a customized Production Order report but can't figure out how to use the repeatln() function. For reference, I am using the OpenOffice plugin to edit my reports and OpenERP v7.
Currently I am using the code
[[ repeatln(o.routing_id.workcenter_lines,'line3') ]]
right before a 2x1 table containing [[ line3.name ]] and [[ line3.note ]]. However this is not producing any results for me. Any idea why not? Can I not daisy chain to my 'note' field like I did there when working with repeatln()? Is it some sort of limitation with the OpenOffice plugin? Thanks!
You are using rml reports...
check the RML user guide and get to know how it works..
Basicly... repeatIn() is a function that uses iterates over objects ('o') wich contains other objects...
see sale order fro example, and rml file ( addons/sale/report/sale_order.rml )
... search for <pto> tag ( line109) you will find starting : [[repeatIn(objects,'o')]]
-> o is the sale_order object,
.... use any objects 'o' attributes ( o.name, o.patrner_id.name ... ) in report
... go down to line 241 -> [[ repeatIn(o.order_line,'line') ]]
-> here o.order_line is another iterable object nested in 'o' and parser iterates over it using name 'line'
... to get data from lines use line.name, line.qty etc...
hope this helps to understand meaning of repeatIn()
in your case...
you shoud probably triple-iterate...
and then use line.name , line.note
hope it helps
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/27/14, 7:13 PM|
|Seen: 1334 times|
|Last updated: 3/16/15, 8:10 AM|