Merge pull request #1284 from sebalix/8.0-fix-xmlrpc-marshall-none
authorRaphael Collet <rco@openerp.com>
Wed, 30 Jul 2014 13:05:03 +0000 (15:05 +0200)
committerRaphael Collet <rco@openerp.com>
Wed, 30 Jul 2014 13:05:03 +0000 (15:05 +0200)
[FIX] read() method returns None values instead of False, incompatible with XML-RPC

openerp/fields.py

index d4be79b..08270ae 100644 (file)
@@ -622,7 +622,7 @@ class Field(object):
                 be computed using :meth:`BaseModel.name_get`, if relevant
                 for the field
         """
-        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