From b49bb75a26cb71ffcbb6bd273c595edf8df254cd Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Wed, 28 Dec 2011 22:09:01 +0100 Subject: [PATCH] [IMP] no email required to share a link or embed bzr revid: fp@tinyerp.com-20111228210901-sywx5rab63d10lsd --- addons/share/wizard/share_wizard.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/share/wizard/share_wizard.py b/addons/share/wizard/share_wizard.py index 276021e97ec..80a0b12f8b2 100644 --- a/addons/share/wizard/share_wizard.py +++ b/addons/share/wizard/share_wizard.py @@ -752,8 +752,6 @@ class share_wizard(osv.osv_memory): 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.')) # TODO: also send an HTML version of this mail msg_ids = [] @@ -761,6 +759,8 @@ class share_wizard(osv.osv_memory): email_to = result_line.user_id.user_email if not email_to: continue + 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.')) subject = wizard_data.name body = _("Hello,") body += "\n\n"