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: Stock Entry uses incorrect company when generated from Pick List (backport #44679) (backport #44681) #44836

Merged

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Dec 23, 2024

Corrects the problem where the Stock Record associated with the Separation List uses the incorrect company.
The change ensures that the Stock Record uses the company of the original Material Requisition.
Steps to Reproduce
1 Create a Material Requisition of type "Material Transfer" for a specific company code (e.g. "Company2").
2 Create a Picking List from the Requisition.
3 Generate a Stock Entry from the Picking List.
4 Verify that the company code associated with the Stock Entry does not match the company code of the original Requisition ("Company2").
Issue Location
The issue is likely located in the pick_list.py file (lines 865-878) of the "erpnext.stock.doctype.pick_list". module.
Proposed Solution
To fix this issue, it is suggested to change the line stock_entry.company = pick_list.get("company") to get the correct company code from the original Material Requisition.

#44678


This is an automatic backport of pull request #44679 done by [Mergify](https://mergify.com).
This is an automatic backport of pull request #44681 done by [Mergify](https://mergify.com).

@mergify mergify bot requested a review from rohitwaghchaure as a code owner December 23, 2024 05:59
@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Dec 23, 2024
@ruthra-kumar ruthra-kumar merged commit 5984140 into version-15-hotfix Dec 23, 2024
12 checks passed
@ruthra-kumar ruthra-kumar deleted the mergify/bp/version-15-hotfix/pr-44681 branch December 23, 2024 06:26
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.

2 participants