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

I am trying to find the list of objects to be used in my emails templates.

I have create a new text field in my Stock.Transfer Model (Outbound Delivery) called "x_recylingcode". I am trying to to find how to call this field in my email templates.


I went to Settings -> Technical -> Database Structure -> Fields

I search for x_recylingcode. and found that the Model is "Transfer".

I have tried different options to display the value in my email like: 

${object.transfer.x_recylingcode}, ${object.x_recylingcode}, ${object.stock.transfer.x_recylingcode}, 

None of them return me the value of the the field.

Can anyone explain how to find the name of the object to be used in my emails ? 

Thanks,
Dan

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

Got it ! Thanks

I found my issue. As i had different languages, i used a email template from a different language where i inserted the code. 

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hello Dan Witting,

First, you must verify which model_id is used in the mail template.Is the same object in which the "x_recylingcode" field is defined.

Please fine the example in comment 


Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari

อวตาร
ละทิ้ง

If yes then use the below syntax for accessing the field:
odoo-15: {{object.x_recylingcode}}
odoo-14 : ${object.x_recylingcode}

If no then use the relational field to access the field like below:
odoo-15 : {{object.<relational_Field_name>.x_recylingcode}}
odoo-14 : ${object.<relational_Field_name>.x_recylingcode}

Related Posts ตอบกลับ มุมมอง กิจกรรม
3
พ.ค. 25
1862
1
เม.ย. 25
1386
0
ก.พ. 25
1140
1
ธ.ค. 24
2768
one2one relational field แก้ไขแล้ว
3
ก.ย. 24
14362