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

I have two models:

     *payslip (one2many relation to payslip_lines)

     *payslip_lines


I can use an email template and send with some data from payslip model, but ¿how can add them into same email as a table? I guess as context and loop in payslip_line mark in template like in qweb reports (?)

for instance:

Dear customer:

Here you have your current lines to pay:

Product
Color
Price
Product 1
white
1000
Product 2
black
800

Thank you.

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

HI,

You will get same idea in below app what you looking for , have a look 

https://apps.odoo.com/apps/modules/11.0/dev_payslip_mail/

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

If you want to use qweb as templating engine, you should try this module: https://www.odoo.com/apps/modules/10.0/email_template_qweb/

Otherwise you should create a Jinja2 table, see this for more information: https://stackoverflow.com/questions/43602294/how-to-print-table-using-jinja2-without-page-refresh

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
พ.ค. 19
2932
1
ก.พ. 18
2617
1
ส.ค. 17
7191
0
มี.ค. 21
2657
1
ธ.ค. 23
9170