Merge lp:~openerp-dev/openobject-addons/6.1-opw-579018-rgo into lp:openobject-addons/6.1

Proposed by Ravi Gohil (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-579018-rgo
Merge into: lp:openobject-addons/6.1
Diff against target: 20 lines (+2/-1)
1 file modified
account/ (+2/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-579018-rgo
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email:

Description of the change

Steps to reproduce issue(From Web-Client):

1) Install account module and create a new record for Customer Invoice,
2) Copy this accent character `ü`(or any accent character) and paste in `Account` field, then press `space` and type any character,


Go to Accounting/Configuration/Financial Accounts/Accounts/Accounts and fed `ü` in code then press `space` and type any character and press search,

A traceback will be thrown saying `UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 0: ordinal not in range(128)`.

This fix fixes this issue, kindly review it.


To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :


This bug was qualified as Already Fixed on Trunk (means that it was already fixed and merged in Trunk). If this Merge Proposal could not be merged in v6.1 at the release of v7.0, it will be closed.

Naresh Soni

Unmerged revisions

6984. By Ravi Gohil (OpenERP)

[FIX] account: Fixed 'UnicodeEncodeError' faced from web-client when searched for a account whose code has accent characters : (Maintenance Case : 579018)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/'
2--- account/ 2012-08-28 07:48:35 +0000
3+++ account/ 2012-09-11 05:08:20 +0000
4@@ -26,6 +26,7 @@
6 import netsvc
7 import pooler
8+import tools
9 from osv import fields, osv
10 import decimal_precision as dp
11 from tools.translate import _
12@@ -223,7 +224,7 @@
13 while pos < len(args):
15 if args[pos][0] == 'code' and args[pos][1] in ('like', 'ilike') and args[pos][2]:
16- args[pos] = ('code', '=like', str(args[pos][2].replace('%', ''))+'%')
17+ args[pos] = ('code', '=like', tools.ustr(args[pos][2].replace('%', ''))+'%')
18 if args[pos][0] == 'journal_id':
19 if not args[pos][2]:
20 del args[pos]