I want to repeat columns in a rml report using the method 'repeatIn' inside a tag -td- but didn't have success.
I need some help please.
For this in .py you need to have something like this:
emp_ids = self.pool.get('hr.employee').search(self.cr, self.uid, ) # or whatever criteria to get employee ids
for obj in self.pool.get('hr.employee').browse(self.cr, self.uid, emp_ids):
and in xml:
<para style="Your_style">[[ repeatIn(your_function_name(your_object_declared_above_using_repeatIn_if_any),'obj') ]]</para>
<blockTable colWidths = "100,100,100,100,100,100" style = "Your_style" >
<td> [[ obj['name'] ]]
Hope it helps!
Here is the answer.
First, i had to change the version of my OpenOffice which is v4.1.X.
Second, i used [[ repeatIn(get_employee_lines(example.company_id,example.date_start,example.date_end), 'o', 'td') ]] which Loop on every line and make a new table cell for each line.
So here is the right answer:
<para style="P8">NOM EMPLOYÉ</para>
<para style="P7">[[ repeatIn(get_employee_lines(example.company_id,example.date_start,example.date_end), 'o', 'td') ]]</para>
<para style="P7">[[ o['name'] ]]</para>
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 8/31/15, 7:12 AM|
|Seen: 468 times|
|Last updated: 9/3/15, 5:39 AM|