UnicodeEncodeError when merging pickings with special characters
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
BREMSKERL OpenObject Addons |
Fix Released
|
Medium
|
Marco Dieckhoff |
Bug Description
When trying to merge two pickings that have the character ü in the Notes, the following error is thrown.
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
File "/usr/lib/
result = openerp.
File "/usr/lib/
result = ExportService.
File "/usr/lib/
res = fn(db, uid, *params)
File "/usr/lib/
return f(self, dbname, *args, **kwargs)
File "/usr/lib/
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/usr/lib/
return getattr(object, method)(cr, uid, *args, **kw)
File "/usr/lib/
linenote += ", Notes: " + str(merge.note)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 16: ordinal not in range(128)
Apparently merge.note is in unicode, the conversion to ascii fails when it meets the non-ascii character ü.
My fix was to use tools.ustr instead of str(), see the attached patch for the wizzard. I am sure other parts of the addon are affected but unfortunately I do not have the time to look into it in depth.
I also saw that stock_merge_
Related branches
Changed in bremskerl-addons: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
assignee: | nobody → Marco Dieckhoff (dieck) |
Fix is released. Thank you for your contribution.