parent
d67e5ca42f
commit
e6ff374e97
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue