Go to file
2026-01-28 13:45:34 +07:00
models feat: Add subcontract lot generation wizard and UI buttons to stock pickings and moves, including validation for cancelled manufacturing orders. 2026-01-28 13:45:34 +07:00
security feat: Add subcontract lot generation wizard and UI buttons to stock pickings and moves, including validation for cancelled manufacturing orders. 2026-01-28 13:45:34 +07:00
views feat: Add subcontract lot generation wizard and UI buttons to stock pickings and moves, including validation for cancelled manufacturing orders. 2026-01-28 13:45:34 +07:00
wizard feat: Add subcontract lot generation wizard and UI buttons to stock pickings and moves, including validation for cancelled manufacturing orders. 2026-01-28 13:45:34 +07:00
__init__.py first commit 2026-01-28 13:25:23 +07:00
__manifest__.py first commit 2026-01-28 13:25:23 +07:00
.gitignore first commit 2026-01-28 13:25:23 +07:00
README.md feat: Add subcontract lot generation wizard and UI buttons to stock pickings and moves, including validation for cancelled manufacturing orders. 2026-01-28 13:45:34 +07:00

Subcontract Generate Lot

Overview

This Odoo 19 module provides automated lot/serial number generation specifically for subcontracting receipts. It isolates the subcontracting automation feature from legacy modules, ensuring compatibility with Odoo 19's native "Lot Sequence per Product" functionality.

Features

  • Auto-Generate Lots: Automatically generates lot/serial numbers for subcontract receipt moves based on the product's configured sequence.
  • Validation Check: Prevents lot generation if the linked Subcontract Manufacturing Order is cancelled, alerting the user to potential data inconsistency.
  • Wizard Support: Includes a "Generate Subcontract Lots" wizard for manual control and batch generation.
  • Validation Hook: Automatically triggers lot generation when validating a subcontracting receipt (Stock Picking).
  • Native Compatibility: Uses Odoo 19's standard lot_sequence_id on the product template, ensuring no conflict with standard features.

Prerequisites

  • Odoo Version: 19.0
  • Dependencies:
    • stock
    • mrp
    • mrp_subcontracting

Installation

  1. Place the module in your custom addons path.
  2. Update the App List in Odoo.
  3. Install Subcontract Generate Lot.
  4. Important: If you are migrating from product_lot_sequence_per_product, you MUST uninstall that module after installing this one to prevent conflicts.

Usage

  1. Configure Product:
    • Go to a Product form -> Inventory tab.
    • Set Tracking to 'By Lots' or 'By Unique Serial Number'.
    • Configure the Lot/Serial Numbers Sequence (Standard Odoo field).
  2. Subcontract Receipt:
    • Create a Purchase Order for a subcontracted product.
    • Confirm the PO to create a Receipt (Stock Picking).
    • On the Receipt, use the Auto Generate Lots button or validate the transfer to trigger generation.