Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/networking/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
回复openerp v7上未显示的字段_Openerp - Fatal编程技术网

回复openerp v7上未显示的字段

回复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

将邮件发送到电子邮件地址时,如何显示“回复至”字段?我很困惑,因为有时候它会表现出来,有时候不会

我用的是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_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文件中