in odoo 11 ,There is any way to send mail with dynamic body content and 'to_adrress' by conditinally.I need to send Mail to diffrent approavls with different content on each stage of my work flow.I need to send emai to users by python code
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- ลูกค้าสัมพันธ์
- e-Commerce
- ระบบบัญชี
- สินค้าคงคลัง
- PoS
- Project
- MRP
คำถามนี้ถูกตั้งค่าสถานะ
Please try like this.
vals = {
'subject': 'Foo',
'body_html': body,
'email_to': 'foo@example.com,bar@example.com',
'email_cc': 'qux@example.com',
'auto_delete': False,
'email_from': 'foobar@example.com',
}
mail_id = self.env['mail.mail'].sudo().create(vals)
mail_id.sudo().send()
create_values = {
'body_html': "your html body",
'subject': "your subject",
'email_from': your email from,
'recipient_ids': [(4, partner.id)]
}
mail = self.env['mail.mail'].create(create_values)
mail.send()
i used this code to send email without mail template in odoo 12
สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อRelated Posts | ตอบกลับ | มุมมอง | กิจกรรม | |
---|---|---|---|---|
|
2
ก.ค. 24
|
14257 | ||
|
1
ก.ค. 21
|
8469 | ||
|
0
เม.ย. 20
|
4969 | ||
|
1
พ.ค. 18
|
3240 | ||
|
0
เม.ย. 18
|
3743 |