Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
4155 Zobrazení

 in create method i call function . if in case job is failed then how to resend it.

def create(self, cr, uid, ids, context=None):

      res = super(project, self).create(cr, uid, ids, context=context)

      time_now = datetime.now().strftime("%Y-%m-%d %H:%M:%S")

       nextcall = parser.parse(time_now) + timedelta(seconds=10)

       self.pool.get('ir.cron').create(cr, uid, {

       'name': 'This is Cron job',

      'user_id': uid,

      'model': 'project.project',

       'function': '_compute_project',

      'nextcall': nextcall,

      'args': repr([res])

})

return res

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
dub 23
2860
0
bře 15
5559
1
bře 15
5859
8
kvě 23
24486
0
kvě 21
3624