From e5344cc07e1dc110e8a58563ec4368b8a0ee947c Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 11 Aug 2026 12:34:00 +0530 Subject: [PATCH] test: overproduction allowance permits a further manufacture entry --- erpnext/stock/doctype/stock_entry/test_stock_entry.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/stock/doctype/stock_entry/test_stock_entry.py b/erpnext/stock/doctype/stock_entry/test_stock_entry.py index c4f3469e1c4..56d2a6c0efb 100644 --- a/erpnext/stock/doctype/stock_entry/test_stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/test_stock_entry.py @@ -1297,6 +1297,12 @@ class TestStockEntry(ERPNextTestSuite): duplicate = frappe.get_doc(make_wo_stock_entry(wo.name, "Manufacture", 1)) self.assertRaises(DuplicateEntryForWorkOrderError, duplicate.insert) + with self.change_settings( + "Manufacturing Settings", {"overproduction_percentage_for_work_order": 100} + ): + within_allowance = frappe.get_doc(make_wo_stock_entry(wo.name, "Manufacture", 1)) + within_allowance.insert() + @ERPNextTestSuite.change_settings("Stock Settings", {"action_if_quality_inspection_is_rejected": "Stop"}) def test_quality_inspection_required_for_manufacture(self): from erpnext.exceptions import QualityInspectionRejectedError, QualityInspectionRequiredError