[IMP] mail.alias: use hyphen instead of underscore for replacing invalid chars, looks better for mail aliases

bzr revid: odo@openerp.com-20120814100354-2sn0505046wv27ot
This commit is contained in:
Olivier Dony 2012-08-14 12:03:54 +02:00
parent 8fac3ae62e
commit fcdd930396
1 changed files with 1 additions and 1 deletions

View File

@ -135,7 +135,7 @@ class mail_alias(osv.Model):
make it unique, and the ``alias_model_id`` value will set to the
model ID of the ``model_name`` value, if provided,
"""
alias_name = re.sub(r'[^\w+]', '_', remove_accents(vals['alias_name'])).lower()
alias_name = re.sub(r'[^\w+]', '-', remove_accents(vals['alias_name'])).lower()
alias_name = self._find_unique(cr, uid, alias_name, context=context)
vals['alias_name'] = alias_name
if model_name: