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: Pick Template BOM if variant BOM absent in WO popup from SO #31353

Merged
merged 3 commits into from
Jun 15, 2022

Conversation

marination
Copy link
Collaborator

Closes #30655

Issue:

  • BOM field stays blank if no Variant BOM is found in WO pop-up via Sales Order. Can't manually select BOM either due to filter
    2022-06-14 17 25 51

Fix:

  • Pull BOM from template if variant BOM does not exist
    2022-06-14 17 24 12

- Use `get_default_bom` in sales_order.py (reduce duplicate utility functions)
- Remove redundant if else in `get_work_order_items`
- `get_default_bom`: If no BOM and template exists try to fetch template BOM
- test: `get_work_order_items` via SO and if right BOM is picked
@codecov
Copy link

codecov bot commented Jun 15, 2022

Codecov Report

Merging #31353 (fafdaff) into develop (b8f728a) will decrease coverage by 0.18%.
The diff coverage is 92.30%.

@@             Coverage Diff             @@
##           develop   #31353      +/-   ##
===========================================
- Coverage    63.55%   63.37%   -0.19%     
===========================================
  Files          984      984              
  Lines        67555    67556       +1     
===========================================
- Hits         42936    42812     -124     
- Misses       24619    24744     +125     
Impacted Files Coverage Δ
erpnext/stock/get_item_details.py 80.62% <90.00%> (+0.02%) ⬆️
erpnext/selling/doctype/sales_order/sales_order.py 80.47% <100.00%> (+0.36%) ⬆️
...unts/report/purchase_register/purchase_register.py 34.21% <0.00%> (-42.77%) ⬇️
...rial_no_valuation/incorrect_serial_no_valuation.py 59.64% <0.00%> (-26.32%) ⬇️
...e_sales_analytics/supplier_wise_sales_analytics.py 63.93% <0.00%> (-22.96%) ⬇️
...ext/accounts/report/balance_sheet/balance_sheet.py 36.36% <0.00%> (-21.82%) ⬇️
...e_purchase_register/item_wise_purchase_register.py 57.42% <0.00%> (-19.81%) ⬇️
erpnext/accounts/doctype/bank/bank.py 71.42% <0.00%> (-14.29%) ⬇️
...em_wise_sales_register/item_wise_sales_register.py 50.90% <0.00%> (-10.46%) ⬇️
...saction/incorrect_balance_qty_after_transaction.py 88.37% <0.00%> (-9.31%) ⬇️
... and 30 more

@marination marination added Unrelated Test(s) Failing Use when the failing test has nothing to do with PR. and removed Unrelated Test(s) Failing Use when the failing test has nothing to do with PR. labels Jun 15, 2022
@marination marination merged commit c83b404 into frappe:develop Jun 15, 2022
marination added a commit that referenced this pull request Jun 15, 2022
…-31353

fix: Pick Template BOM if variant BOM absent in WO popup from SO (backport #31353)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] default template item BOM not populated for variant item when creating work order for sales order item
1 participant