fix: time out while submitting the stock transactions with more than 50 items

This commit is contained in:
Rohit Waghchaure
2021-06-15 10:21:44 +05:30
parent 6894cc2832
commit 4d81d45a0e
5 changed files with 93 additions and 33 deletions

View File

@@ -177,7 +177,7 @@ def get_bin(item_code, warehouse):
return bin_obj
def update_bin(args, allow_negative_stock=False, via_landed_cost_voucher=False):
is_stock_item = frappe.db.get_value('Item', args.get("item_code"), 'is_stock_item')
is_stock_item = frappe.get_cached_value('Item', args.get("item_code"), 'is_stock_item')
if is_stock_item:
bin = get_bin(args.get("item_code"), args.get("warehouse"))
bin.update_stock(args, allow_negative_stock, via_landed_cost_voucher)