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.
This commit is contained in:
Guewen Baconnier
2020-07-21 13:48:42 +02:00
parent 696bbc3fc8
commit df2fb57b49

View File

@@ -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.",
)
]