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: don't fetch item_code if already exists. #31113

Merged
merged 1 commit into from
May 25, 2022

Conversation

dj12djdjs
Copy link
Collaborator

The problem is if you're processing a return where an old barcode no longer exists in the item master. You'll get an error Barcode for item X not found.

The solution, if the item_code already exists, no need to fetch it.

@github-actions github-actions bot added needs-tests This PR needs automated unit-tests. stock labels May 24, 2022
@ankush
Copy link
Member

ankush commented May 24, 2022

Ah, I came across this just recently!

@ankush ankush added backport version-13-hotfix and removed needs-tests This PR needs automated unit-tests. labels May 24, 2022
@codecov
Copy link

codecov bot commented May 24, 2022

Codecov Report

Merging #31113 (4f8172c) into develop (1ecb8f4) will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop   #31113      +/-   ##
===========================================
+ Coverage    63.14%   63.19%   +0.05%     
===========================================
  Files          986      986              
  Lines        67361    67361              
===========================================
+ Hits         42535    42569      +34     
+ Misses       24826    24792      -34     
Impacted Files Coverage Δ
erpnext/stock/get_item_details.py 80.44% <100.00%> (ø)
...tch_item_expiry_status/batch_item_expiry_status.py 67.92% <0.00%> (-24.53%) ⬇️
...wise_balance_history/batch_wise_balance_history.py 67.79% <0.00%> (-22.04%) ⬇️
erpnext/hr/doctype/job_offer/job_offer.py 82.92% <0.00%> (-4.88%) ⬇️
.../fifo_queue_vs_qty_after_transaction_comparison.py 93.10% <0.00%> (-1.73%) ⬇️
erpnext/crm/doctype/prospect/prospect.py 56.71% <0.00%> (-1.50%) ⬇️
...ype/account/chart_of_accounts/chart_of_accounts.py 76.87% <0.00%> (-0.69%) ⬇️
erpnext/stock/doctype/batch/batch.py 82.80% <0.00%> (-0.64%) ⬇️
...t/accounts/report/sales_register/sales_register.py 70.76% <0.00%> (-0.59%) ⬇️
erpnext/selling/doctype/quotation/quotation.py 52.04% <0.00%> (-0.52%) ⬇️
... and 29 more

@ankush ankush merged commit 55276f1 into frappe:develop May 25, 2022
mergify bot pushed a commit that referenced this pull request May 25, 2022
fix: check if item_code exists before fetching
(cherry picked from commit 55276f1)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants