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

Example Automating emails

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

Go to Settings > Technical > Email > Templates.

Click Create and design your email template. Use placeholders like ${object.name} for the order number or ${object.partner_id.name} for the customer’s name.

Set Up Automated Actions:

Go to Settings > Technical > Automation > Scheduled Actions.

Create a new action with the following details:
Model: sale.order
Trigger: On Creation or On Update (depending on your workflow).
Action To Do: Execute Python Code.

Add below code to send the email automatically:

template = env.ref('your_module.email_template_order_confirmation')
for order in records:
    order.message_post_with_template(template.id)


Best Regards,
Nikhil T
Accurates
อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
มี.ค. 25
1503
0
มี.ค. 25
1202
3
ส.ค. 25
922
3
ก.ค. 25
374
2
ก.ค. 25
293