I need to transfer raw material items to a sub-contractor warehouse before placing sub-contracting Purchase Orders to the sub-contractor (supplier). The items listed are derived from a BOM.
Pupose of the STE is “Material Transfer”
The problem is that the target warehouse in each of the items remains empty after pressing “get items (from BOM)”. The default target warehouse is entered in the appropriate field above the list before clicking “get items” but it does not propagate to the list items and each item in the list needs to have the target warehouse entered manually.
Is there a better way to do this? Should I be using a different purpose for the STE ?
Did you read this?
The stock entry is made automatically after you make the Purchase Order based on “Raw Materials Supplied” table in Purchase Order
I create a PO for a supplier who is defined as a sub-contractor and has a default warehouse
In the PO I select “Is subcontracted”== Yes. When I submit the PO, the Raw material supplied list is populated. However, no Stock Entry is created automatically as you suggest.
The documentation that you reference to says “Make a Stock Entry…”! Somehow I remember that it should be automatically made.
What could the problem be?
Still, back to my first post in this thread, if I wish to pre-stock the subcontractor’s warehouse before making purchase orders, it would be helpful if the target warehouse field in each item in the list (pulled from the BOM) would default to the default target warehouse entered in the form.
What should be the correct value for the “Purpose” field in this case?
Stock Entry is not created automatically when you make a sub-contracting PO. You have to make a Stock Entry manually and there if you select purpose as
Subcontract, you will be able to fetch all the required items from BOM.
Automation is not there because many a times, we send items to subcontractor as per the stock in sub-contractor warehouse or more qty to minimize the transport cost.
Hello @nabinhait I fully agree on the logic that subcontractor stock usually needs to be built up before any PO’s go out.
I tried the STE using purpose == subcontract. Set default origin and target warehouses, pulled details from a BOM and submitted. — Nothing went into the subcontractor warehouse but all the items went out of the raw-material Stores warehouse. (And vanished into thin air). There was no validation warning regarding the lack of target warehouse for each item in the items list.
I tried again, this time I manually added the target warehouse for each line item and the items did go into the subcontractor warehouse after submitting.
Two issues here.
- Unlike a stock entry with purpose == material transfer, there is no validation warning regarding the lack of individual target warehouse for each item. A fix may be required here.
- A workaround is needed to populate each item in the item list with target warehouse based on the default warehouse. (With 50 line BOMs this can be quite tedious!) Can you suggest a script for this?
Thanks, we will fix/add those validations. Can you please raise an issue in github ( https://github.com/frappe/erpnext/issues )?