diff --git a/bin/osv/fields.py b/bin/osv/fields.py index f7b0b29abd3..fa7f90d003f 100644 --- a/bin/osv/fields.py +++ b/bin/osv/fields.py @@ -885,7 +885,7 @@ class property(function): default_value = prop.get_by_id(cr, uid, ids, context=context) if isinstance(default_value, browse_record): return default_value.id - return default_value + return default_value or False def _get_by_id(self, obj, cr, uid, prop_name, ids, context=None): prop = obj.pool.get('ir.property') diff --git a/bin/osv/osv.py b/bin/osv/osv.py index 5f583b894c9..7f39d5261aa 100644 --- a/bin/osv/osv.py +++ b/bin/osv/osv.py @@ -131,8 +131,9 @@ class osv_pool(netsvc.Service): if method.startswith('_'): raise except_osv('Access Denied', 'Private methods (such as %s) cannot be called remotely.' % (method,)) res = pool.execute_cr(cr, uid, obj, method, *args, **kw) + print 'Got RES', res if res is None: - self.logger.warning('The method %s of the object %s can not return `None` at the moment!', method, obj ) + self.logger.warning('The method %s of the object %s can not return `None` !', method, obj) cr.commit() except Exception: cr.rollback()