From ad7c07875787ed2e5a4c60d9173741b9e75a9ba7 Mon Sep 17 00:00:00 2001 From: "Amit (OpenERP)" Date: Mon, 30 Jul 2012 15:00:20 +0530 Subject: [PATCH] [FIX] account : Fixed the unicode decode error on search of account.account object lp bug: https://launchpad.net/bugs/1029316 fixed bzr revid: amp@tinyerp.com-20120730093020-ujffkjldt1uuflip --- addons/account/account.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/account/account.py b/addons/account/account.py index cbba0237c78..412345e0bc0 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -30,6 +30,7 @@ from osv import fields, osv import decimal_precision as dp from tools.translate import _ from tools.float_utils import float_round +import tools _logger = logging.getLogger(__name__) @@ -225,7 +226,7 @@ class account_account(osv.osv): 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]