Joël, The module throws an exception if one inserts a user which an accoent in the name, for example Véronique.
File "/opt/openerp.bzr/server/bin/addons/c2c_contact_to_ldap/partner.py", line 125, in write self.updateLdapContact(id,vals,cr,uid,context) File "/opt/openerp.bzr/server/bin/addons/c2c_contact_to_ldap/partner.py", line 391, in updateLdapContact self.saveLdapContact(id,vals,cr,uid,context) File "/opt/openerp.bzr/server/bin/addons/c2c_contact_to_ldap/partner.py", line 373, in saveLdapContact contact_obj = self.mappLdapObject(id,vals,cr,uid,context) File "/opt/openerp.bzr/server/bin/addons/c2c_contact_to_ldap/partner.py", line 307, in mappLdapObject cn = vals['lastname'] +' '+ vals['firstname'] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128) Looking at the code, the error is here: if 'lastname' in keys and 'firstname' in keys \ and vals['firstname'] <> False \ and vals['lastname'] <> False: cn = vals['lastname'] +' '+ vals['firstname'] I had a similar problem with a script of my own. For that I wrote a little function t() and encapsulated all strings to print in that. ## Print accents in a string def t(string): if type(string) == unicode: return string.encode("latin1") return string Thendo something like: part_name = t(partner_obj.browse(cr,uid,vals['partner_id']).name) Hmm. Its not that simple though, Any suggestions? -------------------- m2f -------------------- -- http://www.openobject.com/forum/viewtopic.php?p=51993#51993 -------------------- m2f --------------------
_______________________________________________ Tinyerp-users mailing list http://tiny.be/mailman2/listinfo/tinyerp-users
