[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:38:17 +02:00
parent f8b56e4f40
commit 8ea17a8cc9
1 changed files with 1 additions and 1 deletions

View File

@ -2883,7 +2883,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))
def _check_selection_field_value(self, cr, uid, field, value, context=None):