OdooWiki OCA HUB

MRP Byproduct Auto Create Lot

mrp_byproduct_auto_create_lot folder_open OCA/manufacture open_in_new
Manufacturing License: AGPL-3

This module extends the functionality of stock module to allow auto create lots for produced by-products. With the auto create lot set. Each produced by-product will get an unique lot number assigned. (Works for serial numbers as well.)

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

Automatically assigns a unique lot or serial number to by-products when a manufacturing order is completed, for products set to auto-create lots.

When a manufacturing order is finished, this module gives every produced by-product a unique lot or serial number automatically, so warehouse staff do not have to type them in by hand.

  • It works on the by-product moves of a manufacturing order (mrp.production), looking at the detailed move lines.
  • A number is only created when the by-product is tracked (lot or serial tracking is enabled) and the product is flagged to create lots automatically.
  • Lines that already have a lot or a lot name are left untouched, so nothing is overwritten.
  • The number is taken from the standard serial number sequence used for lots, so numbering stays consistent with the rest of the system.

The automatic assignment happens both when the user clicks the Mark as Done button and when the manufacturing order is validated in the background, so the by-products are always covered whichever way the order is closed.

It touches the Manufacturing area and the stock lot/serial functionality, and relies on the auto-create-lot behaviour already provided for stock transfers. No new menus, screens or reports are added; the change is invisible except that by-product lot numbers appear filled in automatically.

Models and fields (1)
  • mrp.production · extends an existing model

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: 1 confirmed, 8 with no information of 9 versions.

Sources · Odoo 18.0

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

terminal Installation and usage

OCA documentation · Odoo 18.0

To configure this module, you need to:

  • Go to a product Manufacturing \> Products \> a product.
  • Set 'auto create lot' option for the products you need.

To use this module you need to:

  • Go to a Product \> General Information tab.
  • Set a "By Lots" tracking option for this product.
  • Set auto create lot.
  • Go to Manufacturing \> Manufacturing orders edit or create one.
  • Add the by-product on the MO (Quantity > 1).
  • Validate and produce the Manufacturing order.

A lot number is automatically created and assigned to the by-product. With the sequence defined by the "stock_picking_auto_create_lot" module.

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.