I want to add track_visibility = 'onchange' for many fields, particularly existing fields in the product model.
These fields are written with V7 API, but I am using Odoo 8.
I know that I can override the entire field definition, like:
'name': fields.char('Name', required=True, translate=True, select=True, track_visibility='onchange'),
But this seems quite sloppy.
What if the field definition changes in an update? My minor tracking modification could break the module's functionality.
Trying to just add tracking (like below) will cause the field Name, etc. to be undefined, because it overwrites, rather than inheriting.
# Overrides instead of inheriting
'name': fields.char(track_visibility='onchange'),
Is there a way to do this more cleanly? Either in V7 or V8 API.
Implementation of track visibility in Odoo: https://learnopenerp.blogspot.com/2022/05/enable-field-tracking-track-visibility-in-odoo-15.html