[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
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user