mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 02:44:52 +00:00
fix: Stock Reservation validation in Stock Settings
This commit is contained in:
@@ -108,7 +108,9 @@ class StockSettings(Document):
|
|||||||
"Stock Settings", "enable_stock_reservation"
|
"Stock Settings", "enable_stock_reservation"
|
||||||
)
|
)
|
||||||
|
|
||||||
if db_enable_stock_reservation and frappe.db.count("Stock Reservation Entry"):
|
if db_enable_stock_reservation and frappe.db.exists(
|
||||||
|
"Stock Reservation Entry", {"docstatus": 1, "status": ["!=", "Delivered"]}
|
||||||
|
):
|
||||||
frappe.throw(
|
frappe.throw(
|
||||||
_("As there are existing {0}, you can not change the value of {1}.").format(
|
_("As there are existing {0}, you can not change the value of {1}.").format(
|
||||||
frappe.bold("Stock Reservation Entries"), frappe.bold("Enable Stock Reservation")
|
frappe.bold("Stock Reservation Entries"), frappe.bold("Enable Stock Reservation")
|
||||||
|
|||||||
Reference in New Issue
Block a user