【问题标题】:Openrerp chatter message_post errorOpenrerp 喋喋不休的 message_post 错误
【发布时间】:2014-02-10 09:27:40
【问题描述】:

我在表单中创建了一个自定义模块。

我想发布一条自定义消息。但我收到以下错误。

  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

我的 .py 程序位于以下链接

http://pastebin.com/9Bq4MZQ9

【问题讨论】:

  • 您的堆栈跟踪是否显示您的代码中的哪一行触发了错误?
  • 其显示错误在第 22 行

标签: python openerp


【解决方案1】:

试试这个功能,希望能解决你的错误。

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)

【讨论】:

  • 谢谢哥们,干得好,你帮了我很多学习 OpenERP。继续加油,谢谢。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2014-03-07
  • 2011-05-28
  • 2012-05-14
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多