diff options
| author | Raphael Collet <rco@openerp.com> | 2015-10-12 16:38:17 +0200 |
|---|---|---|
| committer | Raphael Collet <rco@openerp.com> | 2015-10-12 16:38:17 +0200 |
| commit | 8ea17a8cc9ca540adbd182e71e97ff8a5fc43794 (patch) | |
| tree | 1a0d7813782c29ab21266015f6befeec01f029b8 | |
| parent | f8b56e4f40b49436abbda006a0e77adfbe2ce72a (diff) | |
[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.
| -rw-r--r-- | openerp/osv/orm.py | 2 |
1 files changed, 1 insertions, 1 deletions
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): |
