summaryrefslogtreecommitdiff
path: root/addons/document_ics/document.py
diff options
context:
space:
mode:
authorrpa (Open ERP) <rpa@tinyerp.com>2009-11-24 13:00:28 +0530
committerrpa (Open ERP) <rpa@tinyerp.com>2009-11-24 13:00:28 +0530
commitc87beca6f8a56d2edd6a27eded371cfdceb0b07b (patch)
tree06462c88c22ccaaacd6501349e05200eebfb74b5 /addons/document_ics/document.py
parentcfb529099677673a90ac86dc0deeda4a2decc6b7 (diff)
parentfc896c18e1770ef9d508a87393f2da06ddb8da0c (diff)
[Merge]: merge with trunk addons
bzr revid: rpa@tinyerp.com-20091124073028-ti0erem7cpnzd68r
Diffstat (limited to 'addons/document_ics/document.py')
-rw-r--r--addons/document_ics/document.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/document_ics/document.py b/addons/document_ics/document.py
index d2a68937821..bf32009f404 100644
--- a/addons/document_ics/document.py
+++ b/addons/document_ics/document.py
@@ -127,6 +127,7 @@ class document_directory_content(osv.osv):
event.add('last-modified').value = ics_datetime(perm[0]['write_date'][:19])
for field in node.content.ics_field_ids:
value = getattr(obj, field.field_id.name)
+ value = value and tools.ustr(value)
if (not value) and field.name=='uid':
value = 'OpenERP-%s_%s@%s' % (node.content.ics_object_id.model, str(obj.id), cr.dbname,)
obj_class.write(cr, uid, [obj.id], {field.field_id.name: value})
@@ -145,7 +146,7 @@ class document_directory_content(osv.osv):
else:
value = ics_datetime(value)
event.add(field.name).value = value
- s= StringIO.StringIO(cal.serialize().encode('utf8'))
+ s= StringIO.StringIO(cal.serialize())
s.name = node
cr.commit()
return s