fix: validation for disabled warehouse (#24539)
* fix: validation for disabled warehouse * fix: better function name * fix: validation in stock ledger entry
This commit is contained in:
@@ -313,7 +313,7 @@ class StockController(AccountsController):
|
||||
return serialized_items
|
||||
|
||||
def validate_warehouse(self):
|
||||
from erpnext.stock.utils import validate_warehouse_company
|
||||
from erpnext.stock.utils import validate_warehouse_company, validate_disabled_warehouse
|
||||
|
||||
warehouses = list(set([d.warehouse for d in
|
||||
self.get("items") if getattr(d, "warehouse", None)]))
|
||||
@@ -329,6 +329,7 @@ class StockController(AccountsController):
|
||||
warehouses.extend(from_warehouse)
|
||||
|
||||
for w in warehouses:
|
||||
validate_disabled_warehouse(w)
|
||||
validate_warehouse_company(w, self.company)
|
||||
|
||||
def update_billing_percentage(self, update_modified=True):
|
||||
|
||||
Reference in New Issue
Block a user