重新排序规则

*重新排序规则*用于将预测的库存水平保持在某个临界值以上,而不超过指定的上限。具体做法是指定库存不得低于的最低数量和不得超过的最高数量。

Reordering rules can be configured for each product based on the route used to replenish it. If a product uses the Buy route, then a request for quotation (RFQ) is created when the reordering rule is triggered. If a product uses the Manufacture route, then a manufacturing order (MO) is created instead. This is the case regardless of the selected replenishment route.

To set up reordering rules for the first time, refer to:

To understand and optimize replenishment using advanced features, see:

Reordering rules setup

To configure automatic and manual reordering rules, complete the following:

  1. Product type configuration

  2. Create rule

Product type configuration

A product must be configured correctly to use reordering rules. Begin by navigating to Inventory app ‣ Products ‣ Products, then select an existing product, or create a new one by clicking New.

On the product form, under the General Information tab, set the Product Type to Storable Product. This is necessary because Odoo only tracks stock quantities for storable products, and quantities are needed to trigger reordering rules.

将产品类型设置为可储存。

Next, click the Inventory tab and select one or more routes from the Routes section. Doing so tells Odoo which route to use to replenish the product.

在库存选项卡上选择一条或多条路线。

如果使用 购买 途径重新订购产品,请确认产品名称下的 可购买 复选框已启用。这样就会出现 采购`选项卡。点击:guilabel:`采购 选项卡,指定至少一个供应商及其产品售价,以便 Odoo 知道应从哪家公司购买产品。

在采购选项卡上指定供应商和价格。

If the product is replenished using the Manufacture route, it needs to have at least one bill of materials (BoM) associated with it. This is necessary because Odoo only creates manufacturing orders for products with a BoM.

If a BoM does not already exist for the product, select the Bill of Materials smart button at the top of the product form, then click New to configure a new BoM.

产品表单上的“物料清单”智能按钮。

创建新的重新排序规则

要创建新的重新排序规则,请导航至 库存应用程序 ‣ 操作 ‣ 补货,然后点击 新建,并为新的重新排序规则行项目填写以下字段:

  • Product: The product that requires replenishment.

  • Location: The specific location where the product is stored.

  • Min Quantity: The minimum amount of product that should be available. When inventory levels goes below this number, the replenishment is triggered.

  • Max Quantity: The amount of product that should be available after replenishing the product.

  • Multiple Quantity: If the product should be ordered in specific quantities, enter the number that should be ordered. For example, if the Multiple Quantity is set to 5, and only 3 are needed, 5 products are replenished.

创建新重新排序规则的表单。

小技巧

Reordering rules can also be created from the Reordering Rules smart button on the product form.

注解

To learn how the On Hand, Forecast, and To Order fields are calculated using on-hand quantities and future demand, see the Just-in-time logic section.

有关重排序规则的高级用法,请了解以下重排序规则字段:

注解

The fields above are not available by default, and must be enabled by selecting the (adjust) icon in the far-right corner and selecting the desired column from the drop-down menu.

0/0/1 重新订购规则

0/0/1 重新订购规则是一种特殊规则,用于在每次确认销售订单(SO)时,补充没有库存的产品。

重要

0/0/1 重新订购规则与*重新排序(MTO)* 路线类似,因为这两个工作流程都用于在确认 SO 后补充产品。

这两种方法的主要区别在于,*按订单补货*途径会自动将产品保留给导致其被补货的|SO|。这意味着该产品**不能**用于不同的 SO

0/0/1 重新排序规则则没有这种限制。使用该规则补充的产品不会被保留给任何特定的 SO ,可以根据需要使用。

另一个主要区别是,通过*按订单补货*路线创建的补货订单,会通过订单顶部的智能按钮与原始 SO 相链接。而使用 0/0/1 重新排序规则时,会创建补货订单,但不会链接到原始 SO

请参阅 按订单补货(MTO) 文档,了解 MTO 路线的完整概述。

要创建 0/0/1 重新排序规则,请导航至 库存应用程序 ‣ 产品 ‣ 产品,然后选择一个产品。

在产品页面顶部,点击 重新排序规则`智能按钮,打开产品的 :guilabel:`重新排序规则 页面。在生成的页面上,点击 新建 开始配置新的重新排序规则。

