I am new to Odoo :)
I would to understand how can I use the Compute field.
For example I added a new model x_fleet and on it a new integer field x_value. But using the bellow python Compute script code it's not working (the value of this field is always 0):
Related Field:
Dependencies: x_value
Compute:
for record in self:
record['x_value'] = 100
I selected the Stored and Indexed flag, also Tracking: "Always".
What I am doing wrong?
This example is my test to understand how this Compute is working.
My
final aim is to use the Compute feature in order to interact between
models(tables), for example when a new entry of this model is created
and the field "km" is filled (ie. x_service.trip.km), in automatic to add the value of x_service.trip.km to total km: fleet.vehicle.odometer.value