From 47857a63ace46dd3d4d302fcafb46a75c242cb86 Mon Sep 17 00:00:00 2001 From: Yannick Tivisse Date: Fri, 27 Apr 2018 10:41:30 +0200 Subject: [PATCH] [IMP] fleet: Remove the unicity constraint on the driver It should be possible to assign 2 vehicles to the same person. The constraint is too restrictive. --- addons/fleet/models/fleet_vehicle.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/addons/fleet/models/fleet_vehicle.py b/addons/fleet/models/fleet_vehicle.py index 96ce5575117..5adaa742e2e 100644 --- a/addons/fleet/models/fleet_vehicle.py +++ b/addons/fleet/models/fleet_vehicle.py @@ -73,10 +73,6 @@ class FleetVehicle(models.Model): car_value = fields.Float(string="Catalog Value (VAT Incl.)", help='Value of the bought vehicle') residual_value = fields.Float() - _sql_constraints = [ - ('driver_id_unique', 'UNIQUE(driver_id)', 'Only one car can be assigned to the same employee!') - ] - @api.depends('model_id.brand_id.name', 'model_id.name', 'license_plate') def _compute_vehicle_name(self): for record in self: