From 8ea17a8cc9ca540adbd182e71e97ff8a5fc43794 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Mon, 12 Oct 2015 16:38:17 +0200 Subject: [PATCH] [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. --- openerp/osv/orm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index 06768fa578f..6258846e825 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -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):