[FIX] portal: fixed various mail_mail records created without specifying the 'type' field; however this may conflict with the context holdign default_type (i.e. opportunity), leading to type values not in the selection field.
bzr revid: tde@openerp.com-20121221115315-qni401mszwrkpvmj
This commit is contained in:
@@ -212,6 +212,7 @@ class wizard_user(osv.osv_memory):
|
||||
'subject': _(WELCOME_EMAIL_SUBJECT) % data,
|
||||
'body_html': '<pre>%s</pre>' % (_(WELCOME_EMAIL_BODY) % data),
|
||||
'state': 'outgoing',
|
||||
'type': 'email',
|
||||
}
|
||||
mail_id = mail_mail.create(cr, uid, mail_values, context=this_context)
|
||||
return mail_mail.send(cr, uid, [mail_id], context=this_context)
|
||||
|
||||
@@ -68,6 +68,7 @@ class sale_order(osv.Model):
|
||||
'subject': 'Invitation to follow %s' % document.name_get()[0][1],
|
||||
'body_html': 'You have been invited to follow %s' % document.name_get()[0][1],
|
||||
'auto_delete': True,
|
||||
'type': 'email',
|
||||
}
|
||||
mail_obj = self.pool.get('mail.mail')
|
||||
mail_id = mail_obj.create(cr, uid, mail_values, context=context)
|
||||
@@ -128,6 +129,7 @@ class account_invoice(osv.Model):
|
||||
'subject': 'Invitation to follow %s' % document.name_get()[0][1],
|
||||
'body_html': 'You have been invited to follow %s' % document.name_get()[0][1],
|
||||
'auto_delete': True,
|
||||
'type': 'email',
|
||||
}
|
||||
mail_obj = self.pool.get('mail.mail')
|
||||
mail_id = mail_obj.create(cr, uid, mail_values, context=context)
|
||||
|
||||
Reference in New Issue
Block a user