[FIX] base: cherry-pick 55fa0912 to 8.0
Backported to 8.0 following report at #12648 [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. Fixes #12648
This commit is contained in:
parent
c3dd308913
commit
2c19e9be96
|
@ -44,7 +44,7 @@ class res_currency(osv.osv):
|
||||||
context = {}
|
context = {}
|
||||||
res = {}
|
res = {}
|
||||||
|
|
||||||
date = context.get('date') or time.strftime('%Y-%m-%d')
|
date = context.get('date') or fields2.Datetime.now()
|
||||||
for id in ids:
|
for id in ids:
|
||||||
cr.execute('SELECT rate FROM res_currency_rate '
|
cr.execute('SELECT rate FROM res_currency_rate '
|
||||||
'WHERE currency_id = %s '
|
'WHERE currency_id = %s '
|
||||||
|
|
Loading…
Reference in New Issue