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

feat: BOM now explodes items based on both item_code AND item_name #45188

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

mihir-kandoi
Copy link
Contributor

@mihir-kandoi mihir-kandoi commented Jan 9, 2025

Reference issue: #44043

Current behaviour:
Upon saving a BOM, exploded items were computed based on only the item_code. If 2 items with same item_code but different item_name were added, ERPNext would merge them into 1.

New behaviour:
Now when user saves a BOM, ERPNext will check if both item_code and item_name fields are same and only then merge them.

no-docs

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Jan 9, 2025
se.items[0].stock_uom = "Kg"
se.save()

self.assertEqual(se.items[0].item_name, item.item_name)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rohitwaghchaure this is possible very very wrong because I am removing an assert/test.

In this PR, I have removed the behaviour where user would change item_name and it would be reset back to the item_name from its Item document. I could not find this being used anywhere else but still not sure if this would break things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-tests This PR needs automated unit-tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant