Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
5777 Näkymät

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

Avatar
Hylkää
Paras vastaus

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

Avatar
Hylkää
Tekijä

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

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
huhtik. 23
2768
0
maalisk. 15
5492
0
toukok. 21
3518
2
huhtik. 20
15616
4
maalisk. 19
16191