Chris Biersbach (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/6.0-opw-578969-cbi into
lp:openobject-addons/6.0.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-578969-cbi/+merge/127648
To reproduce this issue, try to send invitations via the module survey.
On non-english-locale systems, this will cause a Traceback with a
UnicodeDecodeError.
The cause of this is the function string.letters, called when generating the
password.
This return only a-z,A-Z in english locale but also special characters in other
locale.
The solution was to replace it with a call to string.ascii_letters, which
always return a-z,A-Z.
I also removed some unused code that has been there for a long time (2010) and
was never used since, so it is not needed anymore. I figured that it was some
old debugging code that was not removed.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-578969-cbi/+merge/127648
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.0-opw-578969-cbi.
=== modified file 'survey/wizard/survey_send_invitation.py'
--- survey/wizard/survey_send_invitation.py 2011-01-14 00:11:01 +0000
+++ survey/wizard/survey_send_invitation.py 2012-10-03 06:40:27 +0000
@@ -56,7 +56,7 @@
}
def genpasswd(self):
- chars = string.letters + string.digits
+ chars = string.ascii_letters + string.digits
return ''.join([choice(chars) for i in range(6)])
def default_get(self, cr, uid, fields_list, context=None):
@@ -110,7 +110,6 @@
act_id = self.pool.get('ir.actions.act_window')
act_id = act_id.search(cr, uid, [('res_model', '=' , 'survey.name.wiz'), \
('view_type', '=', 'form')])
- out = "login,password\n"
skipped = 0
existing = ""
created = ""
@@ -168,7 +167,6 @@
(user_email.name, user_email.login, user_email.password)
continue
passwd= self.genpasswd()
- out+= addr.email + ',' + passwd + '\n'
mail= record['mail'] % {'login' : addr.email, 'passwd' : passwd, 'name' : addr.name}
if record['send_mail']:
ans = tools.email_send(record['mail_from'], [addr.email], \
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp