Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
2694 มุมมอง

Hello,

We are migrating from version 14 to version 15 and were wondering how to create SMS templates which use nested if statements in version 15?

Here is an example of version 14 SMS template code we wish to convert to version 15.


% if ctx['delivery_order'].name == 'WH/OUT/00001':
    % if ctx['delivery_order'].state == 'done':
        TEXT A
    % else:
        TEXT B
อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

You can try the below:

{{ (text_A if ctx['delivery_order'].state == 'done' else text_B) if ctx['delivery_order'].name == 'WH/OUT/00001' else ''}}

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ก.ย. 22
4200
odoo15 email format suddenly wrong แก้ไขแล้ว
1
ธ.ค. 22
2451
1
พ.ย. 22
2357
0
ต.ค. 22
1820
0
เม.ย. 23
3039