OdooWiki OCA HUB

Stock Move Line Serial Unique

stock_move_line_serial_unique folder_open OCA/stock-logistics-workflow open_in_new
Uncategorised License: AGPL-3

This module adds a constraint on stock.move.line to make sure that no stock exists for the specified serial 1) when serial is input (in lot_name field), and 2) when the lot is being created (in _action_done()) in purchase receipts, to avoid duplicates.

Standard behavior fails to prevent the duplicates, for example, when there is stock for a serial with no owner, and new stock comes in with the same serial with an owner. This module intends to cater to this case.

auto_awesome What this module does

AI-generated from the code · Odoo 16.0

Prevents duplicate serial numbers from being entered or created on stock moves, blocking receipts or manufacturing orders when the same serial already exists in stock.

This module adds a validation rule to stock move lines so that a serial number cannot be used twice. It applies when a product is tracked by serial number and the operation type allows creating new lots.

  • When a user types a serial number in the lot/serial field on a receipt or manufacturing order, Odoo checks whether that serial already exists for the same product and company. If it does, the entry is blocked with an error message.
  • The same check runs when a new serial record is being created during the validation of the transfer, so duplicates cannot slip through at that stage either.
  • The check uses the existing serial-number verification logic from stock quants, which means it also catches cases where the existing stock has no owner but the new one does.

The rule is enforced on stock.move.line and relies on the product's tracking setting and the operation type's lot-creation option. No new menus, fields, or reports are added; the change is purely a safety constraint on data entry and transfer validation.

Depends on

stock
Models and fields (1)
  • stock.move.line · extends an existing 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/stock-logistics-workflow.

terminal Installation and usage

No verified information

Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.

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.