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: better handling of duplicate bundle items (backport #33562) #33587

Merged
merged 1 commit into from
Jan 9, 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: 2 additions & 2 deletions erpnext/stock/doctype/packed_item/packed_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ def reset_packing_list(doc):
# 1. items were deleted
# 2. if bundle item replaced by another item (same no. of items but different items)
# we maintain list to track recurring item rows as well
items_before_save = [item.item_code for item in doc_before_save.get("items")]
items_after_save = [item.item_code for item in doc.get("items")]
items_before_save = [(item.name, item.item_code) for item in doc_before_save.get("items")]
items_after_save = [(item.name, item.item_code) for item in doc.get("items")]
reset_table = items_before_save != items_after_save
else:
# reset: if via Update Items OR
Expand Down