تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
9474 أدوات العرض

Hi,

my code snippet looks like this:

<div>
    <p t-if="record.user_id and record.user_id.signature">
    t-raw="record.user_id.signature"</p>
    <p t-else="">just the company name</p>
/div>

So what I'm trying to do inside Odoo V12:
If the user has a signature, this signature should be used ( if condition).
If the user don't have a signature, just the company name should be used (else condition). 

But I'm not able that the record.user_id.signature will be "rendered", it will just be displayed as normal text.

How can I solve this?

Thanks.

الصورة الرمزية
إهمال
أفضل إجابة

Hi,

You are getting record.user_id.signature as normal text because you haven't added

< div>
     < p t-if="record.user_id and >" rel="ugc">record.user_id.signature">>
         < t  t-raw="" rel="ugc">record.user_id.signature"/>
      < /p>
      < p t-else="">
          just the company name
      < /p>
< /div>

Regards

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
6
مايو 24
110602
4
مايو 24
7045
1
يوليو 23
2274
3
يونيو 23
3123
4
يونيو 22
4800