[已解决]odoo8 mass editing 时message_post报错
-
代码:
if context is None: context = {} if not context.get('no_track_all') and not isinstance(context, frozendict): message = convert_for_display(self, cr, uid, ids, values, level, context=context) if message: self.message_post(cr, uid, ids, subject=None, body=message, subtype=subtype, type='comment', context={'no_track_all': True})
下面这句的错误怎么解决?(写上默认的
thread_id=[0]
没作用啊)
AssertionError: Invalid thread_id; should be 0, False, an ID or a list with one ID
报错信息如下:
2017-12-26 08:18:24,720 23929 ERROR 1221_v8 openerp.http: Exception during JSON request handling. Traceback (most recent call last): File "/home/odoo/odoo-dev/odoo8/odoo8/openerp/http.py", line 543, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/home/odoo/odoo-dev/odoo8/odoo8/openerp/http.py", line 580, in dispatch result = self._call_function(**self.params) File "/home/odoo/odoo-dev/odoo8/odoo8/openerp/http.py", line 316, in _call_function return checked_call(self.db, *args, **kwargs) File "/home/odoo/odoo-dev/odoo8/odoo8/openerp/service/model.py", line 118, in wrapper return f(dbname, *args, **kwargs) File "/home/odoo/odoo-dev/odoo8/odoo8/openerp/http.py", line 313, in checked_call return self.endpoint(*a, **kw) File "/home/odoo/odoo-dev/odoo8/odoo8/openerp/http.py", line 809, in __call__ return self.method(*args, **kw) File "/home/odoo/odoo-dev/odoo8/odoo8/openerp/http.py", line 409, in response_wrap response = f(*args, **kw) File "/home/odoo/odoo-dev/odoo8/odoo8/addons/web/controllers/main.py", line 944, in call_kw return self._call_kw(model, method, args, kwargs) File "/home/odoo/odoo-dev/odoo8/odoo8/addons/web/controllers/main.py", line 936, in _call_kw return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs) File "/home/odoo/odoo-dev/odoo8/odoo8/openerp/api.py", line 268, in wrapper return old_api(self, *args, **kwargs) File "/home/odoo/odoo-dev/odoo8/3rdaddons/mass_editing/wizard/mass_editing_wizard.py", line 208, in create cr, uid, context.get('active_ids'), dict, context) File "/home/odoo/odoo-dev/odoo8/exide/exide_application/exide_application.py", line 57, in wrapper return func(*args, **kwargs) File "/home/odoo/odoo-dev/odoo8/exide/exide_application/exide_application.py", line 189, in warpper context=context) File "/home/odoo/odoo-dev/odoo8/odoo8/openerp/api.py", line 268, in wrapper return old_api(self, *args, **kwargs) File "/home/odoo/odoo-dev/odoo8/odoo8/addons/mail/mail_thread.py", line 1623, in message_post "Invalid thread_id; should be 0, False, an ID or a list with one ID" AssertionError: Invalid thread_id; should be 0, False, an ID or a list with one ID