Revert 3dec090
"[FIX] ir_values: fallback when no condition"
An ir.value without condition should not match when searching with a condition. When a field with change_default on it is modified, the method get_defaults is called with the new value. This means that manually modifying a field with this trigger would put back the default value (opw 611193).
This commit is contained in:
parent
3fe508f200
commit
cd013aa09a
|
@ -310,10 +310,10 @@ class ir_values(osv.osv):
|
|||
(SELECT company_id from res_users where id = %%s)
|
||||
)
|
||||
%s
|
||||
ORDER BY v.user_id, u.company_id, v.key2"""
|
||||
ORDER BY v.user_id, u.company_id"""
|
||||
params = ('default', model, uid, uid)
|
||||
if condition:
|
||||
query %= 'AND (v.key2 = %s OR v.key2 IS NULL)'
|
||||
query %= 'AND v.key2 = %s'
|
||||
params += (condition[:200],)
|
||||
else:
|
||||
query %= 'AND v.key2 is NULL'
|
||||
|
|
Loading…
Reference in New Issue