[FIX] base: use datetime instead of date
The variable `date` is compared to the field `name` in the selection query. `name` is filled in with datetime data. In particular, in the module currency_rate_live, datetime.now() is used in the name. It is necessary to make an appropriate comparison to make sure we select the updated rate right away.
This commit is contained in:
@@ -20,7 +20,7 @@ class res_currency(osv.osv):
|
||||
context = {}
|
||||
res = {}
|
||||
|
||||
date = context.get('date') or time.strftime('%Y-%m-%d')
|
||||
date = context.get('date') or fields2.Datetime.now()
|
||||
company_id = context.get('company_id') or self.pool['res.users']._get_company(cr, uid, context=context)
|
||||
for id in ids:
|
||||
cr.execute("""SELECT rate FROM res_currency_rate
|
||||
|
||||
Reference in New Issue
Block a user