-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
feat: (Stock Reco) Ignore Empty Stock while fetching items from warehouse #26726
feat: (Stock Reco) Ignore Empty Stock while fetching items from warehouse #26726
Conversation
…ouse - Added checkbox to `Fetch Items from Warehouse` dialog to ignore empty stock - fix: Items fetched twice due to Item Defaults - Improved code readability
The backport to
|
fieldtype: 'Link', | ||
options: 'Warehouse', | ||
reqd: 1, | ||
"get_query": function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can also be written as:
get_query() {
Succinct, ain't it?
# check if item-warehouse key extracted from each entry exists in set iw_keys | ||
# and update iw_keys | ||
iw_keys = set() | ||
items = [item for item in items if [(item.item_code, item.warehouse) not in iw_keys, iw_keys.add((item.item_code, item.warehouse))][0]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is hard to read
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pretty clever though
…empty-stock feat: (Stock Reco) Ignore Empty Stock while fetching items from warehouse
Fetch Items from Warehouse
popupWorking while checked:
Working while unchecked:
Additional Fix:
no_docs