modifs
authorFabien Pinckaers <fp@tinyerp.com>
Sat, 20 Dec 2008 05:19:44 +0000 (06:19 +0100)
committerFabien Pinckaers <fp@tinyerp.com>
Sat, 20 Dec 2008 05:19:44 +0000 (06:19 +0100)
bzr revid: fp@tinyerp.com-20081220051944-hv3tujbwsirmk456

addons/base_module_record/base_module_record.py
addons/document_ics/document.py

index 34c72f9..b0d1dbe 100644 (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
index 627edc4..2e9ffcd 100644 (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: