summaryrefslogtreecommitdiff
path: root/bin/osv
diff options
context:
space:
mode:
authorFabien Pinckaers <fp@tinyerp.com>2010-06-12 18:49:35 +0200
committerFabien Pinckaers <fp@tinyerp.com>2010-06-12 18:49:35 +0200
commitfd1c8a5b83fab596d637c0ddf36b59f7fb09e78d (patch)
tree4ec77320e9bd82b9850de63cd671c58ac614118f /bin/osv
parentc32941433839a80414e1ec3b1eadb962267f4c1c (diff)
[FIX] null properties
bzr revid: fp@tinyerp.com-20100612164935-b1a3hx7ron32kwxk
Diffstat (limited to 'bin/osv')
-rw-r--r--bin/osv/fields.py2
-rw-r--r--bin/osv/osv.py3
2 files changed, 3 insertions, 2 deletions
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()