[6.1] Account Code field Unicode problem

Bug #1075906 reported by Jacara
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
New
Undecided
Unassigned

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.

Revision history for this message
Amit Bhavsar (Open ERP) (amb-openerp) wrote :

Hello Jacara,

It will be merge in 6.1 soon.

Thanks

summary: - Account Code field Unicode problem
+ [6.1] Account Code field Unicode problem
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.