Stock Removal Zone-Level FIFO
The standard FIFO removal strategy sorts the quants by incoming date (in_date). That date is set when the goods are received and follows them from location to location, so it cannot tell when they arrived in the zone they are stored in: a pallet received long ago and only now brought down to a picking area keeps its old incoming date, and the picker is sent to it before the stock that has been sitting in that area for weeks.
This module adds a Zone-Level FIFO removal strategy. It keeps the FIFO principle but sorts on a new Zone Entry Date (zone_in_date) field on the quant, falling back on the incoming date:
zone_in_date, in_date, id
zone_in_date changes only when the goods enter another zone, unlike in_date which a merge of stock or an inventory adjustment can move. A zone is the nearest ancestor location carrying the strategy. It is always set, so the sort above needs no NULL handling.
Table of contents
Usage
Set Zone-Level FIFO as the removal strategy of the parent location of each picking zone. That location is the zone: every location under it belongs to it, up to the next descendant carrying the strategy.
Do not set a removal strategy on the locations inside a zone: the nearest one carrying it wins, so such a location would become a zone of its own.
Setting the strategy on a product category only chooses how the quants are sorted, it never defines a zone. A category-level Zone-Level FIFO is therefore pointless on its own: without the strategy on at least one location, no zone exists, zone_in_date is never updated and the sort falls back on in_date. Use the category to apply the strategy warehouse-wide, and the locations to draw the zones.
Goods moved to a location that is in no zone keep their zone entry date, since no zone sorts them there. Tick Update Zone Entry Date out of Zones in the Inventory settings to give them the move date instead.
Goods entering a zone from a location in no zone always get a fresh date: once out of every zone, nothing tells which zone they came from, so Zone A -> Packing -> Zone B must count as a change of zone.
Development
A zone is the nearest ancestor location, itself included, whose removal strategy is zone-based. stock.location._get_zone_location() resolves it, and _zone_removal_strategies() lists the strategy methods that define one — a module adding another zone-based strategy extends that list.
An extension module defining the zones differently overrides _get_zone_location on stock.location:
def _get_zone_location(self):
return <the zone of this location> or super()._get_zone_location()
stock.location._is_same_zone(source_zone, destination_zone) decides what counts as staying put: True keeps the date of the goods, False updates it. A destination in no zone answers True, unless the company setting zone_in_date_update_out_of_zone is on. Override it to change that rule.
When the destination location already holds stock, the returned date competes with the one already stored and the oldest of the two wins, so arriving goods never push the ones already there back in the queue. This mirrors the way the core keeps the oldest in_date when it merges stock into an existing quant.
Bug Tracker
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.
Do not contact contributors directly about support or help with technical issues.
Credits
Contributors
David Gallay <david.gallay@camptocamp.com>
Jacques-Etienne Baudoux (BCIM) <je@bcim.be>
Maintainers
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
Current maintainer:
This module is part of the OCA/stock-logistics-reservation project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Metadata
Release files for odoo-addon-stock-removal-zone-fifo 18.0.1.0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| odoo_addon_stock_removal_zone_fifo-18.0.1.0.0.2-py3-none-any.whl | Python 3 | none | any | Details for odoo_addon_stock_removal_zone_fifo-18.0.1.0.0.2-py3-none-any.whl |
Release files / odoo_addon_stock_removal_zone_fifo-18.0.1.0.0.2-py3-none-any.whl
| Download URL | odoo_addon_stock_removal_zone_fifo-18.0.1.0.0.2-py3-none-any.whl |
|---|---|
| Size | 38.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
be2b5151b5787324f3fffa54c7786bfefe7f98901f6a597d5020dd85cac7b50a
|
|
BLAKE2b-256 checksum How to use checksums |
01918bfd4a64da71c8ba044e89775b43de703923b259cab3c78a3ec1f7c8545d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Security for odoo-addon-stock-removal-zone-fifo 18.0.1.0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.