bzr revid: fp@tinyerp.com-20081220051944-hv3tujbwsirmk456
This commit is contained in:
Fabien Pinckaers 2008-12-20 06:19:44 +01:00
parent d67e5ca42f
commit e6ff374e97
2 changed files with 1 additions and 5 deletions

View File

@ -139,8 +139,6 @@ class base_module_record(osv.osv):
if not id:
field.setAttribute("model", fields[key]['relation'])
name = self.pool.get(fields[key]['relation']).browse(cr, uid, val).name
if isinstance(name, basestring):
name = name.decode('utf8')
field.setAttribute("search", "[('name','=','"+name+"')]")
else:
field.setAttribute("ref", id)
@ -184,8 +182,6 @@ class base_module_record(osv.osv):
val = str(val)
val = val and ('"""%s"""' % val.replace('\\', '\\\\').replace('"', '\"')) or 'False'
if isinstance(val, basestring):
val = val.decode('utf8')
field.setAttribute(u"eval", val)
record.appendChild(field)
return record_list, noupdate

View File

@ -120,7 +120,7 @@ class document_directory_content(osv.osv):
if type(value)==type(obj):
value=value.name
value = value or ''
event.add(field.name).value = value and value.decode('utf8') or ''
event.add(field.name).value = value or ''
elif ICS_TAGS[field.name]=='date':
dt = value or time.strftime('%Y-%m-%d %H:%M:%S')
if len(dt)==10: