+ def _get_default_from(self, cr, uid, context=None):
+ this = self.pool.get('res.users').browse(cr, SUPERUSER_ID, uid, context=context)
+ if this.alias_domain:
+ return '%s <%s@%s>' % (this.name, this.alias_name, this.alias_domain)
+ elif this.email:
+ return '%s <%s>' % (this.name, this.email)
+ raise osv.except_osv(_('Invalid Action!'), _("Unable to send email, please configure the sender's email address or alias."))
+