[fixes] set warehouse group wise reorder level, validate ledger (leaf warehouse) on sle and bin

This commit is contained in:
Saurabh
2016-06-20 17:25:45 +05:30
parent 554f6f70aa
commit 3d6aecd618
8 changed files with 115 additions and 12 deletions

View File

@@ -187,3 +187,9 @@ def validate_warehouse_company(warehouse, company):
if warehouse_company and warehouse_company != company:
frappe.throw(_("Warehouse {0} does not belong to company {1}").format(warehouse, company),
InvalidWarehouseCompany)
def is_leaf_warehouse(warehouse):
if frappe.db.get_value("Warehouse", warehouse, "is_group") == "No":
return True
return False