[FIX] null properties
bzr revid: fp@tinyerp.com-20100612164935-b1a3hx7ron32kwxk
This commit is contained in:
+1
-1
@@ -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')
|
||||
|
||||
+2
-1
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user