在新重新排序规则的 位置 字段中,选择应存储补充产品的位置。默认情况下,该位置设置为 WH/Stock

路线 字段中,选择规则用于补充项目的路线。例如,如果要从供应商处购买产品,请选择 购买 路线。

数量最小值 字段和 数量最大值 字段中,将值设为 0.00。在 待订购 字段中,输入 1.00

0/0/1 重新订购规则。

使用这些值配置重新排序规则后,每当 SO 导致产品的预测数量低于 最小数量0.00,所选的 路线 将以一个单位的增量补充产品,直至 最大数量0.00

Example

一个相框配置了 0/0/1 补货规则,使用 购买 路线。任何时候相框的现有库存量都保持为零。

确认了一个单位相框的|SO|,导致预测数量下降到 -1.00。这将触发补货规则,自动为一个单位的相框创建一个 PO

从供应商处收到产品后,相框的预测数量恢复为 0.00。此时库存中有一个相框,但它并没有被预留给触发其采购的销售订单。这个相框可以用来完成那笔销售订单,也可以被预留给其他订单使用。

触发器

A reordering rule’s trigger can be set to automatic or manual. While both function the same way, the difference between the two types of reordering rules is how the rule is launched:

  • Auto: A purchase or manufacturing order is automatically created when the forecasted stock falls below the reordering rule’s minimum quantity. By default, the Auto trigger is selected.

  • Manual: The Replenishment report lists products needing replenishment, showing current/forecasted stock, lead times, and arrival dates. Users can review forecasts before clicking Order Once.

To enable the Trigger field, go to Inventory app ‣ Operations ‣ Replenishment or Inventory app ‣ Configuration ‣ Reordering Rules. Then, click the (adjust) icon, located to the far-right of the column titles, and tick the Trigger checkbox.

触发器 列中,选择 自动手动。请参阅以下章节,了解不同类型的重新排序规则。

自动

Automatic reordering rules, enabled by setting the reordering rule’s Trigger field to Auto, generate purchase or manufacturing orders when either:

  1. The scheduler runs, and the Forecasted quantity is below the minimum, or

  2. A sales order is confirmed, and lowers the Forecasted quantity of the product below the minimum.

If the Buy route is selected, then an RFQ is generated. To view and manage RFQs, navigate to Purchase app ‣ Orders ‣ Requests for Quotation.

If the Manufacture route is selected, then an MO is generated. To view and manage MOs, navigate to Manufacturing app ‣ Operations ‣ Manufacturing Orders.

未选择路线时,Odoo 将选择产品表单的 库存 选项卡中指定的 路线

小技巧

默认情况下,调度程序每天运行一次。

要在调度程序运行前手动触发重新订购规则,请确保已启用 开发者模式,并选择 库存应用程序 ‣ 操作 ‣ 运行调度程序。然后,在弹出的窗口中点击紫色的 运行调度程序 按钮。

请注意,这也会触发任何其他计划的操作。

Example

产品 办公台灯 设置了自动重新订购规则,当预测数量低于 最小数量 5.00 时触发。由于当前 预测55.00,重新订购规则**未**被触发。

从重新订购规则页面显示自动重新订购规则。

手动

Manual reordering rules, configured by setting the reordering rule’s Trigger field to Manual, list a product on the replenishment dashboard when the forecasted quantity falls below a specified minimum. Products on this dashboard are called needs, because they are needed to fulfill upcoming sales orders, for which the forecasted quantity is not enough.

The replenishment dashboard, accessible by navigating to Inventory app ‣ Operations ‣ Replenishment, considers sales order deadlines, forecasted stock levels, and vendor lead times. It displays needs only when it is time to reorder items, thanks to the To Reorder filter.

当产品出现在补货仪表板上时,点击 订购一次 按钮,就会生成包含指定金额的 待订购 采购或生产订单。

点击补货仪表板上的 “订购一次” 按钮,补充库存。

路线

Odoo allows for multiple routes to be selected as replenishment methods under the Inventory tab on each product form. For instance, it is possible to select both Buy and Manufacture, indicating to Odoo that the product can be bought or manufactured.

