OdooWiki OCA HUB

Product Lot Sequence

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

Adds ability to define a lot sequence from the product which will be proposed upon creating new lots.

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

Lets you give each tracked product its own lot/serial number sequence, with a prefix, number of digits and next number, so new lots and serials are numbered automatically per product instead of using one shared sequence.

This module changes how lot and serial numbers are generated for tracked products. Instead of relying only on Odoo's shared numbering, each product can have its own numbering rule.

On the product form (Inventory tab, for products tracked by lots or serials) a "Lot sequence settings" block appears. There you can pick an existing sequence, or press "Create sequence" to generate one automatically from a prefix, a number of digits and a starting number. The next number to be used is shown and can be adjusted. Only users with product-manager rights can create the sequence.

When a new lot or serial is created, or when you open the detailed operations of a stock move, the number is taken from the product's own sequence. If the product has no sequence yet, one is created automatically when the product is saved as tracked (this automatic creation can be switched off by a system setting).

In Inventory settings, under the lots/serials section, a company-level default number of digits can be set; it is used as the starting value for new products. The module touches products, lots/serials, stock moves and company settings.

Depends on

stock
Models and fields (6)
  • stock.lot · extends an existing modelname
  • stock.move · extends an existing model
  • res.company · extends an existing modellot_sequence_padding (Sequence Number of Digits)
  • product.product · extends an existing model
  • product.template · extends an existing modellot_sequence_id (Entry Sequence), lot_sequence_prefix (Sequence Prefix), lot_sequence_padding (Sequence Number of Digits), lot_sequence_number_next (Next Number), display_lot_sequence_fields
  • res.config.settings · extends an existing modellot_sequence_padding

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-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 7 confirmed, 2 with no information of 9 versions.

Sources · Odoo 18.0

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

terminal Installation and usage

OCA documentation · Odoo 18.0

Lot Sequence policy

There are two ways you can configure this module through the use of System Parameter product_lot_sequence.policy:

  • "product": This is the default behaviour once you install this module. It's the same than in previous Odoo versions with this module installed, i.e. it allows to define a dedicated sequence on each product.
  • "global": This was the default behaviour from previous Odoo versions when this module was not installed, i.e it will always use the same global sequence for every product.

If any other value is used for this System Parameter, then you will get the default behaviour from odoo 15.0 which will look for the last lot number for each product and will increment it.

Automatic product sequence creation

System Parameter product_lot_sequence.auto_create, default "True".

When enabled, a product sequence is created automatically for products tracked by lot or serial number. Set it to "False" to create product sequences manually from the product form. Products without a product sequence use Odoo's standard lot and serial numbering.

Default Number of Digits for Product Sequence Generation

The default is 7 digits. To change that to something else, go to the inventory configuration, find "Sequence Number of Digits" and change the number.

To use this module:

  • Go to Inventory \> Products
  • Under the inventory tab when tracking set to lots 4 new fields will be displayed
  • If a sequence is not selected, a new one using the prefix, padding and next number fields, will be created
  • Go to Inventory \> Lot/Serial Numbers
  • Create new Lot/Serial number
  • Select the product and the next number of the product sequence will be automatically proposed

No verified information in OCA: Installation.

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.