Transfer material from one company to another

Can we do a material transfer request from one company to another?

I have two companies, each with their own warehouses. If I see that another company has a product in stock but my current company doesn’t. How do I get that other company to send some to me?

i think different company stock transfer should be done with sals cycle not just a material transfer

1 Like

Hi @Nathan

@bobzz_zone is right the inter-company sales transfer is done by Sales Cycle in standard practices because it involves lots of taxes ans statutory documents.

Ruchin Sharma

1 Like

In a multi-company setup, where Company A supplies Company B, there is no way to select the source warehouse of Company A (Delivery Warehouse in Sales/Purchase Order Item) with a target warehouse of Company B. If Company B has the need (i.e. Company B wants to purchase stock from Company A), then the order (whether Purchase or Sales order) should be raised by Company B.

However if the company is set as Company B, the source warehouse (in Company A) cannot be selected. The reverse is true if placing the order as Company A (i.e. cannot set the target warehouse as Company B).

I suspect this is the issue that @Nathan is referring to (and is looking for alternatives by suggesting the use of stock transfers). We have the same problem.

This is quite a stumbling block for us and as a workaround I’ve commented out the exception in stock/

validate_warehouse_company(warehouse, company)

There’s also the issue of perspective. As far as Company B is concerned, it is making a PO to Company A. I guess the ‘proper workaround’ would be to change the chart of accounts so that Company B is ‘owned’ by Company A (although in reality this isn’t the case).

No, you need to create a customer record for company B.
And then by using O2C cycle you will sell the goods to company B.

Ruchin Sharma

Hi @ruchin78

I had already created a customer record for Company B - but Company B doesn’t have a target stock location.

Company B is basically a franchise operator and they have serialised stock in their shops that will be tracked within ERPNext. They should purchase the stock items from the head office (Company A is the Supplier to Company B) and therefore the stock needs to be transferred to their shop stock location (each franchise has multiple shops) and Company A should invoice Company B (even though Company B is an ‘internal’ company within ERPNext).

The setup is as follows:

Company A (Head office)
– Has direct ‘public’ customers
– Has internal customers (franchisees)

Stock Flows are therefore:
SUPPLY: Supplier → Company A Warehouse
DIRECT SALES: Company A Warehouse → End customer
INTERNAL SALES: Company A Warehouse → Company B Warehouse

Company B (Franchisee)
– Has direct ‘public’ customers (stock sold from their own store warehouse)
– Is a customer of Company A

Stock Flows are therefore:
SUPPLY: Company A → Company B Warehouse
DIRECT SALES: Company B Warehouse → End customer

Essentially when a user from Company B logs in to ERPNext, they should be able to see only customers, stock etc related to them and they should be able to raise PO’s for Company A for which the target warehouse is one of Company B’s store stock locations.

Hope this makes sense.

1 Like

Dear @frappeval,

Tell me only one thing, when you raise an invoice to the customer do you select the Target Warehouse of the customer.

I hope your answer will be “NO”, therefore you not need to worry about the Company “B” warehouse.

You just raise a Sales Invoice to customer “B” that’s it.

The customer (from Company A’s point of view) is Company B. Company B however has several physical stores (and therefore several warehouses hence the requirement to specify Target Warehouse as they will need to track stock in their shops).

Company B is a separate legal entity to Company A.

Company A should invoice Company B for stock purchases.

Customers of Company B belong to Company B.

Dear @frappeval,

Vendor doesn’t care about the Customer’s warehouse.
Do you tell your vendor in which store/warehouse you will be receiving the materials from outside (purchase).
In the same way, when you sell your stuff to Customer, you don’t need to take care of customer’s warehouse.

Customer will follow the purchase receiving process at their end and then they will decide in which store/warehouse they want to transfer material?

Ruchin Sharma

As the Vendor, Company A, needs to know where to physically ship the stock to. Company B is buying stock from Company A and will receive the stock into the location the goods were shipped to (one of Company B’s physical shops, of which there might be many).

So yes, Company A needs to know where the stock is going and, once received, Company A will invoice Company B.


Practically it is not recommended and feasible, that that vendor should know the supplier warehouse.
All the invoice you receive from your vendor, does it has your warehouse information?

Ruchin Sharma

I maybe haven’t made this very clear…

Companies A and B are entities set up within ERP Next. Companies A and B have their own suppliers and customers.

Company A buys serialised stock from various suppliers and receives this stock into one of several stock locations.
Company A have direct ‘end customers’ -i.e. the public.
Company A also have franchise operators to which stock is sold (i.e. the ‘end customer’ of that stock is a customer of Company B - perhaps in Shop 1).

Company B is a legally and physically separate company, operating as a franchise. They want to use the same ERP as Company A. They have several shops on the high street and, as part of the franchise agreement, have to purchase certain stock directly from Company A.

Company B should therefore be able to raise a PO with Company A and Company A need to know where to send that serialised stock (i.e. one of Company B’s several shops - Shop 1).

Once the delivery arrives at Company B’s shops, they should only be able to receive it into the store location that it is expected at (i.e. the Delivery Note and the Stock Move should show that the stock has been sent to Company B, Shop 1 and received accordingly. Shop 2 should not be able to receive the goods).

I have been looking for a similar post in the forum and am glad this has already been posted over here. Although not seen any further comments to @frappeval which is sufficiently detailed.

The feature requested here aims at making ERP a system which can be used as a Franchise based software by partnering companies (Company B in example above). So this is a B2B and B2C model.

The sale will only take place for Company A to Company B once Company B has sold the inventory item to its customer. Till this point the transaction is just a invenory lending transaction.

I do not believe this is currently possible in ERP but would be a really good feature (according to me) as it then enables companies to migrate from the low user ERP plans (just Company A) to the high user ERP plans (Company A along with franchise partners like Company B) and at the same time build a successful franchise business models which currently I do not believe is technically possible based on the above post.

1 Like


I need to realize the direct materials transfer between multiple companies’ warehouses in Stock Entry.
In normal case, we have some filters which don’t allow us to select warehouse from other company.
Basically I need that material transfer would allow me to select Default Source Warehouse and Default Target Warehouse from all warehouses of all companies which registered in my ERPNext.

I found the stock/ file, which contains validate_warehouse_company(warehouse, company) function.
I want to comment this function and comment code that calls this function outside, from other classes.
What further steps I need to do for removing these filters?

Inter-company transactions are not possible right now. Commenting out the filters / validation will not work. Because, still stock ledger entry / accounting entries will be posted wrongly.

Thank you for the reply.

Do you have plans to realize such kind of transactions in near future?

It is in our long term to do list, though no ETA.

1 Like

Replying to previous posts,
Can you tell me, which code is responsible for displaying items from dropdown menu?
I need to display all items from all warehouses.
I suppose that stock entry/stock entry.js is responsible for it?

It’s been nearly 4 years and nothing has been said about inter-company stock transfer.

Scratch the itch