回复openerp v7上未显示的字段
将邮件发送到电子邮件地址时,如何显示“回复至”字段?我很困惑,因为有时候它会表现出来,有时候不会 我用的是OpenerpV7 我修改了\u get\u default\u fromfrommail\u mail.py回复openerp v7上未显示的字段,openerp,Openerp,将邮件发送到电子邮件地址时,如何显示“回复至”字段?我很困惑,因为有时候它会表现出来,有时候不会 我用的是OpenerpV7 我修改了\u get\u default\u fromfrommail\u mail.py def _get_default_from(self, cr,uid, context=None): this = self.pool.get('res.users').browse(cr, uid,uid, context=context) if this.alias_d
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."))
_defaults = {
'state': 'outgoing',
'email_from': lambda self, cr, uid, ctx=None: self._get_default_from(cr, uid,ctx),
}
显然,
\u get\u default\u from()
方法用于获取“email\u from”字段的值
请参见mail\u mail.py中的_列,其中有一列名为“回复至”:
'reply_to': fields.char('Reply-To', help='Preferred response address for the message')
如果要显示“reply_to”,我认为必须将此字段添加到定义视图的XML文件中