0

当消息被发送到电子邮件地址时,“发件人/回复至”字段出现问题。它没有显示当前用户的电子邮件地址。

这是 openerp 7 在从字段声明默认值时的代码..

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

1 回答 1

0

In E-mail from address from ir.mail_server (Outgoing Mail Server),其中用户名将是外发邮件的发件人地址

于 2013-01-29T08:36:19.450 回答