Ravi Gohil (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.1-opw-579018-rgo into 
lp:openobject-addons/6.1.

Requested reviews:
  Naresh(OpenERP) (nch-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-579018-rgo/+merge/123678

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 `ü` 
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.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-579018-rgo/+merge/123678
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.1-opw-579018-rgo.
=== 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 @@
 
 import netsvc
 import pooler
+import tools
 from osv import fields, osv
 import decimal_precision as dp
 from tools.translate import _
@@ -223,7 +224,7 @@
         while pos < len(args):
 
             if args[pos][0] == 'code' and args[pos][1] in ('like', 'ilike') and args[pos][2]:
-                args[pos] = ('code', '=like', str(args[pos][2].replace('%', ''))+'%')
+                args[pos] = ('code', '=like', tools.ustr(args[pos][2].replace('%', ''))+'%')
             if args[pos][0] == 'journal_id':
                 if not args[pos][2]:
                     del args[pos]

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to