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
لقد تم الإبلاغ عن هذا السؤال
2
الردود
5906
أدوات العرض
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
هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!
أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!
تسجيلالمنشورات ذات الصلة | الردود | أدوات العرض | النشاط | |
---|---|---|---|---|
|
2
يوليو 24
|
14259 | ||
|
1
يوليو 21
|
8473 | ||
|
0
أبريل 20
|
4970 | ||
|
1
مايو 18
|
3244 | ||
|
0
أبريل 18
|
3743 |