{"id":19,"date":"2023-03-06T11:13:00","date_gmt":"2023-03-06T11:13:00","guid":{"rendered":""},"modified":"2024-01-28T09:05:24","modified_gmt":"2024-01-28T09:05:24","slug":"how-to-add-chatter-to-form-view-and-enable-tracking-for-fields-in-odoo-16","status":"publish","type":"post","link":"https:\/\/pythonpower.in\/index.php\/2023\/03\/06\/how-to-add-chatter-to-form-view-and-enable-tracking-for-fields-in-odoo-16\/","title":{"rendered":"How To Add  Chatter To Form View And Enable Tracking For Fields In Odoo 16"},"content":{"rendered":"<p>&nbsp;<\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"http:\/\/pythonpower.in\/wp-content\/uploads\/2023\/03\/Expert-20In-20Odoo-2016-20-20Hindi.png\" style=\"margin-left: 1em; margin-right: 1em;\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" data-original-height=\"720\" data-original-width=\"1280\" height=\"360\" src=\"http:\/\/pythonpower.in\/wp-content\/uploads\/2023\/03\/Expert-20In-20Odoo-2016-20-20Hindi-300x169.png\" width=\"640\" \/><\/a><\/div>\n<p><\/p>\n<p><\/p>\n<p><b><span style=\"font-size: large;\">How To Add&nbsp; Chatter To Form View And Enable Tracking For Fields In Odoo 16<\/span><\/b><\/p>\n<ol>\n<li style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\">Add the &#8216;mail&#8217; module to the dependencies list in your module&#8217;s manifest file (e.g. <b>manifest<\/b>.py).<\/li>\n<\/ol>\n<div>\n<div style=\"background-color: #1e1e1e; color: #d4d4d4; font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; line-height: 18px; white-space: pre;\">\n<div style=\"font-size: 12px;\">{<\/div>\n<div style=\"font-size: 12px;\">    <span style=\"color: #ce9178;\">&#8216;name&#8217;<\/span>: <span style=\"color: #ce9178;\">&#8216;Hospital Management&#8217;<\/span>,<\/div>\n<div style=\"font-size: 12px;\">    <span style=\"color: #ce9178;\">&#8216;version&#8217;<\/span>: <span style=\"color: #ce9178;\">&#8216;1.2&#8217;<\/span>,<\/div>\n<div style=\"font-size: 12px;\">    <span style=\"color: #ce9178;\">&#8216;category&#8217;<\/span>: <span style=\"color: #ce9178;\">&#8216;Hospital Management System&#8217;<\/span>,<\/div>\n<div style=\"font-size: 12px;\">    <span style=\"color: #ce9178;\">&#8216;author&#8217;<\/span>: <span style=\"color: #ce9178;\">&#8216;pythonpowers&#8217;<\/span>,<\/div>\n<div style=\"font-size: 12px;\">   <\/div>\n<div style=\"font-size: 12px;\">    <span style=\"color: #ce9178;\">&#8216;sequence&#8217;<\/span>: &#8211;<span style=\"color: #b5cea8;\">100<\/span>,<\/div>\n<div style=\"font-size: 12px;\">    <span style=\"color: #ce9178;\">&#8216;summary&#8217;<\/span>: <span style=\"color: #ce9178;\">&#8216;HMS&#8217;<\/span>,<\/div>\n<div style=\"font-size: 12px;\">    <span style=\"color: #ce9178;\">&#8216;description&#8217;<\/span>: <span style=\"color: #ce9178;\">&#8220;&#8221;&#8221;<\/span><\/div>\n<div style=\"font-size: 12px;\"><span style=\"color: #ce9178;\">This module contains all the common features of Hospital Managent System.<\/span><\/div>\n<div style=\"font-size: 12px;\"><span style=\"color: #ce9178;\">    &#8220;&#8221;&#8221;<\/span>,<\/div>\n<div><span style=\"font-size: 12px;\">   <\/span><b><span style=\"font-size: large;\"> <span style=\"color: #ce9178;\">&#8216;depends&#8217;<\/span>: [<span style=\"color: #ce9178;\">&#8216;mail&#8217;<\/span>],<\/span><\/b><\/div>\n<div style=\"font-size: 12px;\">    <span style=\"color: #ce9178;\">&#8216;data&#8217;<\/span>: [<\/div>\n<div style=\"font-size: 12px;\">        <\/div>\n<div style=\"font-size: 12px;\">        <\/div>\n<div style=\"font-size: 12px;\">        <\/div>\n<div style=\"font-size: 12px;\">        <\/div>\n<div style=\"font-size: 12px;\">    ],<\/div>\n<div style=\"font-size: 12px;\"> <\/div>\n<div style=\"font-size: 12px;\">    <span style=\"color: #ce9178;\">&#8216;demo&#8217;<\/span>: [],<\/div>\n<div style=\"font-size: 12px;\">    <span style=\"color: #ce9178;\">&#8216;application&#8217;<\/span>:<span style=\"color: #569cd6;\">True<\/span>,<\/div>\n<div style=\"font-size: 12px;\">        <\/div>\n<div style=\"font-size: 12px;\">    <span style=\"color: #ce9178;\">&#8216;installable&#8217;<\/span>: <span style=\"color: #569cd6;\">True<\/span>,<\/div>\n<div style=\"font-size: 12px;\">    <span style=\"color: #ce9178;\">&#8216;assets&#8217;<\/span>: {<\/div>\n<div style=\"font-size: 12px;\">        <\/div>\n<div style=\"font-size: 12px;\">    },<\/div>\n<div style=\"font-size: 12px;\">    <\/div>\n<div style=\"font-size: 12px;\">    <span style=\"color: #ce9178;\">&#8216;license&#8217;<\/span>: <span style=\"color: #ce9178;\">&#8216;LGPL-3&#8217;<\/span>,<\/div>\n<p><span style=\"font-size: 12px;\"><br \/><\/span><\/p>\n<div style=\"font-size: 12px;\">}<\/div>\n<p><span style=\"font-size: 12px;\"><br \/><\/span><\/div>\n<\/div>\n<p><b><span style=\"font-size: large;\"><br \/><\/span><\/b><\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span style=\"font-size: medium;\">Add the &#8216;mail.thread&#8217; model to the _inherit list in your custom model&#8217;s class definition in the models.py file<\/span><\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\">from odoo import api, fields, models<\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;\"><\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;\"><\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\">class HospitalPatient(models.Model):<\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span>&nbsp; &nbsp; <\/span>_name = &#8216;hospital.patient&#8217;<\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span>&nbsp; &nbsp;<span style=\"font-size: large;\"><b> <\/b><\/span><\/span><span style=\"font-size: large;\"><b>_inherit = [&#8216;mail.thread&#8217;,&#8217;mail.activity.mixin&#8217;]<\/b><\/span><\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span>&nbsp; &nbsp; <\/span>_description= &#8216;Hospital Management System&#8217;<\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><\/p>\n<ol>\n<li style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span style=\"font-size: medium;\">Add the &#8216;message_follower_ids&#8217; and &#8216;message_ids&#8217; fields to your custom model&#8217;s view definition in the views.py file. For example:<\/span><\/li>\n<\/ol>\n<div>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\">&lt;record id=&#8221;view_hospital_patient_form&#8221; model=&#8221;ir.ui.view&#8221;&gt;<\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>&lt;field name=&#8221;model&#8221;&gt;hospital.patient.form&lt;\/field&gt;<\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>&lt;field name=&#8221;model&#8221;&gt;hospital.patient&lt;\/field&gt;<\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>&lt;field name=&#8221;arch&#8221; type=&#8221;xml&#8221;&gt;<\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>&lt;form&gt;<\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>&lt;sheet&gt;<\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>&lt;group&gt;<\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>&lt;group&gt;<\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;\"><\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>&lt;field name=&#8217;name&#8217;&gt;&lt;\/field&gt;<\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>&lt;field name=&#8217;age&#8217;&gt;&lt;\/field&gt;<\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;\"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>&lt;\/group&gt;<\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>&lt;group&gt;<\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>&lt;field name=&#8217;gender&#8217;&gt;&lt;\/field&gt;<\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>&lt;field name=&#8217;active&#8217; invisible=&#8221;1&#8243;&gt;&lt;\/field&gt;<\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;\"><span>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;\"><span>&nbsp;&nbsp; &nbsp; &nbsp;<\/span><\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>&lt;\/group&gt;<\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;\"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;\"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;\"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>&lt;\/group&gt;<\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;\"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>&lt;\/sheet&gt;<\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;\"><\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"font-size: large;\"><b>&nbsp; <\/b><\/span><\/span><span style=\"font-size: large;\"><b>&lt;div class=&#8221;oe_chatter&#8221;&gt;<\/b><\/span><\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span style=\"font-size: large;\"><b><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>&lt;field name=&#8221;message_follower_ids&#8221;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;groups=&#8221;base.group_user&#8221;\/&gt;<\/b><\/span><\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span style=\"font-size: large;\"><b><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>&lt;field name=&#8221;activity_ids&#8221;\/&gt;<\/b><\/span><\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span style=\"font-size: large;\"><b><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>&lt;field name=&#8221;message_ids&#8221;\/&gt;<\/b><\/span><\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span style=\"font-size: large;\"><b><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>&lt;\/div&gt;<\/b><\/span><\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;\"><span>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;\"><span>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>&lt;\/form&gt;<\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>&lt;\/field&gt;<\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span>&nbsp; &nbsp; &nbsp; &nbsp; <\/span>&lt;\/record&gt;<\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span face=\"S\u00f6hne, ui-sans-serif, system-ui, -apple-system, &quot;Segoe UI&quot;, Roboto, Ubuntu, Cantarell, &quot;Noto Sans&quot;, sans-serif, &quot;Helvetica Neue&quot;, Arial, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Noto Color Emoji&quot;\" style=\"background-color: #444654; color: #d1d5db; font-size: 16px; white-space: pre-wrap;\">Override the &#8216;create&#8217; and &#8216;write&#8217; methods in your custom model&#8217;s class definition to enable tracking of changes. <\/span><\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;\"><span face=\"S\u00f6hne, ui-sans-serif, system-ui, -apple-system, &quot;Segoe UI&quot;, Roboto, Ubuntu, Cantarell, &quot;Noto Sans&quot;, sans-serif, &quot;Helvetica Neue&quot;, Arial, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Noto Color Emoji&quot;\" style=\"background-color: #444654; color: #d1d5db; font-size: 16px; white-space: pre-wrap;\"><br \/><\/span><\/p>\n<div style=\"background-color: #1e1e1e; color: #d4d4d4; font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; line-height: 18px; white-space: pre;\">\n<div style=\"font-size: 12px;\"><span style=\"color: #c586c0;\">from<\/span> odoo <span style=\"color: #c586c0;\">import<\/span> api, fields, models<\/div>\n<p><span style=\"font-size: 12px;\"><\/p>\n<p><\/span><\/p>\n<div style=\"font-size: 12px;\"><span style=\"color: #569cd6;\">class<\/span> <span style=\"color: #4ec9b0;\">HospitalPatient<\/span>(<span style=\"color: #4ec9b0;\">models<\/span>.<span style=\"color: #4ec9b0;\">Model<\/span>):<\/div>\n<div style=\"font-size: 12px;\">    _name = <span style=\"color: #ce9178;\">&#8216;hospital.patient&#8217;<\/span><\/div>\n<div style=\"font-size: 12px;\">    _inherit = [<span style=\"color: #ce9178;\">&#8216;mail.thread&#8217;<\/span>,<span style=\"color: #ce9178;\">&#8216;mail.activity.mixin&#8217;<\/span>]<\/div>\n<div style=\"font-size: 12px;\">    _description= <span style=\"color: #ce9178;\">&#8216;Hospital Management System&#8217;<\/span><\/div>\n<div style=\"font-size: 12px;\">    <\/div>\n<div><span style=\"font-size: 12px;\">    name = fields.Char(<\/span><span style=\"color: #9cdcfe; font-size: 12px;\">string<\/span><span style=\"font-size: 12px;\">=<\/span><span style=\"color: #ce9178; font-size: 12px;\">&#8216;Name&#8217;<\/span><span style=\"font-size: 12px;\">, <\/span><span style=\"font-size: medium;\"><b><span style=\"color: #9cdcfe;\">tracking<\/span>=<span style=\"color: #569cd6;\">True<\/span>)<\/b><\/span><\/div>\n<div><span style=\"font-size: 12px;\">    age = fields.Integer(<\/span><span style=\"color: #9cdcfe; font-size: 12px;\">string<\/span><span style=\"font-size: 12px;\">=<\/span><span style=\"color: #ce9178; font-size: 12px;\">&#8216;Age&#8217;<\/span><span style=\"font-size: 12px;\">, <\/span><span style=\"font-size: medium;\"><b><span style=\"color: #9cdcfe;\">tracking<\/span>=<span style=\"color: #569cd6;\">True<\/span>)<\/b><\/span><\/div>\n<\/div>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;\"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<\/span><\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;\"><span><br \/><\/span><\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;\">\n<div style=\"clear: both; text-align: center;\"><iframe loading=\"lazy\" allowfullscreen=\"\" height=\"308\" src=\"https:\/\/www.youtube.com\/embed\/hj_QUqAqWTc\" width=\"488\" youtube-src-><\/iframe><\/div>\n<p><span style=\"font-size: medium;\"><\/p>\n<p style=\"font-family: &quot;Helvetica Neue&quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px;\">For any inquiries, suggestions, or feedback, you can reach out to us through the provided contact form on our blog. We make an effort to respond to all queries in a timely manner and appreciate your engagement with our content.<\/p>\n<p><\/span><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; How To Add&nbsp; Chatter To Form View And Enable Tracking For Fields In Odoo&hellip;<\/p>\n","protected":false},"author":2,"featured_media":81,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":"","_joinchat":[]},"categories":[5],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pythonpower.in\/index.php\/wp-json\/wp\/v2\/posts\/19"}],"collection":[{"href":"https:\/\/pythonpower.in\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pythonpower.in\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pythonpower.in\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/pythonpower.in\/index.php\/wp-json\/wp\/v2\/comments?post=19"}],"version-history":[{"count":1,"href":"https:\/\/pythonpower.in\/index.php\/wp-json\/wp\/v2\/posts\/19\/revisions"}],"predecessor-version":[{"id":82,"href":"https:\/\/pythonpower.in\/index.php\/wp-json\/wp\/v2\/posts\/19\/revisions\/82"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pythonpower.in\/index.php\/wp-json\/wp\/v2\/media\/81"}],"wp:attachment":[{"href":"https:\/\/pythonpower.in\/index.php\/wp-json\/wp\/v2\/media?parent=19"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pythonpower.in\/index.php\/wp-json\/wp\/v2\/categories?post=19"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pythonpower.in\/index.php\/wp-json\/wp\/v2\/tags?post=19"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}