邮件线程odoo 9

时间:2017-04-21 12:56:32

标签: openerp odoo-9

我继承邮件线程,点击新邮件后收到此错误:

Odoo Server Error

Traceback (most recent call last):
  File "/home/pc/git/odoo/openerp/http.py", line 648, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/pc/git/odoo/openerp/http.py", line 685, in dispatch
    result = self._call_function(**self.params)
  File "/home/pc/git/odoo/openerp/http.py", line 321, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/pc/git/odoo/openerp/service/model.py", line 118, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/pc/git/odoo/openerp/http.py", line 314, in checked_call
    result = self.endpoint(*a, **kw)
  File "/home/pc/git/odoo/openerp/http.py", line 964, in __call__
    return self.method(*args, **kw)
  File "/home/pc/git/odoo/openerp/http.py", line 514, in response_wrap
    response = f(*args, **kw)
  File "/home/pc/git/odoo/addons/web/controllers/main.py", line 888, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/home/pc/git/odoo/addons/web/controllers/main.py", line 880, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/home/pc/git/odoo/openerp/api.py", line 250, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/pc/git/odoo/openerp/api.py", line 381, in old_api
    result = method(recs, *args, **kwargs)
  File "/home/pc/git/odoo/addons/mail/models/mail_thread.py", line 1473, in message_get_suggested_recipients
    if not obj.user_id or not obj.user_id.partner_id:
AttributeError: 'res.partner' object has no attribute 'partner_id'

在openerp中添加'depends':['base','web','website','hr','mail'],

模型中的

添加:_inherit = ['mail.thread','ir.needaction_mixin']

问题在哪里,名称od表是什么,是消息存储?

1 个答案:

答案 0 :(得分:0)

在课堂上我改变了字段名称:

user_id = fields.Many2one('res.partner')

partner_id = fields.Many2one('res.partner')