| __pycache__ | ||
| models | ||
| views | ||
| __init__.py | ||
| __manifest__.py | ||
| README.md | ||
Product Lot Sequence Per Product
This module extends Odoo's lot and serial number generation to support unique sequences per product, aligning Odoo 18 with the behavior introduced in Odoo 19.
Features
- Per-Product Sequence Configuration: Define a unique sequence for lot/serial number generation for each product.
- Inventory Tab Integration: Configure the custom sequence directly on the product form under the Inventory tab.
- Automatic Generation: Lot/serial numbers generated during incoming receipts and manufacturing orders follow the product-specific sequence.
- Fallback Mechanism: If no sequence is defined for a product, it falls back to the global lot/serial sequence.
- UI Enhancements: Avoids generation of invalid "0" lot numbers in manual and wizard flows.
Configuration
- Navigate to Inventory > Products.
- Open or create a product.
- Go to the Inventory tab.
- Set the Custom Lot/Serial prefix to define a new sequence or select an existing sequence from the Lot Sequence field.
- The Next Number field displays the next lot/serial number that will be generated.
Behavior
- Incoming Shipments: When receiving products, if a product has a custom sequence, the generated lot/serial numbers will follow this sequence.
- Manufacturing Orders: When producing products, the finished lots/serials will be generated using the product's custom sequence.
- Manual Creation: Creating lots/serials manually or via "Generate Serials/Lots" will respect the product's sequence if configured.
Technical Details
- The module adds a
lot_sequence_idfield toproduct.templateto link the sequence. - It overrides the
stock.lotcreation to use the product's sequence. - It extends
stock.moveandstock.move.lineto handle UI inputs and normalize "0" or empty inputs. - It overrides
mrp.production._prepare_stock_lot_valuesto ensure manufacturing flows use the product sequence.
Dependencies
stockmrp
Compatibility
- Odoo 18
- Requires
mrpmodule for manufacturing order support