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: allow recursive BOMs as long as they don't recursively explode #31175

Merged
merged 4 commits into from
May 30, 2022

Conversation

ankush
Copy link
Member

@ankush ankush commented May 30, 2022

This PR: #27157 blocked the creation of BOMs that where the item is present in any level of BOM. However, some use cases are simplified by using recursive BOM, hence adding this functionality back but only when item doesn't have BOM itself. This can be done by using "Do not explode": #29450

New logic:

  • Parent BOM No. can never appear in BOM's tree
  • Parent item code can appear as long as it's a child item without a BOM.

Unrelated changes:

  • Show "New version" button (duplicating is not obvious to users)
  • Fix issue with BOM no getting erased and reset with default.

closes #31159

ankush added 3 commits May 30, 2022 10:40
"duplicate" technically creates a new version but that's not intuitive
at all.
Recursion should be allowed as long as child item is not "exploded"
further by a BOM.
@ankush
Copy link
Member Author

ankush commented May 30, 2022

Some unrelated test failing, probably due to translations caching... will fix separately 😅

@codecov
Copy link

codecov bot commented May 30, 2022

Codecov Report

Merging #31175 (d7a7c47) into develop (4df76f3) will decrease coverage by 0.14%.
The diff coverage is 92.30%.

@@             Coverage Diff             @@
##           develop   #31175      +/-   ##
===========================================
- Coverage    63.09%   62.95%   -0.15%     
===========================================
  Files          986      986              
  Lines        67424    67422       -2     
===========================================
- Hits         42543    42445      -98     
- Misses       24881    24977      +96     
Impacted Files Coverage Δ
erpnext/manufacturing/doctype/bom/bom.py 87.76% <91.66%> (+0.28%) ⬆️
...y_inspection_summary/quality_inspection_summary.py 93.54% <100.00%> (-0.21%) ⬇️
...unts/report/purchase_register/purchase_register.py 34.21% <0.00%> (-44.08%) ⬇️
...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%> (-20.80%) ⬇️
...em_wise_sales_register/item_wise_sales_register.py 51.13% <0.00%> (-10.86%) ⬇️
...urity_shortfall/process_loan_security_shortfall.py 93.75% <0.00%> (-6.25%) ⬇️
erpnext/crm/doctype/prospect/prospect.py 55.22% <0.00%> (-1.50%) ⬇️
.../report/accounts_receivable/accounts_receivable.py 70.85% <0.00%> (-1.26%) ⬇️
...t/accounts/report/sales_register/sales_register.py 70.76% <0.00%> (-1.17%) ⬇️
... and 21 more

@rohitwaghchaure rohitwaghchaure merged commit 2cbc665 into frappe:develop May 30, 2022
@ankush ankush deleted the recursive_non_explosive_bom branch May 30, 2022 07:58
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

allow single level recursive BOMs when child item itself doesn't have BOM
2 participants