Merge lp:~openerp-dev/openobject-addons/trunk-bug-885093-kjo into lp:openobject-addons

Proposed by Kuldeep Joshi(OpenERP)
Status: Merged
Merged at revision: 5604
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-885093-kjo
Merge into: lp:openobject-addons
Diff against target: 29 lines (+3/-2)
1 file modified
portal/wizard/portal_wizard.py (+3/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-885093-kjo
Reviewer Review Type Date Requested Status
Bhumika Shrimali (community) Approve
Review via email: mp+81113@code.launchpad.net

Description of the change

Send the mail to the portal user

To post a comment you must log in.
Revision history for this message
Bhumika Shrimali (sbh-openerp) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'portal/wizard/portal_wizard.py'
2--- portal/wizard/portal_wizard.py 2011-09-07 18:13:09 +0000
3+++ portal/wizard/portal_wizard.py 2011-11-03 07:07:24 +0000
4@@ -23,7 +23,7 @@
5 import random
6
7 from osv import osv, fields
8-from tools.misc import email_re, email_send
9+from tools.misc import email_re
10 from tools.translate import _
11
12 from base.res.res_users import _lang_get
13@@ -163,6 +163,7 @@
14 'url': wiz.portal_id.url or _("(missing url)"),
15 'db': cr.dbname,
16 }
17+ mail_message_obj = self.pool.get('mail.message')
18 dest_uids = user_obj.search(cr, ROOT_UID, login_cond)
19 dest_users = user_obj.browse(cr, ROOT_UID, dest_uids)
20 for dest_user in dest_users:
21@@ -175,7 +176,7 @@
22 email_to = dest_user.user_email
23 subject = _(WELCOME_EMAIL_SUBJECT) % data
24 body = _(WELCOME_EMAIL_BODY) % data
25- res = email_send(email_from, [email_to], subject, body)
26+ res = mail_message_obj.schedule_with_attach(cr, uid, email_from , [email_to], subject, body, context=context)
27 if not res:
28 logging.getLogger('res.portal.wizard').warning(
29 'Failed to send email from %s to %s', email_from, email_to)

Subscribers

People subscribed via source and target branches

to all changes: