Openrerp chatter message_post error

我怕爱的太早我们不能终老 提交于 2019-12-24 17:17:51

问题


I have created a custom module with chatter in the form.

I want to post a custom message. but I am getting following error.

  File "/opt/openerp/addons/mail/mail_thread.py", line 1023, 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

For my .py program is at the following link

http://pastebin.com/9Bq4MZQ9


回答1:


try this function, Hope this will solve your error.

def function_which_post_msg(self, cr, uid, ids, context=None):     
    self.message_post(cr, uid, [ids[0]], body=_("New Question has been <b>created</b>"), context=context)


来源:https://stackoverflow.com/questions/21673290/openrerp-chatter-message-post-error

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!