Odoo Help


How to use repeatln()

Alex Gallien
on 5/27/14, 7:13 PM 1,334 views

Hi guys,

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!




| 5 4 6
Zagreb | Karlovac, Croatia

there is only 10 kind of people the ones that understand binary ... and others

On 5/28/14, 5:03 AM

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 : 
-> 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... 

2. repeatIn(o.routing_id,'r')

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.


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

1 follower(s)


Asked: 5/27/14, 7:13 PM
Seen: 1334 times
Last updated: 3/16/15, 8:10 AM