跳至內容
選單
此問題已被標幟
817 瀏覽次數

Hello everybody,

I'm working to dynamically create an email template to be sent to a lead, on the base of some tags. I'm using the following code:


TRUE

FALSE



but it seems that the variable is not set, as if the condition in t-value is not correctly written: in fact, whatever is the condition on the lead record (true or false), I always get written FALSE. 

Is there anyone familiar with similar situations who can advise me on how can I correctly evaluate if the tag field contains specific items?

Thank you very much for your time.

Best regards

Max

頭像
捨棄
作者

I'm desolated to have realized just now that part of the code I pasted went missing. My apologies.

this is the full code I wanted to refer to:

<t t-set="new_customer" t-value="object.tag_ids in [1960]" data-oe-t-inline="true"></t>

<t t-if="object.tag_ids in [1960]" data-oe-t-group="0" data-oe-t-selectable="true" data-oe-t-group-active="true" data-oe-t-inline="true"><p>TRUE</p></t>

<t t-else="" data-oe-t-selectable="true" data-oe-t-group="0" data-oe-t-inline="true"><p>FALSE</p></t>