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/account.py (+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: mp+123678@code.launchpad.net

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,

or

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.

Thanks.

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

Hello,

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.

Thanks,
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
=== modified file 'account/account.py'
--- account/account.py 2012-08-28 07:48:35 +0000
+++ account/account.py 2012-09-11 05:08:20 +0000
@@ -26,6 +26,7 @@
2626
27import netsvc27import netsvc
28import pooler28import pooler
29import tools
29from osv import fields, osv30from osv import fields, osv
30import decimal_precision as dp31import decimal_precision as dp
31from tools.translate import _32from tools.translate import _
@@ -223,7 +224,7 @@
223 while pos < len(args):224 while pos < len(args):
224225
225 if args[pos][0] == 'code' and args[pos][1] in ('like', 'ilike') and args[pos][2]:226 if args[pos][0] == 'code' and args[pos][1] in ('like', 'ilike') and args[pos][2]:
226 args[pos] = ('code', '=like', str(args[pos][2].replace('%', ''))+'%')227 args[pos] = ('code', '=like', tools.ustr(args[pos][2].replace('%', ''))+'%')
227 if args[pos][0] == 'journal_id':228 if args[pos][0] == 'journal_id':
228 if not args[pos][2]:229 if not args[pos][2]:
229 del args[pos]230 del args[pos]