From 8a5538af56eaba5da68eb02cf339a7fc4e332587 Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Wed, 25 Mar 2020 12:16:26 -0700 Subject: [PATCH] IMP `purchase_by_sale_history_mrp` Improve messaging (include product id) when multiple BoMs prevent wizard. --- .../wizard/purchase_by_sale_history.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/purchase_by_sale_history_mrp/wizard/purchase_by_sale_history.py b/purchase_by_sale_history_mrp/wizard/purchase_by_sale_history.py index b7f431eb..56da00d3 100644 --- a/purchase_by_sale_history_mrp/wizard/purchase_by_sale_history.py +++ b/purchase_by_sale_history_mrp/wizard/purchase_by_sale_history.py @@ -31,7 +31,8 @@ class PurchaseBySaleHistory(models.TransientModel): product_ids_dict = {} for pid, ratio in product_ids: if pid in product_ids_dict: - raise UserError('You cannot have two identical finished goods being created from different ratios.') + raise UserError('You cannot have two identical finished goods being created ' + 'from different ratios/BoMs. Finished Product ID: %s' % (pid, )) product_ids_dict[pid] = {'ratio': ratio} history = self._sale_history(product_ids_dict.keys())