mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-14 20:35:09 +00:00
fix: removed display depends on
(cherry picked from commite0bf45e03b) (cherry picked from commit00b25537f4) # Conflicts: # erpnext/stock/doctype/stock_settings/stock_settings.json
This commit is contained in:
committed by
Mergify
parent
ff41ed534b
commit
b8436dbd21
@@ -456,7 +456,6 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"default": "0",
|
"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.",
|
"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",
|
"fieldname": "do_not_use_batchwise_valuation",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
@@ -510,7 +509,11 @@
|
|||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"issingle": 1,
|
"issingle": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
|
<<<<<<< HEAD
|
||||||
"modified": "2025-03-31 15:34:20.752065",
|
"modified": "2025-03-31 15:34:20.752065",
|
||||||
|
=======
|
||||||
|
"modified": "2025-04-11 18:56:35.781929",
|
||||||
|
>>>>>>> 00b25537f4 (fix: removed display depends on)
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Stock Settings",
|
"name": "Stock Settings",
|
||||||
|
|||||||
@@ -105,22 +105,6 @@ class StockSettings(Document):
|
|||||||
self.validate_stock_reservation()
|
self.validate_stock_reservation()
|
||||||
self.change_precision_for_for_sales()
|
self.change_precision_for_for_sales()
|
||||||
self.change_precision_for_purchase()
|
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):
|
def validate_warehouses(self):
|
||||||
warehouse_fields = ["default_warehouse", "sample_retention_warehouse"]
|
warehouse_fields = ["default_warehouse", "sample_retention_warehouse"]
|
||||||
|
|||||||
Reference in New Issue
Block a user