Odoo Help

Welcome!

This community 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.

0

How to realise Nested RepeatIn in RML

By
Drees Far
on 9/9/15, 7:04 AM 482 views

I am creating reports in OpenERP. And i work with RML. But now i am blocked and i need to work with nested repeatIn. I have tried this but it doesnt work.

RML:

<section>

<blockTable colwidths="150,100,100,100,100,100" style="Table1">

<tr>

<td>

<para style="P8">NOM EMPLOYÉ</para>

</td>

<td>

<para style="P7">[[ repeatIn(repeatIn(get_employee_lines(example.company_id,example.date_start,example.date_end), 'p'),'o') ]]</para>

<para style="P7">[[ o ]]</para>

</td>

</tr>

</blockTable>

I got this error.

2015-09-09 10:54:39,165 6414 ERROR openerp openerp.tools.safe_eval: Cannot eval "o[ p['name'] ]"

Traceback (most recent call last):

File "/opt/openerp/v7/server/openerp/tools/safe_eval.py", line 288, in safe_eval

return eval(test_expr(expr, _SAFE_OPCODES, mode=mode), globals_dict, locals_dict)

File "", line 1, in <module>

NameError: name 'p' is not defined

2015-09-09 10:54:39,166 6414 ERROR openerp openerp.tools.safe_eval: Cannot eval "o[ p['name'] ]"

Traceback (most recent call last):

File "/opt/openerp/v7/server/openerp/tools/safe_eval.py", line 288, in safe_eval

return eval(test_expr(expr, _SAFE_OPCODES, mode=mode), globals_dict, locals_dict)

File "", line 1, in <module>

NameError: name 'p' is not defined

2015-09-09 10:54:39,166 6414 ERROR openerp openerp.tools.safe_eval: Cannot eval "o[ p['name'] ]"

Traceback (most recent call last):

File "/opt/openerp/v7/server/openerp/tools/safe_eval.py", line 288, in safe_eval

return eval(test_expr(expr, _SAFE_OPCODES, mode=mode), globals_dict, locals_dict)

File "", line 1, in <module>

NameError: name 'p' is not defined

I dont know how and i didnt find any example. So, please who can help me. Thanks a lot in advance.

Regards. 

1

Drees Far

--Drees Far--
1130
| 5 2 6
Tunis, Tunisia
--Drees Far--
Drees Far
On 9/9/15, 7:56 AM

Hello everybody!!

Here is the answer:

<section>

<blockTable colwidths="150,100,100,100,100,100" style="Table1">

<tr>

<td>

<para style="P8">NOM EMPLOYÉ</para>

</td>

<td>

<para style="P7">[[ repeatIn(repeatIn(get_employee_lines(example.company_id,example.date_start,example.date_end), 'p', 'td'),'o') ]]</para>

<para style="P7">[[ repeatIn(o['p'], 'line', 'td') ]]</para>

<para style="P7">[[ line['name'] ]]</para>

</td>

</tr>

</blockTable>

</section>

Regards.

Your Answer

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

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 9/9/15, 7:04 AM
Seen: 482 times
Last updated: 9/9/15, 7:56 AM