質問

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

役に立ちましたか?

解決

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)
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top