Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
5953 มุมมอง

I'm creating cron method for auto scheduling for passport expiry date. My concept is when expire date is over, that employee name and expire date will send to administrator's mail id. I got employee name and expiry date and I updated in mail.mail form, values all are come there. But I can't click automatically send button to Send a Mail.

Thanks and regards Sridharan G

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

I am sending mail via a scheduler job.

Create a scheduler definition xml file. Look for "ir_cron_scheduler_action" in the code for an example.

In the model definition py file create a function "run_scheduler" def run_scheduler(self, cr, uid, automatic=False, use_new_cursor=False, context=None): # Create mail body etc. Then call: mail_obj.schedule_with_attach(params)

Hope this helps

อวตาร
ละทิ้ง
ผู้เขียน

Thanks for Reply, tried another method it is working fine, now i able to send automatic mail, when date is expire.

Related Posts ตอบกลับ มุมมอง กิจกรรม
2
เม.ย. 23
2940
0
มี.ค. 15
5661
0
พ.ค. 21
3724
Scheduled Actions Not Running แก้ไขแล้ว
2
เม.ย. 20
15867
4
มี.ค. 19
16394