From e464464b79db543662e4bf6f00d3cf40c5494aac Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Tue, 21 Jul 2020 13:48:42 +0200 Subject: [PATCH] Remove unique constraint on packaging type in cubiscan The constraint is moved to the module stock_packaging_type: https://github.com/OCA/product-attribute/pull/654 Having this constraint in this module doesn't make sense. --- stock_cubiscan/models/stock.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/stock_cubiscan/models/stock.py b/stock_cubiscan/models/stock.py index e0ce1e610dd7..bb20378a603f 100644 --- a/stock_cubiscan/models/stock.py +++ b/stock_cubiscan/models/stock.py @@ -10,17 +10,3 @@ class StockWarehouse(models.Model): cubiscan_device_ids = fields.One2many( "cubiscan.device", "warehouse_id", string="Cubiscan Devices" ) - - -class ProductPackaging(models.Model): - _inherit = "product.packaging" - # FIXME: move this constraint in product_packaging_type - # https://github.com/OCA/product-attribute/tree/13.0/product_packaging_type - _sql_constraints = [ - ( - "product_packaging_type_unique", - "unique (product_id, packaging_type_id)", - "It is forbidden to have different packagings " - "with the same type for a given product.", - ) - ]