Delivery Shelf Life Rules
Purpose
Delivery Shelf Life Rules checks whether a tracked product's lot has enough life remaining for its customer at the relevant delivery date. It adds line-level requirements, a diagnostic lot assistant, an exception queue, controlled overrides, and compliance history to Inventory.
The guard checks outgoing transfers with non-zero tracked move lines going to a customer location. It rechecks the facts at stock completion and blocks ineligible lines or missing required expiry data. A warning band can identify lots that meet the hard minimum but are close to it.
Before you start
Install the matching Odoo-major package with sale_stock and product_expiry. The manifest declares no Enterprise-only dependency. Configure native lot or serial tracking and expiration data on the products and lots you will deliver.
For percentage requirements, the calculation uses remaining days divided by the product's configured expiration-time days. It does not derive total life from a lot's manufacture date. Ensure that product setting represents the denominator your business intends to use.
This guide is based on the 19.0 source workflow, with selected comparisons of other versions. No delivery validation, exception approval, report rendering, or runtime test was performed.
Access and roles
Inventory users can read policy and compliance information and inspect eligible lots. Shelf-Life Override Approver includes Inventory user access and can approve a permitted exception. Shelf-Life Policy Manager includes that approver role and can maintain policies, customer defaults, and audit exports. An ordinary Inventory Manager role alone is not the custom policy or override role.
An administrator should assign these roles. Company access and write access to the delivery and move line remain required for approval. Overrides and completed compliance snapshots are immutable; users cannot rewrite their history.
Setup and menu
Inventory provides Customer Shelf-Life Policies in configuration; Shelf-Life Exceptions in operations; and Shelf-Life Compliance, Shelf-Life Override History, and Shelf-Life Audit PDF / CSV in reporting. Product movement lines and transfers show shelf-life fields. Transfers add Check Shelf-Life and Shelf-Life Certificate; movement controls include Eligible Lots and Override.
A policy can specify the company, customer or customer tag, product or product-category ancestor, operation type, destination country, validity dates, and priority. Select Minimum Days, Minimum Percentage, or Stricter of Days and Percentage. The stricter mode requires both thresholds to pass. Optional warning days and percentage points extend the warning band above the minimum.
Evaluation can use Scheduled Delivery, Actual Validation, Customer Promised Date, or Estimated Arrival. Promised-date evaluation falls back from the sales commitment to the delivery deadline and then scheduled date. Estimated arrival adds policy transit days, or the customer's transit default when the policy value is zero, to the scheduled date.
Policy precedence first favours a specific customer over a tag and a specific product over a category, then closer categories, operation and destination scopes, priority, later start date, and record order. It does not simply select the highest numeric priority. Without a matching policy, company-dependent customer defaults can provide a requirement; with neither, the result is Not Applicable.
Workflow
- Have a Shelf-Life Policy Manager configure the customer requirement and decide how missing expiry data should be handled: block, warn, or ignore. Decide whether overrides are permitted. Missing data defaults to blocking.
- Prepare a customer delivery using native stock controls. Assign the intended tracked lots and quantities. Select Check Shelf-Life and inspect the evaluation date, expiration date, required and actual days/percentage, status, and detail.
- If a line is unsuitable, open Eligible Lots on the move. The assistant evaluates lots with positive unreserved quantity available from the move's source location. Its rows are diagnostic: selecting a row does not reserve it, replace the selected lot, or rewrite FEFO allocation.
- Close the assistant and change the allocation through the native stock workflow. Check shelf life again. A lot below either applicable hard threshold is Ineligible. Missing required data is Missing Expiry Data. Warning means the hard minimum passes or the policy explicitly permits a missing-data warning; it does not block this guard's completion check.
- If a legitimate exception is allowed, a Shelf-Life Override Approver selects Override on the blocked line, reviews the facts, enters a reason, and chooses Approve Exception. A specific lot must already be assigned. The approval applies to that line's current facts, not to every future delivery of the product.
- Validate the delivery through normal Odoo controls. The guard locks and refreshes relevant facts before completion. A changed lot, quantity, customer, policy, or evaluation fact can invalidate a prior approval and require a new review. Other native validation requirements still apply.
- After successful completion, inspect Shelf-Life Compliance for the retained snapshot and any override. Use Shelf-Life Certificate on the transfer or the manager's audit PDF/CSV action for documentation. These reports describe recorded system facts; they do not inspect the physical goods.
Practice scenario
In an authorised test database, configure fictional customer “Cedar Food Market” to require 30 days remaining for a tracked product with 100 expiration-time days. Prepare a delivery whose selected evaluation date is 1 November and compare lots expiring 20 November and 20 December. The source-derived expectation is that the first lot fails the 30-day minimum and the second passes, subject to any warning band. Use Eligible Lots to inspect the alternatives before changing the native allocation. This scenario was not executed.
Troubleshooting and limitations
If a percentage cannot be calculated, check the product's expiration-time setting as well as the lot's expiration date. An untracked product is outside this guard's intended line check. A policy permitting missing data may deliberately produce Warning or Not Applicable; configure that choice consciously.
An override cannot compensate for having no lot assigned, and a policy can forbid overrides entirely. If approval facts changed while the form was open, review the refreshed line. Background refresh is scheduled every four hours, but completion performs its own fresh evaluation; a queue preview is not a permanent validation result.
Versions and useful links
Qualified catalogue versions are 15.0, 16.0, 18.0, 19.0, and 20.0. Version 17.0 source exists without a qualified live-demo pair here. Versions 15–16 adapt to their separate completed and reserved line quantities; 17–19 use the newer line quantity. Version 20 changes stock unit fields and access definitions. Secondary workflows have not been fully reviewed.
Live Test — Odoo 19 is catalogue-qualified; no demo was launched. Choose your exact version in the Corvus catalogue.
Related guides: Stock Transfer Approvals and Stock Reservation Expiry.