From 03a6baede8f554d8262c6559c1e818dd23a87ac8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20BEAU?= Date: Mon, 6 Jun 2022 09:14:06 +0200 Subject: [PATCH] stock_mts_mto_rule: remove useless constraint Having the same src location is not needed and maybe wanted in some case For example the Manufacturing can be done in an other warehouse --- stock_mts_mto_rule/models/stock_rule.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/stock_mts_mto_rule/models/stock_rule.py b/stock_mts_mto_rule/models/stock_rule.py index aec5321c3..b63189e79 100644 --- a/stock_mts_mto_rule/models/stock_rule.py +++ b/stock_mts_mto_rule/models/stock_rule.py @@ -25,16 +25,6 @@ class StockRule(models.Model): "No MTS or MTO rule configured on procurement " "rule: %s!" ) % (rule.name,) raise ValidationError(msg) - if ( - rule.mts_rule_id.location_src_id.id - != rule.mto_rule_id.location_src_id.id - ): - msg = _( - "Inconsistency between the source locations of " - "the mts and mto rules linked to the procurement " - "rule: %s! It should be the same." - ) % (rule.name,) - raise ValidationError(msg) def get_mto_qty_to_order(self, product, product_qty, product_uom, values): self.ensure_one()