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 add if condition in Report? [SOLVED]

By
dirtyHandsPHP
on 3/15/15, 4:42 AM 799 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

--Vasanth--
3458
| 5 3 8
Pondicherry, India
--Vasanth--
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>

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: 3/15/15, 4:42 AM
Seen: 799 times
Last updated: 9/20/15, 8:59 AM