Product Expiration Date - Force reservation
Starting from Odoo 18.0, product_expiry module is blocking the reservation of expired lots.
However we could have use cases where we want to move such expired lots in another location.
auto_awesome What this module does
AI-generated from the code · Odoo 18.0Lets you allow Odoo to reserve expired lots again, so you can still move them to another location. You turn this on with a company-level setting called "Ignore Expiration Date".
By default, Odoo blocks the reservation of expired lots. This module adds a company setting that switches that block off, so expired lots can be reserved and moved.
Where it appears: - In Inventory settings, next to the Lots & Serial Numbers option, a new checkbox "Ignore Expiration Date" with the note "Force the reservation of expired lots." It is only shown when the Lots & Serial Numbers feature is enabled.
What it changes:
- The setting is stored on the company (res.company), so it applies to all users of that company.
- When the setting is on, the availability calculation for stock quants (stock.quant) ignores the expiration date, which lets expired lots be reserved.
- The same behaviour can also be triggered per operation through the context key ignore_expiration_date, without changing the company setting.
Business use case shown by the code: you may need to move expired lots to another location, which the standard expiration rule would otherwise prevent.
The module only extends existing models (res.company, res.config.settings, stock.quant) and adds one settings screen field; it does not create new menus or reports.
Depends on
Required by other modules
Models and fields (3)
- res.company · extends an existing modelproduct_ignore_expiration_date
- stock.quant · extends an existing model
- res.config.settings · extends an existing modelproduct_ignore_expiration_date (Ignore Expiration Date)
Text generated by AI (DeepSeek) from reading the Odoo 18.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub
Availability by version
Reviewed: 2026-11-03Confirmation status: 1 confirmed, 8 with no information of 9 versions.
Sources · Odoo 18.0
Confirmed on 2026-11-03 in branch 18.0 of OCA/stock-logistics-reservation.
terminal Installation and usage
OCA documentation · Odoo 18.0Usage
Source · Odoo 18.0This module allows to force the reservation of expired lots with:
- a configuration option (at the company level)
- a context key
Configuration option (global)
Open Inventory settings (Inventory/Configuration/Settings), section Traceability, and enable option Ignore Expiration Date.
With context key (code)
Before calling <stock.move>._action_confirm() or <stock.move>._action_assign(), one could set the ignore_expiration_date context key:
move_expired_lot._action_assign()
assert move_expired_lot.state == "confirmed"
move_expired_lot.with_context(ignore_expiration_date=True)._action_assign()
assert move_expired_lot.state == "assigned"No verified information in OCA: Installation, Configuration.
Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.