diff options
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) |
