From e410d7d7e7036a834dfca191a37a69124cc7379e Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Mon, 12 Oct 2015 16:42:56 +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/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/models.py b/openerp/models.py index 0b966bd2e36..f96bfae4954 100644 --- a/openerp/models.py +++ b/openerp/models.py @@ -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