Odoo 还允许用户为产品重新排序规则设置首选路径。如果选择了多个路径,则该规则默认使用该路径。要选择首选路线,首先导航至 库存应用程序 ‣ 配置 ‣ 重新排序规则

默认情况下,重新订购规则 页面上的 路线 列被隐藏。

选择列标题最右侧的 (滑块) 图标,并从出现的下拉菜单中选中 路线 选项,即可显示 路线 列。

点击补货规则行的列内,将会弹出一个下拉菜单,显示所有可用的路由选项。选择一条即可将其设置为首选路由。

从下拉菜单中选择首选路线。

重要

如果产品启用了多个路线,但没有为其重新排序规则设置首选路线,则会使用产品表单的 库存 选项卡上最先列出的选定路线对产品重新排序。

Advanced uses

Pairing Preferred Route with one of the following fields on the replenishment report unlocks advanced configurations of reordering rules. Consider the following:

  • Vendor: When the selected Preferred Route is Buy, setting the Vendor field to one of the multiple vendors on the vendor pricelist indicates to Odoo that the vendor is automatically populated on RFQs when a reordering rule triggers the creation of a purchase order.

  • Bill of Materials: When the Preferred Route is set to Manufacture, and there are multiple BoMs in use, specifying the desired BoM in the replenishment report, draft manufacturing orders are created with this BoM in use.

  • Procurement Group: This is a way to group related POs or MOs that are tied to fulfilling a specific demand, like an SO or a project. It helps organize and track which orders are linked to a particular demand.

    注解

    Procurement groups link replenishment methods to demand, enabling smart buttons to appear when using the MTO route.

    Showing smart button to PO.

    Sales order (demand) with a linked purchase order (replenishment method).

    In the context of reordering rules:

    • Reordering rules do not automatically assign a procurement group, which is why there are no smart buttons that link SOs to POs, unlike the MTO route.

    • To enable smart buttons for products replenished by reordering rules (not MTO), with specific quantities linked to specific demands (e.g. SOs), assign a procurement group.

    • Without a procurement group, demands for the same product can be combined into a single RFQ, even if the reordering rule is executed multiple times for those demands. This allows for more efficient procurement by consolidating demands into fewer orders.

    Selecting a procurement group in the Procurement Group field on the replenishment report ensures that all linked orders are grouped under the same demand, based on the defined route.

    Exercise

    How can you set the Procurement Group, Vendor, and Preferred Route fields on the replenishment report to generate a single RFQ for five different products in sales order SO35, given they share the same vendor, Azure Interior, and ensure other demands for these products are handled separately?

    1. Set the Procurement Group to SO35, in the reordering rule for all five products. This groups the demands for SO35 in the same RFQ or MO.

    2. Set the Vendor to Azure Interior to ensure the RFQ is created for the same supplier.

    3. Set the Preferred Route to Buy to generate an RFQ.

    4. Click the Order Once button to generate a single RFQ for the five products tied to SO35.

    After placing the order, remove SO35 from the Procurement Group field of the five products’ reordering rules. This ensures future demands for these products are managed separately and assigned to different RFQs (the usual behavior).

Just-in-time logic

Just-in-time logic in Odoo minimizes storage costs by placing orders precisely to meet deadlines. This is achieved using the forecasted date, which determines when replenishment is necessary to avoid overstocking.

The forecasted date is the earliest possible date to receive a product if the replenishment process starts immediately. It is calculated by summing the lead times linked to the replenishment process, such as vendor lead times and purchasing delays for purchases, or manufacturing lead times for production. Both automatic and manual reordering rules work this way.

Example

For a product with a 5-day total lead time and a sales order delivery date in 10 days, Odoo waits 5 days to place the order, ensuring it arrives just in time for delivery.

Important considerations:

  • If this feels risky, consider adding buffer time or adjusting lead times for more flexibility.

  • While lead times and just-in-time logic provide additional control, reordering rules work perfectly fine without them. Keeping delivery dates on sales orders as their creation date ensures purchases are immediately triggered when needed

Forecasted date and To Order quantity

To view the forecasted date, go to the replenishment report and click the (info) icon for the desired reordering rule. The Replenishment Information pop-up window displays the Forecasted Date and various lead times.

The forecasted date is the total time needed to procure a product in Odoo. It is calculated by summing the lead times linked to the product’s replenishment process. The total of these lead times, added to the current date, determines when Odoo checks for demanded stock.

