c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #30110
[Bug 817684] Re: caldav try to store unicode string as binary
** Changed in: openobject-addons
Importance: Undecided => Wishlist
** Changed in: openobject-addons
Status: New => Confirmed
** Changed in: openobject-addons
Assignee: (unassigned) => OpenERP R&D Addons Team 1 (openerp-dev-addons1)
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/817684
Title:
caldav try to store unicode string as binary
Status in OpenERP Modules (addons):
Confirmed
Bug description:
Caldav cant import ical files with attach tag with strings values.
Caldav load the value as unicode and try to convert it to binary. It's
invalid by:
http://psycopg.lighthouseapp.com/projects/62710/tickets/51-typeerror-
cant-escape-unicode-to-binary-writing-unicode-into-bytea
Solution:
In addons/caldav/calendar.py append the following lines:
if 'attach' in map_val and isinstance(map_val['attach'], unicode):
map_val['attach'] = map_val['attach'].encode('utf8')
after the lines:
if field_type == 'many2one':
id = None
if not map_val or not isinstance(map_val, dict):
vals[field] = id
continue
model = obj.__attribute__[map_dict].get('object', False)
modobj = obj.pool.get(model)
and before:
key1 = map_val.keys()
value1 = map_val.values()
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/817684/+subscriptions
References