← Back to team overview

openerp-india team mailing list archive

[Bug 1075906] Re: [6.1] Account Code field Unicode problem

 

*** This bug is a duplicate of bug 1029316 ***
    https://bugs.launchpad.net/bugs/1029316

Hello Jacara,

It will be merge in 6.1 soon.

Thanks

** Summary changed:

- Account Code field Unicode problem
+ [6.1] Account Code field Unicode problem

** This bug has been marked a duplicate of bug 1029316
   [Trunk/6.1.1] UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 8: ordinal not in range(128)

-- 
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:
  [6.1] 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


References