fix: avoid creating bins without item-wh

Co-Authored-By:  Shadrak Gurupnor <30501401+shadrak98@users.noreply.github.com>
Co-Authored-By: Saurabh <saurabh6790@gmail.com>
(cherry picked from commit c36bd7e1a6)
This commit is contained in:
Ankush Menat
2022-02-17 19:25:00 +05:30
committed by Ankush Menat
parent bdef164061
commit 90ebe6f266
4 changed files with 11 additions and 4 deletions

View File

@@ -1956,7 +1956,8 @@ def update_bin_on_delete(row, doctype):
qty_dict["ordered_qty"] = get_ordered_qty(row.item_code, row.warehouse)
update_bin_qty(row.item_code, row.warehouse, qty_dict)
if row.warehouse:
update_bin_qty(row.item_code, row.warehouse, qty_dict)
def validate_and_delete_children(parent, data):
deleted_children = []