summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2012-12-21 12:53:15 +0100
committerThibault Delavallée <tde@openerp.com>2012-12-21 12:53:15 +0100
commitb4e1e32f0abb60f75b02be83e91bbcf32f3aa0e4 (patch)
tree1f9a2d9beaacfa3502ef7fbe422cf36eb48d1c63 /addons
parent19efa31b51cfbff87d48436a9e083d1f173c5f91 (diff)
[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
Diffstat (limited to 'addons')
-rw-r--r--addons/portal/wizard/portal_wizard.py1
-rw-r--r--addons/portal_sale/portal_sale.py2
2 files changed, 3 insertions, 0 deletions
diff --git a/addons/portal/wizard/portal_wizard.py b/addons/portal/wizard/portal_wizard.py
index e88c68379ab..e3047cd5edb 100644
--- a/addons/portal/wizard/portal_wizard.py
+++ b/addons/portal/wizard/portal_wizard.py
@@ -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)
diff --git a/addons/portal_sale/portal_sale.py b/addons/portal_sale/portal_sale.py
index 3556fd5ca0e..d4d5b64cea3 100644
--- a/addons/portal_sale/portal_sale.py
+++ b/addons/portal_sale/portal_sale.py
@@ -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)