[minor] update warehouse_group in item.reorder_levels

This commit is contained in:
Rushabh Mehta 2017-09-06 12:25:18 +05:30
parent 2697e332f3
commit 134d59949a

View File

@ -488,6 +488,8 @@ class Item(WebsiteGenerator):
def validate_warehouse_for_reorder(self):
warehouse = []
for i in self.get("reorder_levels"):
if not i.warehouse_group:
i.warehouse_group = i.warehouse
if i.get("warehouse") and i.get("warehouse") not in warehouse:
warehouse += [i.get("warehouse")]
else: