diff --git a/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py b/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py index 08aa978aa992..68c47b0d577b 100644 --- a/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py +++ b/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py @@ -749,10 +749,6 @@ def validate_serial_batch_no(self, serial_batches): ) def validate_incorrect_serial_nos(self, serial_nos): - if self.voucher_type == "Stock Entry" and self.voucher_no: - if frappe.get_cached_value("Stock Entry", self.voucher_no, "purpose") == "Repack": - return - incorrect_serial_nos = frappe.get_all( "Serial No", filters={"name": ("in", serial_nos), "item_code": ("!=", self.item_code)}, diff --git a/erpnext/stock/doctype/stock_entry/test_stock_entry.py b/erpnext/stock/doctype/stock_entry/test_stock_entry.py index a9529cc2edef..41b47a8a733c 100644 --- a/erpnext/stock/doctype/stock_entry/test_stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/test_stock_entry.py @@ -970,6 +970,7 @@ def test_nagative_stock_for_batch(self): self.assertRaises(frappe.ValidationError, ste.submit) +<<<<<<< HEAD def test_same_serial_nos_in_repack_or_manufacture_entries(self): s1 = make_serialized_item(target_warehouse="_Test Warehouse - _TC") serial_nos = get_serial_nos_from_bundle(s1.get("items")[0].serial_and_batch_bundle) @@ -1025,6 +1026,8 @@ def test_same_serial_nos_in_repack_or_manufacture_entries(self): s2.cancel() frappe.flags.use_serial_and_batch_fields = False +======= +>>>>>>> 93c8b4c39a (fix: validation for serial no (#44133)) def test_quality_check(self): item_code = "_Test Item For QC" if not frappe.db.exists("Item", item_code):