0
votes

I'm inherit mail thread and after click on new message get this error:

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'

In openerp is added 'depends' : ['base', 'web', 'website','hr','mail'],

in model is added: _inherit = ['mail.thread', 'ir.needaction_mixin']

Where is problem, and what is name od table where is message store?

1
Can you write you full code ?Emipro Technologies Pvt. Ltd.
post full code of mail template.....and pyAlpesh Valaki
@EmiproTechnologiesPvt.Ltd. I'm update my question, full error code from console is here. In other module I also use Mail Thread all work fine. Button Log an internal note work fine!user_odoo

1 Answers

0
votes

In class I'm change field name:

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

to

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