Odoo Help

0

How to add if condition in Report? [SOLVED]

By
dirtyHandsPHP
on 3/15/15, 4:42 AM 1,121 views

I am having a requirement to run a code on condition. For example in following code if employement type is 'Regular' I want to show the lines. Can anyone help me to acheve this?

Condition : [[o.employment_type_id.name == "Regular"]]
Code :  

<para style="terp_default_Bold_7">1. PURPOSE</para>
    <para style="terp_default_8_line">______

</para>    
    <para style="terp_default_8_line">
      <font color="white"> </font>
    </para>    
    <para style="terp_default_8">requirement for competent Professional with qualification and experience.</para>

0
dirtyHandsPHP
On 9/20/15, 8:58 AM

I found the answer for above problem:

<div t-if="o.employment_type_id.name == "Regular" class="col-xs-6">

    <para style="terp_default_Bold_7">1. PURPOSE</para>

    <para style="terp_default_8_line">______</para>

     <para style="terp_default_8_line">

            <font color="white"> </font>

    </para>

    <para style="terp_default_8">requirement for competent Professional with qualification and experience.</para>

</div>


1
Vasanth
On 3/16/15, 1:41 AM

Hi Shiv Modi,

Try this type:

<para style="terp_default_8">[[ repeatIn(objects,'o') ]]</para> 

<para style="terp_header"><b>Refund [[ (o.type=='out_refund' ]] [[ o.number ]]</b></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

Question tools

1 follower(s)

Stats

Asked: 3/15/15, 4:42 AM
Seen: 1121 times
Last updated: 9/20/15, 8:59 AM