activities log helps us to save all changes that made in our objects , and we can make it as bellow
- inherit mail thread object
_inherit = 'mail.thread'
- make track to fields that we want to save it's change , as bellow
E.G :
say we have field called name , so we can make track for it as bellow
name = fields.Char(string="Name", required=True, track_visibility='onchange')
- show the activities log with xml file as footer for our view ,as bellow
<footer>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
<field name="message_ids" widget="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>
</footer>
No comments:
Post a Comment