I am trying to create an automated action, when I craete an activity I want to send an email a month before the deadline, now I am testing it and put 1 day only and it didn't work
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- ลูกค้าสัมพันธ์
- e-Commerce
- ระบบบัญชี
- สินค้าคงคลัง
- PoS
- Project
- MRP
คำถามนี้ถูกตั้งค่าสถานะ
You would be better creating a Scheduled Action, but this will require some python knowledge. You run it every day at 1:00 am for example and it would look something like this:
acts = env['mail.activity'].search([()])
for a in acts:
check_date = a.deadline_date - datetime.timedelta(months=1)
if check_date == datetime.datetime.now().date():
body = """text ""
vals = {
'subject' : '',
'email_from' : '',
'email_to' : '',
'body_html' : body
}
env['mail.mail'].sudo().create(vals)
I have standered Odoo I can't use code
สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อRelated Posts | ตอบกลับ | มุมมอง | กิจกรรม | |
---|---|---|---|---|
|
2
ม.ค. 24
|
1419 | ||
|
0
พ.ค. 21
|
1542 | ||
|
1
มี.ค. 24
|
2462 | ||
|
0
ส.ค. 24
|
969 | ||
|
1
เม.ย. 25
|
1629 |