[IMP] when receive incoming mail, so not set applicant name

bzr revid: ggh@tinyerp.com-20130206113201-vx1kfg3a4mi6zjej
This commit is contained in:
ggh-openerp 2013-02-06 17:02:01 +05:30
parent 95a7300a50
commit 97b92ad713
1 changed files with 2 additions and 0 deletions

View File

@ -346,10 +346,12 @@ class hr_applicant(base_stage, osv.Model):
This override updates the document according to the email.
"""
if custom_values is None: custom_values = {}
val = msg.get('from').split('<')[0]
desc = html2plaintext(msg.get('body')) if msg.get('body') else ''
defaults = {
'name': msg.get('subject') or _("No Subject"),
'description': desc,
'partner_name':val,
'email_from': msg.get('from'),
'email_cc': msg.get('cc'),
'user_id': False,