[FIX] fleet: Add missing dependencies on compute fields

This commit is contained in:
Yannick Tivisse
2018-04-04 11:32:56 +02:00
parent 3eb328cdc5
commit 9999a54028
+1 -1
View File
@@ -75,7 +75,7 @@ class FleetVehicle(models.Model):
('driver_id_unique', 'UNIQUE(driver_id)', 'Only one car can be assigned to the same employee!')
]
@api.depends('model_id', 'license_plate')
@api.depends('model_id.brand_id.name', 'model_id.name', 'license_plate')
def _compute_vehicle_name(self):
for record in self:
record.name = record.model_id.brand_id.name + '/' + record.model_id.name + '/' + (record.license_plate or _('No Plate'))