【发布时间】:2020-08-24 08:23:55
【问题描述】:
我想通过 odoo 13 中的 chatter 发送消息。我使用方法 message_post() 但它既没有出现在 chatter 中,也没有出现在讨论应用程序中(就像用户或 odoo bot 发送的普通聊天一样)。
奇怪的是,当我检查设置 > 技术 > 消息时会创建该消息。 这是我的代码:
try:
employee.message_post(
subject=(_("Timesheet reminder")),
body="Nous vous informons que vous n'avez pas complété votre feuille de temps du %s" % (yesterday.strftime('%d-%m-%Y')),
message_type='comment',
subtype='mail.mt_comment',
)
except Exception as e:
_logger.critical(e)
employee 是“hr.employee”类型的模型。
你能帮帮我吗?
【问题讨论】:
标签: python python-3.x odoo