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:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
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
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 1 24
|
1774 | ||
|
0
thg 5 21
|
1708 | ||
|
1
thg 3 24
|
2953 | ||
|
0
thg 8 24
|
1232 | ||
|
3
thg 6 25
|
2177 |