[FIX] read() method returns None values incompatible with XML-RPC
authorsebalix <seb@usr-src.org>
Sun, 20 Jul 2014 11:31:50 +0000 (13:31 +0200)
committersebalix <seb@usr-src.org>
Sun, 20 Jul 2014 14:06:50 +0000 (16:06 +0200)
openerp/fields.py

index ff50f73..bb60911 100644 (file)
@@ -615,7 +615,7 @@ class Field(object):
         """ convert `value` from the cache to a value as returned by method
             :meth:`BaseModel.read`
         """
-        return value
+        return False if value is None else value
 
     def convert_to_write(self, value, target=None, fnames=None):
         """ convert `value` from the cache to a valid value for method