Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
4154 Widoki

 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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
kwi 23
2860
0
mar 15
5559
1
mar 15
5857
8
maj 23
24485
0
maj 21
3624