当消息被发送到电子邮件地址时,“发件人/回复至”字段出现问题。它没有显示当前用户的电子邮件地址。
这是 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."))