-
First we have to inherit
mail.thread
andmail.activity.mixin
module in the specific model inside the class. Here in thepatient.py
file._inherit = ['mail.thread', 'mail.activity.mixin']
-
Add inherited module name in the depends in
__manifest__.py
.'depends': ['mail']
-
Add this code to the
patient_view.xml
inside theform
tag and after thesheet
tag. file for viewing chatter options. It will integrate messaging features and activity to the model. It will look like this.<div class="oe_chatter"> <field name="message_follower_ids"/> <field name="activity_ids"/> <field name="message_ids"/> </div>
-
In the
Schedule activity
we can schedule based on different activities like Todo, Call etc. Explore this by your own. -
Check this code examples
-
Task
- Try to add chatter in
doctor
andappointment
model.
- Try to add chatter in
-
For tracking field value changes we have to add an attribute named
tracking=True
in that field in.py
file. Example:name = fields.Char(string='Patient Name', required=True, tracking=True)
And it will save a log in the chatter and also who have changed the value. Try to add tracking in other fields in
doctor.py
,patient.py
andappointment.py
file.