OdooWiki OCA HUB

Scrap Production Lot

stock_lot_scrap folder_open OCA/stock-logistics-workflow open_in_new
Stock License: AGPL-3

This module adds a button in Production Lot/Serial Number view form to Scrap all quants contained.

auto_awesome What this module does

AI-generated from the code · Odoo 19.0

Adds a Scrap button on the Lot/Serial Number form that creates scrap records for all quantities of that lot held in internal locations, then opens the scrap screen.

When you open a Lot or Serial Number record, a Scrap button now appears in the form header. It is hidden when the lot has no quantity on hand.

Clicking it asks for confirmation, then looks at all the lot's quants (the actual stock quantities) that are in internal locations and have a positive quantity. If none are found, Odoo shows an error saying the lot contains no quant in an internal location.

For each of those quants, a scrap record is created automatically, taking the lot, product, unit of measure, quantity, source location and package from the quant, and using the lot name as the origin. You are then taken to the Scrap screen: if several scraps were created, the list is filtered to show only them; if there was just one, its form opens directly.

When a scrap that is linked to a lot is validated, a message is posted on the lot's chatter saying the lot was scrapped by the current user.

The module touches the Lot/Serial Number model (stock.lot) and the Scrap model (stock.scrap). It does not add new menus; the button lives on the existing lot form and results open the standard Scrap views.

Depends on

stock
Models and fields (2)
  • stock.lot · extends an existing model
  • stock.scrap · extends an existing model

Text generated by AI (DeepSeek) from reading the Odoo 19.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 19.0

Confirmed on 2026-11-03 in branch 19.0 of OCA/stock-logistics-workflow.

terminal Installation and usage

OCA documentation · Odoo 19.0
  • Go to Inventory \> Configuration \> Settings \> Traceability.
  • Enable Lots & Serial Numbers.
  • Go to Inventory \> Products \> Lots/Serial Numbers, and enter in view form mode.
  • Click button Scrap

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.