[IMP] crm, hr_recruitment, project_issue: removed message put in description in message_new

bzr revid: tde@openerp.com-20130822094613-os846v2g3t2dloo5
This commit is contained in:
Thibault Delavallée 2013-08-22 11:46:13 +02:00
parent 525aee7a86
commit c147dd4975
3 changed files with 5 additions and 11 deletions

View File

@ -955,10 +955,8 @@ class crm_lead(format_address, osv.osv):
"""
if custom_values is None:
custom_values = {}
desc = html2plaintext(msg.get('body')) if msg.get('body') else ''
defaults = {
'name': msg.get('subject') or _("No Subject"),
'description': desc,
'email_from': msg.get('from'),
'email_cc': msg.get('cc'),
'partner_id': msg.get('author_id', False),

View File

@ -331,10 +331,8 @@ class hr_applicant(osv.Model):
"""
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'),

View File

@ -495,21 +495,19 @@ class project_issue(osv.Model):
through message_process.
This override updates the document according to the email.
"""
if custom_values is None: custom_values = {}
if context is None: context = {}
if custom_values is None:
custom_values = {}
if context is None:
context = {}
context['state_to'] = 'draft'
desc = html2plaintext(msg.get('body')) if msg.get('body') else ''
defaults = {
'name': msg.get('subject') or _("No Subject"),
'description': desc,
'email_from': msg.get('from'),
'email_cc': msg.get('cc'),
'partner_id': msg.get('author_id', False),
'user_id': False,
}
if msg.get('priority'):
if msg.get('priority'):
defaults['priority'] = msg.get('priority')
defaults.update(custom_values)