Chatter Diff Tracking
See exactly what was removed and what was added â right in the chatter.
Why you need it
Odoo's standard field tracking logs the old and the new value side by side. That works for a date or a status â but for a long description, a rich-text policy, or a block of Python code it gives you two walls of text and a game of "spot the difference". Auditors, quality managers and reviewers waste time re-reading entire paragraphs to find one changed word.
Chatter Diff Tracking replaces that with a colored diff, the way developers review code: deletions in red strike-through, insertions in green, unchanged content left as is. One glance tells the whole story â perfect for ISO 9001 / QMS audit trails, legal texts, SOPs, product descriptions and configuration code.
Three renderers, picked automatically
HTML
Rich-text fields are diffed block by block â paragraphs, lists, headings â and the output is always valid markup. Legacy plain-text content is handled too.
Text
Line-level diff with inline word highlighting: change one word in a paragraph and only that word lights up.
Code
Classic unified diff (like git diff) in a monospace block â ideal for Python
code fields, computed formulas and configuration snippets.
Example
Posted automatically as an internal note â followers are not spammed with notifications.
For developers: two lines to adopt
Inherit the mixin next to mail.thread and flag any Char, Text or Html field:
class ProductPolicy(models.Model):
_name = 'product.policy'
_inherit = ['mail.thread', 'tko.diff.tracking.mixin']
policy_text = fields.Html('Policy', diff_tracking=True) # auto: html diff
notes = fields.Text('Notes', diff_tracking=True) # auto: text diff
compute_code = fields.Text('Code', diff_tracking='code') # unified diff
legacy_html = fields.Text('Legacy', diff_tracking='html') # force html diff
- No stored data, no new tables â diffs live in the chatter you already have.
- Multi-record writes supported; nothing is posted when the value did not actually change.
- Skip logging on demand with
with_context(skip_diff_tracking=True). - User content is always escaped â safe against markup injection.
- No external Python dependencies beyond what Odoo already ships.
TKOpen
Built and battle-tested inside our ISO 9001 QMS suite.
Questions or feature requests? tkopen.com
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Lines of code | 137 |
| Technical Name |
tko_diff_tracking |
| License | AGPL-3 |
| Website | https://tkopen.com |
Please log in to comment on this module