I have the cost field on product.template. How can I start tracking changes to it.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project
- MRP
This question has been flagged
On the base field definition record view..enable tracking field would be empty while it should be more than 1 for that field to be trackable on chatter. But on base fields, you can't edit it.
Alternative : create a similar "type" of field with enabled tracking set to more than 1, and create an AA to update the base field values to this custom field every time an update is made. In this way, all changes to this custom field get tracked, which indirectly are the changes to this base field
But u still won't be able to see the past changes here
But changes made once after the AA was created can definitely be tracked. You can hide this new field if you don't need its visibility on the view.
I was only able to get this far with adding automation to the field, to post a new value to the chatter with:
records.message_post(body="Value changed to: " + record.***technical.name.of.your.field***)
as suggested by Swasti, you can create a new field and store the previous value there (or all values that ever occurred in the field).
I had this done with automation, and added a field in studio named x_studio_name_changes.
The code for automation:
# check if the "changes" field is empty - you can try to capture this with different method but this one worked for me fine.
if record.x_studio_name_changes == 0:
record['x_studio_name_changes'] = ""
# add the new 'name' to the end of "changes" field after '; ' sign (if it's not empty which we checked before)
record['x_studio_name_changes'] = record.x_studio_name_changes + "; "+record.name
# put a note into logger with info that 'name' was changed
records.message_post(body="Name changed to: " + record.name)
hope this helps :)
I'm not yet fully familiar with the direct coding inside the source codes so try to work around with studio and some automatons :)
Hey there Matt, could you please tell us how was the process of field automation?
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up