Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: timeout error coming during reposting (backport #36715) #36717

Merged
merged 1 commit into from
Aug 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion erpnext/stock/stock_ledger.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ def get_dependent_entries_to_fix(self, entries_to_fix, sle):

def update_distinct_item_warehouses(self, dependant_sle):
key = (dependant_sle.item_code, dependant_sle.warehouse)
val = frappe._dict({"sle": dependant_sle, "dependent_voucher_detail_nos": []})
val = frappe._dict({"sle": dependant_sle})

if key not in self.distinct_item_warehouses:
self.distinct_item_warehouses[key] = val
Expand All @@ -661,6 +661,8 @@ def update_distinct_item_warehouses(self, dependant_sle):

if getdate(dependant_sle.posting_date) < getdate(existing_sle_posting_date):
val.sle_changed = True
dependent_voucher_detail_nos.append(dependant_sle.voucher_detail_no)
val.dependent_voucher_detail_nos = dependent_voucher_detail_nos
self.distinct_item_warehouses[key] = val
self.new_items_found = True
elif dependant_sle.voucher_detail_no not in set(dependent_voucher_detail_nos):
Expand Down
Loading