OdooWiki OCA HUB

Stock Lot Is Archived

stock_lot_is_archived folder_open OCA/product-attribute open_in_new
Uncategorised License: AGPL-3

This module allows to adds a field on lots that means a product is archived. This differs from Odoo core 'active' attribute (see stock_production_lot_active module). A cron is also provided to automatically archive lots when there is new one, based on the expiration date.

auto_awesome What this module does

AI-generated from the code · Odoo 16.0

Adds an "Is Archived" flag on lots so you can mark old lots as archived without deactivating them, and provides a scheduled job that can flag lots automatically when a newer lot exists and no stock remains.

This module adds a simple checkbox called "Is Archived" on each lot (serial/lot number) in Odoo. It is separate from Odoo's standard active/inactive switch: a lot marked as archived stays visible and usable, it is just flagged as archived for your own reporting or filtering.

Where you see it: - On the lot form, the checkbox appears after the reference field. Only users in the Inventory Manager group can change it; for other users it is shown read-only. - In the lots list view, an "Is Archived" column is added. - In the lots search filters, a new "Is Archived" filter lets you show only archived lots.

Automatic behaviour: - A scheduled job named "Archive product lots (Is Archived)" is provided. It is created inactive, so you must enable it yourself. When active, it runs once a day and flags lots as archived when two conditions are met: there is another lot for the same product with an expiration date equal to or later than this lot's expiration date, and there is no remaining quantity of this lot in any internal warehouse location. Lots that are already flagged are skipped.

The module touches the stock.lot model and adds a small helper model used by the scheduled job. It depends on the lot expiration features.

Depends on

product_expirystock
Models and fields (2)
  • stock.lot · extends an existing modelis_archived, is_archived_editable
  • stock.lot.archive · new model

Text generated by AI (DeepSeek) from reading the Odoo 16.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-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 1 confirmed, 8 with no information of 9 versions.

Sources · Odoo 16.0

Confirmed on 2026-11-03 in branch 16.0 of OCA/product-attribute.

terminal Installation and usage

OCA documentation · Odoo 16.0
  • Create some lots with different expiration dates
  • Go To Settings > Technical > Automation > Scheduled Actions
  • Run the 'Archive products lots (Is Archived)' one.
  • Only one lot with the most recent expiration date should remain with Is Archived field unticked.

No verified information in OCA: Installation, Configuration.

info

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.