[Fix]: As a project/user, try to create a project from the project field of the task form, get traceback.

bzr revid: tta@openerp.com-20121119101518-wgxpkgbtp6ba3dx5
This commit is contained in:
Tejas Tank 2012-11-19 15:45:18 +05:30
parent 66afff1b52
commit 6073fdc425
1 changed files with 1 additions and 1 deletions

View File

@ -532,7 +532,7 @@ def Project():
# Prevent double project creation when 'use_tasks' is checked!
context = dict(context, project_creation_in_progress=True)
mail_alias = self.pool.get('mail.alias')
if not vals.get('alias_id'):
if not vals.get('alias_id') and vals.get('name', False):
vals.pop('alias_name', None) # prevent errors during copy()
alias_id = mail_alias.create_unique_alias(cr, uid,
# Using '+' allows using subaddressing for those who don't