From 6702506f58f8a72627545078b6dada167f589e42 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 6 Mar 2026 17:35:12 +0530 Subject: [PATCH] fix: HRMS test cases failing due to validation in item --- erpnext/stock/doctype/item/item.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index 91fd07a2de9..327e1bb09c4 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -231,7 +231,6 @@ class Item(Document): self.validate_auto_reorder_enabled_in_stock_settings() self.cant_change() self.validate_item_tax_net_rate_range() - self.validate_allow_to_set_serial_batch() if not self.is_new(): self.old_item_group = frappe.db.get_value(self.doctype, self.name, "item_group") @@ -240,18 +239,6 @@ class Item(Document): self.update_variants() self.update_item_price() - def validate_allow_to_set_serial_batch(self): - if not self.has_serial_no and not self.has_batch_no: - return - - if not frappe.db.get_single_value("Stock Settings", "enable_serial_and_batch_no_for_item"): - frappe.throw( - _( - "Please check the 'Enable Serial and Batch No for Item' checkbox in the {0} to set Serial No or Batch No for the item." - ).format(get_link_to_form("Stock Settings", "Stock Settings")), - title=_("Serial and Batch No for Item Disabled"), - ) - def validate_description(self): """Clean HTML description if set""" if (