From fcdd930396ac2bcdb88a9bcdfa5e0f1d0a896efc Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Tue, 14 Aug 2012 12:03:54 +0200 Subject: [PATCH] [IMP] mail.alias: use hyphen instead of underscore for replacing invalid chars, looks better for mail aliases bzr revid: odo@openerp.com-20120814100354-2sn0505046wv27ot --- addons/mail/mail_alias.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/mail_alias.py b/addons/mail/mail_alias.py index 430cdb930b4..82b20f39480 100644 --- a/addons/mail/mail_alias.py +++ b/addons/mail/mail_alias.py @@ -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: