[FIX] project,hr: improved alias creation/duplication
bzr revid: odo@openerp.com-20120809171726-ade5v5171r2r2hxp
This commit is contained in:
parent
de2f7bad58
commit
b35671ceb3
|
@ -545,7 +545,7 @@ class hr_job(osv.osv):
|
|||
alias_id = mail_alias.create_unique_alias(cr, uid,
|
||||
# Using '+' allows using subaddressing for those who don't
|
||||
# have a catchall domain setup.
|
||||
{'alias_name': 'job+'+vals['name']},
|
||||
{'alias_name': 'jobs+'+vals['name']},
|
||||
model_name="hr.applicant",
|
||||
context=context)
|
||||
vals['alias_id'] = alias_id
|
||||
|
|
|
@ -337,11 +337,11 @@ class project(osv.osv):
|
|||
context['active_test'] = False
|
||||
default['state'] = 'open'
|
||||
default['tasks'] = []
|
||||
default['alias_id'] = False
|
||||
default.pop('alias_name', None)
|
||||
default.pop('alias_id', None)
|
||||
proj = self.browse(cr, uid, id, context=context)
|
||||
if not default.get('name', False):
|
||||
default['name'] = proj.name + _(' (copy)')
|
||||
default['alias_name'] = default['name']
|
||||
res = super(project, self).copy(cr, uid, id, default, context)
|
||||
self.map_tasks(cr,uid,id,res,context)
|
||||
return res
|
||||
|
|
Loading…
Reference in New Issue