Using Routes and Rules

In Odoo there are several different ways to ensure that you have sufficient stock (e.g. to satisfy customer orders).

  1. Make to Order (MTO)
    • Note: the description for MTO changed in Odoo 12 from “Make to Order” to “Replenish on Order (MTO)” so we’ll use MTO as an abbreviation.
    • For each customer order (or manufacturing order), Odoo can create a matching Purchase Order or Manufacturing Order.
    • Odoo can consolidate supply so that one PO is for multiple demand orders (you can configure this behaviour, as explained below).
  2. Make-to-Stock
    • Manufacture or purchase based upon a plan (you could use the Odoo MPS app for this).
  3. Replenishment
    • Setup re-ordering rules for products so that Odoo automatically creates Requests for Quotations (RFQ – draft Purchase Orders) or Manufacturing Orders. The behaviour can be configured. This has been enhanced in Odoo 14.

Note that Replenish on Order (MTO) is not available by default in Odoo 14 because the recommended approach is to use the new replenishment tool. However, it is easy to reactivate this route and there are some improvements in version 14.

Configuration of Routes

As ever, automation can sometimes be confusing so it’s important to understand the configuration options that exist within Odoo.

For example:

  1. If you buy from vendors on an MTO basis, an RFQ that was created for one sales order might be updated with demand from another sales order. It’s possible to keep them separate.
  2. If you create RFQs manually and use reordering rules you might find that an RFQ you created manually is updated by the scheduled job. Here’s how to stop that happening.
  3. MTO logic changed in Odoo 13 so that an order is NOT created if there is stock available. This is a useful feature, but you might prefer the way it worked in Odoo 12 and earlier (see below).

Let’s start with the basics. The first step is to enable Routes in Inventory Settings:

Once “Multi-Step Routes” are selected, you can view all the Routes in Inventory / Configuration / Routes

Shown above are the three “basic” Routes in Odoo 13 and earlier (there are others, including “Drop Shipment“).

As noted above, in Odoo 14 the MTO route has been archived, but it’s easy to re-activate it.

These basic routes can all be selected for products, and note that more than one can be selected.

  1. This could be used if a product can either be made or made or purchased
  2. Or it is used for Make to Order (MTO)

In this example, the product is MTO and Buy, which means that when you confirm a Sales Order, Odoo will attempt to either add this demand to an existing RFQ (draft Purchase Order) or create a new RFQ.

  • In later versions of Odoo, you can use “Drop Shipment” instead. This is MTO + Buy, but the goods are shipped direct from the vendor to the customer.

Similarly, MTO + Manufacture means that you will manufacture to order.

Where can Routes be used?

You can choose where each route can be used:

These are the four options:

  • Product Categories
  • ​Products
  • ​Warehouses ​
  • Sales Order Lines
  1. It can be convenient to setup the standard routes on product categories so that users don’t have to remember to specify them for each product, or you could set routes automatically on products (using Automated Actions).
  2. Some routes should be set for warehouses. This is used for inventory and manufacturing options (for 1, 2 or 3 steps), but these are enabled from the warehouse maintenance screen.
  3. You can also set routes on Sales Order lines, which would be useful if you normally rely on reordering rules, but sometimes want to use MTO or maybe if you normally manufacture an item but sometimes buy it.

Configuration options

Create separate RFQs

It’s possible to configure Odoo to always create a new RFQ and not add the demand to an existing RFQ. Here’s how to do it:

As explained above, ensure that “Multi-Step Routes” is enabled in Inventory settings. Then enable Developer Mode and navigate to Inventory / Configuration / Rules

Select the “Buy” rule (note that if you have multiple warehouses each may have its own “Buy” rule) and ensure that you are in Developer Mode.

Change “Propagation of Procurement Group” to Propagate as shown below. Now you should find that the MTO method will generate a separate RFQ for each sales order

There are three options for “Propagation of Procurement Group”:

  • Leave Empty – this will merge requirements
  • Propagate (see above)
  • Fixed – this allows you to specify a Procurement Group

Reordering Rules

An extra step is required if you are using Reordering Rules and want to create separate RFQs.

Navigate to Inventory / Master Data / Reordering Rules

You should create a new Procurement Group to be used by the Reordering Rules. The same one can be used for all the Reordering Rules, and you can set this as a default.

It is possible to create Reordering Rules automatically for new products and you could add the Procurement Group field to this Automated Action.

Should MTO check stock first?

In Odoo 12 and earlier, Make to Order (MTO) rules would not check for available stock (so an RFQ or draft Manufacturing Order would be created regardless of whether any inventory was available).

In Odoo 13 the inventory balance is checked first, but you can change this by configuring Inventory Rules (and note that there are big changes in Odoo 14).

As explained above, enable Multi-Step Routes and navigate to Inventory / Configuration / Rules:

Select the Replenish On Order (MTO) rule for customers.

The standard setting for Supply Method is “Take from Stock, if unavailable, trigger another rule”:

The explanation on the right tells you that if stock is not available (in the specified Source Location) a rule will be triggered. This will create an RFQ (draft Purchase Order) or add to an existing RFQ (see above for how to change that behaviour).

There are three options for Supply Method:

  1. “Take from Stock” isn’t correct for MTO, and it must be one of the other two options .
  2. “Trigger another rule” is the way it worked in Odoo 12 and earlier, meaning that an RFQ will always be created (or demand added to an existing RFQ), regardless of the stock available.
  3. “Take from Stock, if unavailable, trigger another rule” is the default in Odoo 13, as explained above.

If we select the 2nd option, the description on the right changes and the behaviour will be the same as it was in Odoo 12 (and earlier).

The same options are available for Manufacturing Orders. Simply select the appropriate rule.

Drop Shipment

This is a useful route that effectively combines MTO and Buy. This is when your vendor delivers direct to your customer.

Navigate to Purchase / Configuration / Settings:

Now Odoo will automatically create RFQs and a single inventory transaction for the goods to be shipped from the vendor to the customer.

10 thoughts on “Using Routes and Rules

  1. Hi All,
    I am using version 12 so can I use 3 supply methods? Currently only having 2
    My MO did not get from stock first otherwise will issue the new MO

    Thanks

    Like

    1. No, in Odoo 12 the stock is not checked and the MO will be created even if there is stock available. The new functionality is in Odoo 13.

      Like

      1. Hi Chris,
        Thanks for your information. In ver13 we will set the same with 12? If you have any tips please sharing

        Thanks a lot

        Like

  2. I have multi-level BoM (6 levels) and I have the quantity in parent products but it still generate to childs BoM for MO and not get the available quantity of parent products.

    I want system get the available qty from parent first and if out of stock then will generate to MO. thanks

    Like

    1. I am not so familiar with the details of how this works with multi-level BOMs, and don’t currently have time to investigate. You could try asking this question at the Odoo Help Forum.

      Like

  3. Many thanks for taking the time to write these articles. They are a real life saver. Question, how can one use “Take From Stock, if unavailable, Trigger Another Rule,” but only have the MO or PO generated for the difference in quantity needed. E.g you have 4 pieces of a product in stock but want to sell 5. The rule creates a MO or PO for all 5 instead of just the 1 that is needed to fulfill the order. Is there a solution to have it creating just the needed items to cover the deficit?

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s