Tracking existing fields using Odoo Studio

It’s not possible to add tracking to a ‘base’ field without customization, but here’s a simple way to do it using Odoo Studio. This uses a computed field.

In this example we will track the parent company for an individual contact.

Firstly, add a new text field.

Then (in Developer Mode), click on MORE (in the bottom left hand corner) to display field information.

Tracking: On Change

Dependencies: name, parent_id, parent_name

Compute:

for record in self:
     if record['parent_id']:
         record['x_studio_history'] = record.name + ' / Company: ' + record.parent_name

Now any changes are shown in the “chatter” at the bottom of the screen (or the right-hand side on a wide screen):

If it’s working well, we can make the new field invisible on the Form View:

Note: you could do this without Odoo Studio by creating the field in Settings / Technical / (Database Structure) / Fields:

Model is Contact (res.partner)