i'm using odoo 11 and i want to send an email notification when a stage is changed in the model hr.applicant to the followers . Any idea for help please ?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
Hi Dhouha:
There are 2 ways to do this.
Option 1 - Turn "Tracking" on for the Stage field
Option 2 - Define an automated action to send the email if the value of the Stage field changes on an update of the record
Thanks for your answer i try to add track_visibility='always' to the field stage_id in the model hr.applicant but it doesn't send an email when the stage_id is changed
Set track_visibility='onchange'
for this you first set the mail configuration.
it is done in settings > technical > outgoing mail services > create
here you can set the mail configuration.
for example,
in case of gmail:
use
smtp server = smtp.gmail.com
port = 465
connection securty = SSL/TLS
username = your gmail user name
password = your gmail password
Then Please add this code in the action which changes the state (stage).
body = "Dear,
Type your content"
mail_values = {
'email_to': partner.email,
'subject': subject,
'body_html': body,
'state': 'outgoing',
'type': 'email',
}
mail_id = mail.mail.create(mail_values)
mail_id.send()
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
2
thg 7 24
|
3088 | ||
|
1
thg 6 24
|
5487 | ||
|
1
thg 10 23
|
11355 | ||
|
1
thg 10 23
|
98 | ||
413 Request Entity Too Large
Đã xử lý
|
|
1
thg 8 23
|
2194 |
Idea of send email on button click, you can modify according to your need: https://goo.gl/z16PBZ