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.

1

How to use DocIf and DocElse in rml report?

By
Stephen Raj
on 5/12/14, 2:38 AM 1,445 views

Hi,

I want to set new template in rml according to the condition. I tried the below code but not succeeded yet.

Code:

<docAssign var='n' expr='5'/>
<docIf cond='n>5'>
  <setNextTemplate name="sec"/>
  <includePdfPages filename="Sales Order.pdf" />
  <nextFrame/>

<docElse/>
  <para style="terp_default_8"> </para>
</docIf>

Please help me to set the template.

Thank you.

0
Aitor Bouzas
On 12/26/14, 6:24 AM

Hi Stephen,

I'm facing the same problem... It seems that conditional formatting is not yet implemented in OpenERP's RML processing. It's explained in this thread I just found out, conditional formatting must be done other way. Check it out: https://www.odoo.com/forum/help-1/question/reportlab-conditional-table-header-15143

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

0 follower(s)

Stats

Asked: 5/12/14, 2:38 AM
Seen: 1445 times
Last updated: 3/16/15, 8:10 AM