fix(ux): don't show Stock Reservation btn if Stock Reservation is disabled

This commit is contained in:
s-aga-r
2023-03-31 22:08:12 +05:30
parent 632f27b10d
commit ef34f703d4

View File

@@ -45,6 +45,7 @@ class SalesOrder(SellingController):
super(SalesOrder, self).__init__(*args, **kwargs) super(SalesOrder, self).__init__(*args, **kwargs)
def onload(self): def onload(self):
if frappe.get_cached_value("Stock Settings", None, "enable_stock_reservation"):
from erpnext.stock.doctype.stock_reservation_entry.stock_reservation_entry import ( from erpnext.stock.doctype.stock_reservation_entry.stock_reservation_entry import (
has_reserved_stock, has_reserved_stock,
) )