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

Issue: Stock Entry uses incorrect company when generated from Pick List #44678

Closed
hqnicolas opened this issue Dec 12, 2024 · 0 comments
Closed
Labels

Comments

@hqnicolas
Copy link
Contributor

Information about bug

When creating a Stock Entry from a Pick List, the company associated with the Stock Entry is incorrect. This occurs even when the Pick List is created from a Material Request with the correct company.

Module

stock

Version

V14

Installation method

docker

Relevant log output / Stack trace / Full Error Message.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants