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 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>
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: 8/31/15, 7:12 AM|
|Seen: 772 times|
|Last updated: 9/3/15, 5:39 AM|