Skip to content
Snippets Groups Projects
Commit 3f15127a authored by William Henrotin's avatar William Henrotin
Browse files

[IMP] stock: add constraint on orderpoint


This commit adds a constraint on model stock.warehouse.orderpoint
(reordering rule) to ensure two orderpoint are not set on the same
product and on the same location. This is an issue as the replenishment
will be done multiple times in case of duplicated rules.

Task : 1939567

closes odoo/odoo#47909

Related: odoo/upgrade#1814
Signed-off-by: default avatarWilliam Henrotin <Whenrow@users.noreply.github.com>
parent 5fc8254a
Branches
Tags
No related merge requests found
......@@ -104,6 +104,7 @@ class StockWarehouseOrderpoint(models.Model):
_sql_constraints = [
('qty_multiple_check', 'CHECK( qty_multiple >= 0 )', 'Qty Multiple must be greater than or equal to zero.'),
('product_location_check', 'unique (product_id, location_id, company_id)', 'The combination of product and location must be unique.'),
]
@api.depends('warehouse_id')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment