Odoo:将历史记录和评论添加到我的自定义模型
Odoo: add history and comments to my custom model
我在 Odoo 中创建了一个自定义模型,我想在其表单视图中添加与内置 Odoo 模型(例如客户)相同的历史和评论部分。
这可能吗?
首先你需要你的模型继承自mail.thread。
_inherit = 'mail.thread'
然后在表单末尾添加 div。
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
<field name="message_ids" widget="mail_thread"/>
</div>
你应该离开。
此处介绍http://www.slideshare.net/openobject/odoo-open-chatter-integration
我在 Odoo 中创建了一个自定义模型,我想在其表单视图中添加与内置 Odoo 模型(例如客户)相同的历史和评论部分。
这可能吗?
首先你需要你的模型继承自mail.thread。
_inherit = 'mail.thread'
然后在表单末尾添加 div。
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
<field name="message_ids" widget="mail_thread"/>
</div>
你应该离开。
此处介绍http://www.slideshare.net/openobject/odoo-open-chatter-integration