openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #17520
[Bug 1075906] [NEW] Account Code field Unicode problem
Public bug reported:
Hello
I have suggestion.
If I use some unicode test such as "АБ 1001" in account code field then i cannot search accounts by code field using unicode. Because there is a some searching logic on account model.
See addons/account/account.py line 226 on search method of account
object.
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('%', ''))+'%')
If i fix this on own local source like this:
args[pos] = ('code', '=like', u'%s%%' % args[pos][2].replace('%', ''))
So my problem solved.
I think this is BUG. If user shouldn't use unicode text on account code
field it must be handled by validation. Another word, openerp must be
protected for unicode texts on account code field !
If i miss understood let me know.
Thank you.
** Affects: openobject-addons
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1075906
Title:
Account Code field Unicode problem
Status in OpenERP Addons (modules):
New
Bug description:
Hello
I have suggestion.
If I use some unicode test such as "АБ 1001" in account code field then i cannot search accounts by code field using unicode. Because there is a some searching logic on account model.
See addons/account/account.py line 226 on search method of account
object.
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('%', ''))+'%')
If i fix this on own local source like this:
args[pos] = ('code', '=like', u'%s%%' % args[pos][2].replace('%', ''))
So my problem solved.
I think this is BUG. If user shouldn't use unicode text on account
code field it must be handled by validation. Another word, openerp
must be protected for unicode texts on account code field !
If i miss understood let me know.
Thank you.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1075906/+subscriptions
Follow ups
References