← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 638815] Re: Unicode attributes support

 

** Changed in: magentoerpconnect
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/638815

Title:
  Unicode attributes support

Status in Magento Open ERP Connector:
  Fix Released

Bug description:
  Hello,

  I issued a bug with attribute's names which contain unicode chars.

  The referential synchronisation works well, but the following error
  appears when I go to Menu Product -> Product and choose an attribute
  set view :

  x_magerp_zdbx_betonnieres_long_câble_electrique_m
  [2010-09-15 11:22:45,079] ERROR:web-services:[01]:
  [2010-09-15 11:22:45,080] ERROR:web-services:[02]: Environment Information :
  [2010-09-15 11:22:45,080] ERROR:web-services:[03]: System : Linux-2.6.32-24-generic-pae-i686-with-Ubuntu-10.04-lucid
  [2010-09-15 11:22:45,080] ERROR:web-services:[04]: OS Name : posix
  [2010-09-15 11:22:45,080] ERROR:web-services:[05]: Distributor ID:	Ubuntu
  [2010-09-15 11:22:45,080] ERROR:web-services:[06]: Description:	Ubuntu 10.04.1 LTS
  [2010-09-15 11:22:45,081] ERROR:web-services:[07]: Release:	10.04
  [2010-09-15 11:22:45,081] ERROR:web-services:[08]: Codename:	lucid
  [2010-09-15 11:22:45,081] ERROR:web-services:[09]: Operating System Release : 2.6.32-24-generic-pae
  [2010-09-15 11:22:45,081] ERROR:web-services:[10]: Operating System Version : #42-Ubuntu SMP Fri Aug 20 15:37:22 UTC 2010
  [2010-09-15 11:22:45,081] ERROR:web-services:[11]: Operating System Architecture : 32bit
  [2010-09-15 11:22:45,082] ERROR:web-services:[12]: Operating System Locale : en_US.UTF8
  [2010-09-15 11:22:45,082] ERROR:web-services:[13]: Python Version : 2.6.5
  [2010-09-15 11:22:45,082] ERROR:web-services:[14]: OpenERP-Server Version : 5.0.12
  [2010-09-15 11:22:45,082] ERROR:web-services:[15]: Last revision No. & ID : 1802 guewen.baconnier@xxxxxxxxxxxxxx-20100906091830-x25dxkx4rzee78f0
  [2010-09-15 11:22:45,082] ERROR:web-services:[16]:
  [2010-09-15 11:22:45,082] ERROR:web-services:[17]: Traceback (most recent call last):
  [2010-09-15 11:22:45,083] ERROR:web-services:[18]:   File "/home/gbaconnier/Code/moa-instances/openerp/src/server/bin/osv/osv.py", line 58, in wrapper
  [2010-09-15 11:22:45,083] ERROR:web-services:[19]:     return f(self, dbname, *args, **kwargs)
  [2010-09-15 11:22:45,083] ERROR:web-services:[20]:   File "/home/gbaconnier/Code/moa-instances/openerp/src/server/bin/osv/osv.py", line 119, in execute
  [2010-09-15 11:22:45,083] ERROR:web-services:[21]:     res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  [2010-09-15 11:22:45,083] ERROR:web-services:[22]:   File "/home/gbaconnier/Code/moa-instances/openerp/src/server/bin/osv/osv.py", line 111, in execute_cr
  [2010-09-15 11:22:45,083] ERROR:web-services:[23]:     return getattr(object, method)(cr, uid, *args, **kw)
  [2010-09-15 11:22:45,084] ERROR:web-services:[24]:   File "/home/gbaconnier/Code/moa-instances/openerp/src/server/bin/addons/magentoerpconnect/product.py", line 780, in fields_view_get
  [2010-09-15 11:22:45,084] ERROR:web-services:[25]:     if str(field.name).startswith('x_'):
  [2010-09-15 11:22:45,084] ERROR:web-services:[26]: UnicodeEncodeError: 'ascii' codec can't encode character u'\xe2' in position 32: ordinal not in range(128)

  I replaced the "str" by an "unicode" and it worked.
  In our case, it's a low priority issue because we'll just avoid to have unicode chars in attribute's names.

  Thanks
  Guewen