diff options
| author | Stephane Wirtel <stw@openerp.com> | 2011-09-13 16:00:16 +0200 |
|---|---|---|
| committer | Stephane Wirtel <stw@openerp.com> | 2011-09-13 16:00:16 +0200 |
| commit | 2a59ce92e3ea35cca00a314d44556b522b3c2fa8 (patch) | |
| tree | 6e7eec2157a513284e6740a95f2e39b7f04aef79 /addons/share/wizard | |
| parent | 8a2bc42c3c45b4d3c94070a29fa76636256f3da7 (diff) | |
| parent | 2a40f9a4997eecc6f997ab0e43dc6334263b9cad (diff) | |
[MERGE] Email Framework - lp:~openerp-dev/openobject-addons/trunk-emails-unified
bzr revid: stw@openerp.com-20110913140016-zzfynrnjdaap0tfb
Diffstat (limited to 'addons/share/wizard')
| -rw-r--r-- | addons/share/wizard/share_wizard.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/addons/share/wizard/share_wizard.py b/addons/share/wizard/share_wizard.py index eec8b440dfa..b15129fd1bc 100644 --- a/addons/share/wizard/share_wizard.py +++ b/addons/share/wizard/share_wizard.py @@ -692,6 +692,7 @@ class share_wizard(osv.osv_memory): def send_emails(self, cr, uid, wizard_data, context=None): self._logger.info('Sending share notifications by email...') + mail_message = self.pool.get('mail.message') user = self.pool.get('res.users').browse(cr, UID_ROOT, uid) if not user.user_email: raise osv.except_osv(_('Email required'), _('The current user must have an email address configured in User Preferences to be able to send outgoing emails.')) @@ -726,7 +727,12 @@ class share_wizard(osv.osv_memory): body += _("OpenERP is a powerful and user-friendly suite of Business Applications (CRM, Sales, HR, etc.)\n" "It is open source and can be found on http://www.openerp.com.") - if tools.email_send(user.user_email, [email_to], subject, body): + if mail_message.schedule_with_attach(cr, uid, + user.user_email, + [email_to], + subject, + body, + model='share.wizard'): emails_sent += 1 else: self._logger.warning('Failed to send share notification from %s to %s, ignored', user.user_email, email_to) |
