[FIX] orm: always save boolean function fields, even when they are false

Fixes #4292: searching for records when a related boolean field is `False`
always returns nothing.
This commit is contained in:
Raphael Collet 2015-10-12 16:42:56 +02:00
parent 19668013ad
commit e410d7d7e7
1 changed files with 1 additions and 1 deletions

View File

@ -2246,7 +2246,7 @@ class BaseModel(object):
# if val is a many2one, just write the ID
if type(val) == tuple:
val = val[0]
if val is not False:
if f._type == 'boolean' or val is not False:
cr.execute(update_query, (ss[1](val), key))
@api.model