Odoo Help


Is it possible to split up a procurement based on another location's stock levels?

on 8/13/15, 7:29 AM 1,564 views

Is there any system within Odoo v8 for filling one need (e.g. a procurement generated from a sales order, manufacturing order, etc.) from multiple sources (e.g. internal transfer and procurement) based on existing stock?  Odoo is obviously very good at doing this within a particular location (e.g. I have 4 in stock, and need 10, and it generates a PO for the remaining 6) but I haven't been able to find the right method to make this intelligent splitting apply between locations (e.g. there are 4 in another warehouse, transfer those four and purchase 6 more directly to the warehouse that needs them).

There are a number of situations that would be covered by this sort of split, but I think the simplest one to illustrate it is when you have >2 warehouses, and would prefer to transfer from more than one instead of purchasing stock.  As an example:


Manage multiple locations is on, as is manage advanced routes.  All warehouses use “Receive goods directly in stock” and “Ship directly from Stock.”  There are three warehouses:

Storage1 – Purchase to resupply this warehouse is set, manufacture from this warehouse is not set, no resupply warehouses are selected.

Storage2 – Purchase to resupply this warehouse is set, manufacture from this warehouse is not set, no resupply warehouses are selected.

Production1 – Purchase to resupply this warehouse is not set, manufacture from this warehouse is set, Storage1 and Storage2 are both selected as resupply warehouses, with no default selected.

I have one product:

Component1 – Can’t be sold, can be purchased, stockable, a supplier is set up, and the following default routes are selected in supply chain: “Production1: Supply Product from Warehouse1;” “Production1: Supply Product from Warehouse2” and “Buy”.  There are three pseudo-MTO reordering rules for Component1 (min 0 max 0 qty 1), one for each warehouse.

Now create a procurement for 10 Component1’s in Production1. 

As I have set it up, the procurement in Production1 triggers one of the routes, asks for 10 to be transferred from Warehouse1, and Warehouse1 then creates a purchase order to cover the projected shortfall.  The end result is 5 units in Warehouse2 and 10 units in Production1.

Ideally, I would instead take account of the existing or forecast stock, split the procurement, and transfer 5 from Warehouse1 and 5 from Warehouse2, so the end state is 10 in production and 0 everywhere else, with nothing having been purchased.


In my case this comes from a Manufacturing order, but it seems to me this could just as easily be the storefront’s stockroom with two resupply warehouses, or any other case where the company would rather draw together stock from multiple locations before purchasing anything new.

We are open to customizing a little bit of the procurement rule logic if that is the best way, but I am new enough to Odoo, and the idea behind drawing down company-wide stock before making new purchases seems common enough, that I am hoping I am simply missing the correct way to configure things for this situation.  Additional (virtual?) locations, more advanced procurement/push rules, etc.

Any ideas are welcome, and thank you for your assistance.




On 6/7/18, 1:43 AM

I haven't tried this but you can .How about setting it up like this: Production1 triggers a procurement to Storage1. Storage1 has a route setup which will trigger a procurement to Storage2 for a shortfall and there is still a shortfall you purchase.

On 8/25/15, 4:11 AM

In case anyone else is looking for this sort of logic in warehouse routes, there is an OCA module "Stock MTS+MTO Rule" which adds the capability to automatically split a procurement based on the forecasted inventory.  It's not exactly what I described, but it's close enough to allow a working solution.

Thanks to OCA and Florian da Costa for making it available.

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 8/13/15, 7:29 AM
Seen: 1564 times
Last updated: 6/7/18, 1:43 AM