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: getting scrap items from sub assemblies by fetching scrap items for parent BOM #42928

Merged
merged 5 commits into from
Jan 16, 2025

Conversation

KerollesFathy
Copy link

Closes #40658

Problem:

  • when creating a Stock Entry from a Work Order (click on finish button on Work Order and enter Qty for Manufacture and click Create). Specifically, when the "Set Operating Cost / Scrap Items From Sub-assemblies" option is enabled in Manufacturing Settings, the Stock Entry fails to correctly fetch the scrap items for BOM Item that on Work Order.

  • The problem occurs because the scrap items from sub-assemblies do not consider the BOM Scrap Item of the Parent BOM (fieldlabel : BOM No ) in the Work Order. This leads to incorrect stock entries.

How to reproduce the bug 🐛 :

scrap_item_issue_man_settings
issue_wo_details
issue_bom_scrap_items
issue_finish_button
issue_stock_entry_without_scraped_items

Proposed Solution

This update will ensure that the Stock Entry accurately considers the Parent BOM's scrap items when generating stock entries from Work Orders.

  • Stock Entry after fix ⬇️ :
    issue_after_fix

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Aug 26, 2024
@rohitwaghchaure
Copy link
Collaborator

@KerollesFathy Add test case

@KerollesFathy
Copy link
Author

KerollesFathy commented Aug 29, 2024

@rohitwaghchaure, the test case has been added. Please review it. 🙏🏻

Copy link

stale bot commented Sep 14, 2024

This pull request has been automatically marked as inactive because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.

@stale stale bot added the inactive label Sep 14, 2024
@meaziz
Copy link
Contributor

meaziz commented Dec 9, 2024

@KerollesFathy can you review this merge conflict and reopen the pull request

@stale stale bot removed the inactive label Dec 9, 2024
@s-aga-r s-aga-r removed their request for review December 10, 2024 07:49
@KerollesFathy
Copy link
Author

@rohitwaghchaure Please review this PR

Copy link

stale bot commented Dec 29, 2024

This pull request has been automatically marked as inactive because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.

@stale stale bot added the inactive label Dec 29, 2024
@stale stale bot closed this Jan 3, 2025
@stale stale bot removed the inactive label Jan 16, 2025
@rohitwaghchaure rohitwaghchaure self-assigned this Jan 16, 2025
@github-actions github-actions bot removed the needs-tests This PR needs automated unit-tests. label Jan 16, 2025
@rohitwaghchaure rohitwaghchaure merged commit a11c15a into frappe:version-15-hotfix Jan 16, 2025
21 checks passed
@rohitwaghchaure rohitwaghchaure added the backport develop instructs mergify to frontport PR to develop branch label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport develop instructs mergify to frontport PR to develop branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants