OdooWiki OCA HUB

Stock Picking Return Lot

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

When a product is tracked by lot or serial number and is returned by a customer, it’s crucial to clearly indicate to the user which lot or serial number can be accepted. This way, we prevent user from receiving a product with a lot or serial number different from the original delivery.

This module enhances the return process by creating a separate return line for each product/lot and automatically pre-filling it with the lot from the original delivery. It relies on the Stock Restrict Lot module to enforce accurate tracking, ensuring that the reception order reflects the correct lot or serial number that should be received.

This module also integrates with [Stock Picking Return Restricted Qty] (https://github.com/OCA/stock-logistics-workflow/tree/18.0/stock_picking_return_restricted_qty) because the quantities are now split up per lot.

auto_awesome What this module does

AI-generated from the code · Odoo 19.0

When returning goods tracked by lot or serial number, Odoo splits the return lines per lot and pre-fills the lot from the original delivery, so users can only accept the lot that was actually shipped.

This module changes the return wizard (the screen where you choose what to send back to a supplier or receive back from a customer) for products tracked by lot or serial number.

What users see: - A new Lot/Serial Number column appears in the return wizard, but only when at least one product on the return is tracked by lot or serial. - Instead of one line per product, the wizard creates one line per product and lot, each pre-filled with the lot from the original delivery and the quantity that was shipped. - The lot field does not allow creating new lots; the user picks from existing ones.

Business rules and automatic behaviour: - A new company setting, "Restrict lot on picking return line", is available in Inventory settings (only shown when lot tracking is enabled). When active, the lot list on a return line is limited to the lots actually used in the original move. - The same lot cannot be entered twice on two lines for the same move; a check blocks it. - The "Return all" action resets quantities to the quantity still returnable per lot, taking previous returns into account. - When the return is created, the lot chosen on each line is carried over to the new stock move as its restricted lot.

Areas touched: the return wizard (stock.return.picking and its lines), company settings, and the resulting stock moves and move lines.

Required by other modules

Models and fields (4)
  • res.company · extends an existing modelstock_picking_return_lot_restrict (Restrict lot that can be selected based on those used in the move)
  • res.config.settings · extends an existing modelstock_picking_return_lot_restrict
  • stock.return.picking · extends an existing modellots_visible
  • stock.return.picking.line · extends an existing modellot_id (Lot/Serial Number), lot_id_domain

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

Sources · Odoo 12.0

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

terminal Installation and usage

OCA documentation · Odoo 19.0

There is an option under Inventory > Configuration > Traceability called "Restrict lot on picking return line" that, if enabled, will allow you to select only the lots that were used in the linked transaction.

To use this module, go to a done receipt or delivery in the inventory, and click the Return button. Odoo will show all products with the originally transferred quantity per lot (minus any quantities that were transferred earlier).

If you click the 'Return All' button here, this module will ensure that the originally transferred lots and serials are applied automatically to the resulting return transfer.

You can also choose to return only part of the original transfer and update the quantities here, before clicking the 'Return' button. If the picking type of the original transfer was marked to restrict returned quantities, you will not be allowed to enter a higher quantity than is available to return.

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.