From 845267ede0daf4f8efcaa465e88a06ea4ce9a2ef Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Fri, 13 Sep 2019 10:27:22 +0200 Subject: [PATCH] Remove unique constraint on location's name It prevents other addons to work properly such as the vertical lift. We remove the constraint for now, maybe to be re-introduced later in a more permissive way. --- stock_location_zone/models/stock_location.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/stock_location_zone/models/stock_location.py b/stock_location_zone/models/stock_location.py index b9c20857d..d65a070fc 100644 --- a/stock_location_zone/models/stock_location.py +++ b/stock_location_zone/models/stock_location.py @@ -40,14 +40,6 @@ class StockLocation(models.Model): '* Other: any other location', ) - _sql_constraints = [( - 'name_zone_unique', - 'EXCLUDE (name WITH =, zone_location_id WITH =)' - ' WHERE (zone_location_id IS NOT NULL)', - 'Another location with the same name exists in the same zone.' - ' Please rename the location.' - )] - @api.depends('is_zone', 'usage', 'location_id.usage', 'zone_location_id', 'child_ids') def _compute_location_kind(self):