diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.json b/erpnext/stock/doctype/stock_settings/stock_settings.json index 2304359ab00..ea79b78132a 100644 --- a/erpnext/stock/doctype/stock_settings/stock_settings.json +++ b/erpnext/stock/doctype/stock_settings/stock_settings.json @@ -470,7 +470,6 @@ }, { "default": "0", - "depends_on": "eval:doc.valuation_method === \"Moving Average\"", "description": "If enabled, the system will use the moving average valuation method to calculate the valuation rate for the batched items and will not consider the individual batch-wise incoming rate.", "fieldname": "do_not_use_batchwise_valuation", "fieldtype": "Check", @@ -539,7 +538,7 @@ "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2025-04-10 16:19:31.210007", + "modified": "2025-04-11 18:56:35.781929", "modified_by": "Administrator", "module": "Stock", "name": "Stock Settings", diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.py b/erpnext/stock/doctype/stock_settings/stock_settings.py index 2ed8686c653..82b62fb4062 100644 --- a/erpnext/stock/doctype/stock_settings/stock_settings.py +++ b/erpnext/stock/doctype/stock_settings/stock_settings.py @@ -106,22 +106,6 @@ class StockSettings(Document): self.validate_stock_reservation() self.change_precision_for_for_sales() self.change_precision_for_purchase() - self.validate_use_batch_wise_valuation() - - def validate_use_batch_wise_valuation(self): - if not self.do_not_use_batchwise_valuation: - return - - if self.valuation_method == "FIFO": - frappe.throw(_("Cannot disable batch wise valuation for FIFO valuation method.")) - - if frappe.get_all( - "Item", filters={"valuation_method": "FIFO", "is_stock_item": 1, "has_batch_no": 1}, limit=1 - ): - frappe.throw(_("Can't disable batch wise valuation for items with FIFO valuation method.")) - - if frappe.get_all("Batch", filters={"use_batchwise_valuation": 1}, limit=1): - frappe.throw(_("Can't disable batch wise valuation for active batches.")) def validate_warehouses(self): warehouse_fields = ["default_warehouse", "sample_retention_warehouse"]