summaryrefslogtreecommitdiff
path: root/addons/document/document.py
diff options
context:
space:
mode:
authorHarry (Open ERP) <hmo@tinyerp.com>2009-08-03 16:14:40 +0530
committerHarry (Open ERP) <hmo@tinyerp.com>2009-08-03 16:14:40 +0530
commit141b65107f30cd3570af532e88eece3e1302d9b2 (patch)
tree3ca0fb56c7251529ca1752ea3aaa1771510d6ba1 /addons/document/document.py
parenta305b1a2cac858e90a3fa6e052ff1dbcecd92bc6 (diff)
[FIX] document : create doc of any resource model with black name
lp bug: https://launchpad.net/bugs/404975 fixed bzr revid: hmo@tinyerp.com-20090803104440-y65u4102ym2e4m68
Diffstat (limited to 'addons/document/document.py')
-rw-r--r--addons/document/document.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/document/document.py b/addons/document/document.py
index 1a66145a9d8..5e9bc9039a8 100644
--- a/addons/document/document.py
+++ b/addons/document/document.py
@@ -667,7 +667,8 @@ class document_file(osv.osv):
result = obj_model.read(cr, uid, [vals['res_id']], context=context)
if len(result):
obj=result[0]
- vals['title'] = (obj.get('name',''))[:60]
+ if obj.get('name',False):
+ vals['title'] = (obj.get('name',''))[:60]
if obj_model._name=='res.partner':
vals['partner_id']=obj['id']
elif obj.get('address_id',False):