Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[13.0] Remove unique constraint on packaging type in cubiscan #944

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions stock_cubiscan/models/stock.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
)
]