currency_rate_update: fix wrong use of timetuple.

- remove error
"TypeError: argument must be 9-item sequence, not datetime.datetime"
This commit is contained in:
Mathieu Benoit
2014-07-15 14:44:39 -04:00
parent 509a5006c6
commit 1e7dbe9dbb

View File

@@ -119,13 +119,14 @@ class Currency_rate_update(osv.Model):
_name = "currency.rate.update"
_description = "Currency Rate Update"
# Dict that represent a cron object
nextcall_time = (datetime.today() + timedelta(days=1)).timetuple()
nextcall = time.strftime("%Y-%m-%d %H:%M:%S", nextcall_time)
cron = {
'active': False,
'priority': 1,
'interval_number': 1,
'interval_type': 'weeks',
'nextcall': time.strftime("%Y-%m-%d %H:%M:%S",
datetime.today() + timedelta(days=1)).timetuple(),
'nextcall': nextcall,
'numbercall': -1,
'doall': True,
'model': 'currency.rate.update',