From 1e7dbe9dbbc56deea0defd3452011b1731064ec6 Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Tue, 15 Jul 2014 14:44:39 -0400 Subject: [PATCH] currency_rate_update: fix wrong use of timetuple. - remove error "TypeError: argument must be 9-item sequence, not datetime.datetime" --- currency_rate_update/currency_rate_update.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/currency_rate_update/currency_rate_update.py b/currency_rate_update/currency_rate_update.py index 4f9bc8808..1b22de90c 100644 --- a/currency_rate_update/currency_rate_update.py +++ b/currency_rate_update/currency_rate_update.py @@ -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',