mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 19:59:12 +00:00
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
This commit is contained in:
@@ -809,6 +809,8 @@ class StockEntry(StockController):
|
||||
Raises:
|
||||
frappe.ValidationError: If warehouses are same and no inventory dimensions differ
|
||||
"""
|
||||
|
||||
if frappe.get_single_value("Stock Settings", "validate_material_transfer_warehouses"):
|
||||
from erpnext.stock.doctype.inventory_dimension.inventory_dimension import get_inventory_dimensions
|
||||
|
||||
inventory_dimensions = get_inventory_dimensions()
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"show_barcode_field",
|
||||
"clean_description_html",
|
||||
"allow_internal_transfer_at_arms_length_price",
|
||||
"validate_material_transfer_warehouses",
|
||||
"serial_and_batch_item_settings_tab",
|
||||
"section_break_7",
|
||||
"allow_existing_serial_no",
|
||||
@@ -530,6 +531,13 @@
|
||||
"label": "Update Price List Based On",
|
||||
"mandatory_depends_on": "eval: doc.auto_insert_price_list_rate_if_missing",
|
||||
"options": "Rate\nPrice List Rate"
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
"description": "If enabled, the source and target warehouse in the Material Transfer Stock Entry must be different else an error will be thrown. If inventory dimensions are present, same source and target warehouse can be allowed but atleast any one of the inventory dimension fields must be different.",
|
||||
"fieldname": "validate_material_transfer_warehouses",
|
||||
"fieldtype": "Check",
|
||||
"label": "Validate Material Transfer Warehouses"
|
||||
}
|
||||
],
|
||||
"icon": "icon-cog",
|
||||
@@ -537,8 +545,8 @@
|
||||
"index_web_pages_for_search": 1,
|
||||
"issingle": 1,
|
||||
"links": [],
|
||||
"modified": "2025-10-17 18:32:35.829395",
|
||||
"modified_by": "hello@aerele.in",
|
||||
"modified": "2025-11-11 11:35:39.864923",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Stock Settings",
|
||||
"owner": "Administrator",
|
||||
|
||||
@@ -67,6 +67,7 @@ class StockSettings(Document):
|
||||
update_price_list_based_on: DF.Literal["Rate", "Price List Rate"]
|
||||
use_naming_series: DF.Check
|
||||
use_serial_batch_fields: DF.Check
|
||||
validate_material_transfer_warehouses: DF.Check
|
||||
valuation_method: DF.Literal["FIFO", "Moving Average", "LIFO"]
|
||||
# end: auto-generated types
|
||||
|
||||
|
||||
Reference in New Issue
Block a user