diff options
| author | Harry (Open ERP) <hmo@tinyerp.com> | 2009-07-01 14:26:13 +0530 |
|---|---|---|
| committer | Harry (Open ERP) <hmo@tinyerp.com> | 2009-07-01 14:26:13 +0530 |
| commit | 26aca254b99bae2fdff67bc2cd67494797f83ccc (patch) | |
| tree | b71caa81325360dceeca82ad833c1d154cff2664 /addons | |
| parent | 0e728b69f6128e76cfdfe8fcb7f22f4cd5de7127 (diff) | |
[FIX] file attachment bug in x_object
bzr revid: hmo@tinyerp.com-20090701085613-uiuufqoix2ldo8o8
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/document/document.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/document/document.py b/addons/document/document.py index 0d33efc5a1c..d5b61cae1f4 100644 --- a/addons/document/document.py +++ b/addons/document/document.py @@ -196,7 +196,7 @@ class node_class(object): else: for r in res: - if not r.name: + if not len(obj.fields_get(self.cr, self.uid, ['name'])): r.name = name_for+'%d'%r.id for invalid in INVALID_CHARS: if r.name.find(invalid) : @@ -648,7 +648,7 @@ 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['name'] or '')[:60] + vals['title'] = (obj.get('name',''))[:60] if obj_model._name=='res.partner': vals['partner_id']=obj['id'] elif obj.get('address_id',False): |