重要

The forecasted date is the earliest possible date the customer can receive the product if the replenishment process began right now. It is calculated by adding all lead times related to the product to the current date.

Example

A manual reordering rule is set up with no minimum or maximum quantities.

  • Vendor lead time is 4 days, the purchase security lead time is 1 day, and the days to purchase is 2 days.

  • Today’s date is November 26.

  • These add up to 7 days, making the forecasted date, December 3rd.

A confirmed SO for 5 units has a delivery date of December 3rd (7 days from today). This demand will appear on the replenishment report today, in the To Order field.

However, if the delivery date were later than December 3rd, it would not yet appear on the report. Odoo only displays quantities to replenish when they fall within the forecasted date window, ensuring orders are placed precisely when needed.

Show forecasted date in Odoo.

The just-in-time logic ensures replenishment happens only when it’s necessary for the forecasted date’s demand, helping avoid overstocking.

例如:

  • If the forecasted quantity drops below the minimum on the forecasted date, replenishment must begin immediately to avoid shortages.

  • If the quantity drops below the minimum after the forecasted date, replenishment can wait.

The To Order quantity is the total demand on the forecasted date.

By timing purchase orders based on the combined lead times, Odoo optimizes stock levels, keeping inventory minimal while ensuring future requirements are ordered at the last possible moment—strategic procrastination without the stress!

Common confusion about forecasted quantities

SOs due after the Forecasted Date are not accounted for in the Forecast quantities of the reordering rule.

They are, however, accounted for on the forecasted report that is opened by clicking the (graph) icon on the replenishment report, as this one represents the long-term forecasted quantity.

Example

Forecast and To Order quantities is zero.

Continuing the above example, when the sales order’s deadline is adjusted to December 4th, the Forecast and To Order quantities are zero.

Show forecasted report.

Opening the Forecasted Report shows the Forecasted units is 5.00.

可见天数

*可见天数*可确定是否应在计划补货中添加额外数量。Odoo 会检查预测日期的预测库存是否低于重新订货规则中的最小值。**只有当**到了重新订购的时间,可见天数才会检查指定天数的未来额外需求。

该功能通过将当前和近期的需求归类,有助于合并订单,降低运输成本,并为较大订单提供供应商折扣。

To set visibility days to incorporate orders for a specified number of days in the future, navigate to Inventory app ‣ Operations ‣ Replenishment, or by clicking the Reordering Rules smart button from the product form.

Next, enable the Visibility Days field by clicking the (adjust) icon to the far right and choosing the feature from the drop-down menu. Then, enter the desired visibility days.

重要

The forecasted date is never pushed forward or extended; Odoo only checks the extra visibility days if the stock falls below the minimum threshold on the forecasted date.

Example where visibility days is triggered

A product shipped from Asia has a combined vendor lead time of 30 days and a shipping cost of $100 (including landed costs and tariffs).

  • November 4: Current date. The forecasted date is December 4 (30 days later).

  • SO 1: Requires the product by Dec 4. Odoo places the order today, costing $100.

  • SO 2: Requires the product by Dec 19. Normally, Odoo would order on Nov 19, costing an additional $100.

  • SO 3: Requires the product by Dec 25. Normally, Odoo would order on Nov 25, costing another $100.

Ordering separately for these sales orders totals $300 in shipping costs.

Show forecasted date visualization.

Setting Visibility Days to 20.0 allows Odoo to “look ahead” 20 days from December 4 (SO 1’s forecasted date) to December 24.

  • It groups SO 2’s order with SO 1, reducing shipping costs by consolidating orders.

  • SO 3, which is due on Dec 25, is one day late and is not grouped with the other two orders.

Visibility days visualization.

Counterexample where visibility days is not triggered

Considering the example above, if SO 1 does not exist, then:

  • November 4: Current date. The forecasted date is December 4 (30 days later).

  • November 5: The forecasted date shifts to December 5.

  • SO 2: Requires the product by December 19. Odoo will only trigger the order on November 19, meaning the user will not see a replenishment notification until then.

This shows that visibility days complement just-in-time logic by optimizing it to balance replenishment costs more effectively.

Example where the visibility days does not trigger.