Stock Lock Lot

stock_lock_lot
REPOSITORY
REPOSITORYOCA/stock-logistics-workflow
GIT
GIThttps://github.com/OCA/stock-logistics-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/stock-logistics-workflow/tree/18.0/stock_lock_lot
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYWarehouse Management
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA), Avanzosc
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA), Avanzosc
COMMITTERS
COMMITTERSSébastien Alix, Weblate, OCA-git-bot, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/stock-logistics-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:15
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - stock
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - html_editor
    - uom
    - barcodes_gs1_nomenclature
    - barcodes
    - digest
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module allows you to define whether a Serial Number/lot is blocked
or not. The default value can be set on the Product Category, in the
field "Block new Serial Numbers/lots". Is possible to specify in a
location if locked lots are allowed to move there.

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
product_category_form_view product.category.form.view.inherit.lock.lot product.category group Inherits product.product_category_form_view
search_product_lot_filter search.product.lot.filter.inh.locklot stock.lot group Inherits stock.search_product_lot_filter
view_location_form stock.location.form stock.location field Inherits stock.view_location_form
view_production_lot_form view.production.lot.form.inherit.lock.lot stock.lot field Inherits stock.view_production_lot_form
view_production_lot_tree view.production.lot.list.inh.locklot stock.lot field Inherits stock.view_production_lot_tree
Models touched (4)

New fields (1)
  • lot_default_locked Boolean
    help='If checked, future Serial Numbers/lots will be created blocked by default. This means they will not be available for use in stock moves or other operations' string='Block new Serial Numbers/lots'
Public methods (0)

No public methods.

New fields (1)
  • allow_locked Boolean
    help='Indicates whether the location allows receipt of blocked batches'
Public methods (0)

No public methods.

New fields (2)
  • locked Boolean
    help='Indicates whether this lot is blocked for use.' string='Blocked' tracking=True
  • product_id Many2one
    tracking=True
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
    Force the locking/unlocking, ignoring the value of 'locked'.
  • write(self, values)
    "Lock the lot if changing the product and locking is required

New fields (0)

No new fields.

Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/stock-logistics-workflow
GIT
GIThttps://github.com/OCA/stock-logistics-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/stock-logistics-workflow/tree/17.0/stock_lock_lot
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYWarehouse Management
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA), Avanzosc
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA), Avanzosc
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, arantxa-s73
WEBSITE
WEBSITEhttps://github.com/OCA/stock-logistics-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:20:07
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - stock
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
    - barcodes_gs1_nomenclature
    - barcodes
    - digest
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module allows you to define whether a Serial Number/lot is blocked
or not. The default value can be set on the Product Category, in the
field "Block new Serial Numbers/lots". Is possible to specify in a
location if locked lots are allowed to move there.

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
product_category_form_view product.category.form.view.inherit.lock.lot product.category group Inherits product.product_category_form_view
search_product_lot_filter search.product.lot.filter.inh.locklot stock.lot group Inherits stock.search_product_lot_filter
view_location_form stock.location.form stock.location field Inherits stock.view_location_form
view_production_lot_form view.production.lot.form.inherit.lock.lot stock.lot field Inherits stock.view_production_lot_form
view_production_lot_tree view.production.lot.tree.inh.locklot stock.lot field Inherits stock.view_production_lot_tree
Models touched (4)

New fields (1)
  • lot_default_locked Boolean
    help='If checked, future Serial Numbers/lots will be created blocked by default. This means they will not be available for use in stock moves or other operations' string='Block new Serial Numbers/lots'
Public methods (0)

No public methods.

New fields (1)
  • allow_locked Boolean
    help='Indicates whether the location allows receipt of blocked batches'
Public methods (0)

No public methods.

New fields (2)
  • locked Boolean
    help='Indicates whether this lot is blocked for use.' string='Blocked' tracking=True
  • product_id Many2one
    tracking=True
Public methods (2)
  • create(self, vals)
    @api.model
    Force the locking/unlocking, ignoring the value of 'locked'.
  • write(self, values)
    "Lock the lot if changing the product and locking is required

New fields (0)

No new fields.

Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/stock-logistics-workflow
GIT
GIThttps://github.com/OCA/stock-logistics-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/stock-logistics-workflow/tree/16.0/stock_lock_lot
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYWarehouse Management
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA), Avanzosc
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA), Avanzosc
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, Rodrigo, oca-ci, Adriana Saiz
WEBSITE
WEBSITEhttps://github.com/OCA/stock-logistics-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:53:51
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - stock
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
    - barcodes_gs1_nomenclature
    - barcodes
    - digest
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
product_category_form_view product.category.form.view.inherit.lock.lot product.category group Inherits product.product_category_form_view
search_product_lot_filter search.product.lot.filter.inh.locklot stock.lot group Inherits stock.search_product_lot_filter
view_location_form stock.location.form stock.location field Inherits stock.view_location_form
view_production_lot_form view.production.lot.form.inherit.lock.lot stock.lot field Inherits stock.view_production_lot_form
view_production_lot_tree view.production.lot.tree.inh.locklot stock.lot field Inherits stock.view_production_lot_tree
Models touched (4)

New fields (1)
  • lot_default_locked Boolean
    help='If checked, future Serial Numbers/lots will be created blocked by default' string='Block new Serial Numbers/lots'
Public methods (0)

No public methods.

New fields (1)
  • allow_locked Boolean
    string='Allow Locked Lots/Serial Numbers'
Public methods (0)

No public methods.

New fields (2)
  • locked Boolean
    string='Blocked' tracking=True
  • product_id Many2one
    tracking=True
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
    Force the locking/unlocking, ignoring the value of 'locked'.
  • write(self, values)
    "Lock the lot if changing the product and locking is required

New fields (0)

No new fields.

Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/stock-logistics-workflow
GIT
GIThttps://github.com/OCA/stock-logistics-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/stock-logistics-workflow/tree/14.0/stock_lock_lot
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYWarehouse Management
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA), Avanzosc
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA), Avanzosc
COMMITTERS
COMMITTERSoca-travis, Weblate, OCA-git-bot, ferran-73, oca-ci, oca-git-bot
WEBSITE
WEBSITEhttps://github.com/OCA/stock-logistics-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:41:03
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - stock
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
    - barcodes
    - digest
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
product_category_form_view product.category.form.view.inherit.lock.lot product.category group Inherits product.product_category_form_view
search_product_lot_filter search.product.lot.filter.inh.locklot stock.production.lot group Inherits stock.search_product_lot_filter
view_location_form stock.location.form stock.location field Inherits stock.view_location_form
view_production_lot_form view.production.lot.form.inherit.lock.lot stock.production.lot field Inherits stock.view_production_lot_form
view_production_lot_tree view.production.lot.tree.inh.locklot stock.production.lot field Inherits stock.view_production_lot_tree
Models touched (4)

New fields (1)
  • lot_default_locked Boolean
    help='If checked, future Serial Numbers/lots will be created blocked by default' string='Block new Serial Numbers/lots'
Public methods (0)

No public methods.

New fields (1)
  • allow_locked Boolean
    string='Allow Locked'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • locked Boolean
    string='Blocked' tracking=True
  • product_id Many2one
    tracking=True
Public methods (2)
  • create(self, vals)
    @api.model
    Force the locking/unlocking, ignoring the value of 'locked'.
  • write(self, values)
    "Lock the lot if changing the product and locking is required
REPOSITORY
REPOSITORYOCA/stock-logistics-workflow
GIT
GIThttps://github.com/OCA/stock-logistics-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/stock-logistics-workflow/tree/13.0/stock_lock_lot
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYWarehouse Management
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA), Avanzosc
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA), Avanzosc
COMMITTERS
COMMITTERSPedro M. Baeza, OCA Transbot, oca-travis, Weblate, OCA-git-bot
WEBSITE
WEBSITEhttps://github.com/OCA/stock-logistics-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:34:15
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - stock
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
    - barcodes
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
product_category_form_view product.category.form.view.inherit.lock.lot product.category group Inherits product.product_category_form_view
search_product_lot_filter search.product.lot.filter.inh.locklot stock.production.lot group Inherits stock.search_product_lot_filter
view_location_form stock.location.form stock.location field Inherits stock.view_location_form
view_production_lot_form view.production.lot.form.inherit.lock.lot stock.production.lot field Inherits stock.view_production_lot_form
view_production_lot_tree view.production.lot.tree.inh.locklot stock.production.lot field Inherits stock.view_production_lot_tree
Models touched (4)

New fields (1)
  • lot_default_locked Boolean
    help='If checked, future Serial Numbers/lots will be created blocked by default' string='Block new Serial Numbers/lots'
Public methods (0)

No public methods.

New fields (1)
  • allow_locked Boolean
    string='Allow Locked'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • locked Boolean
    string='Blocked' tracking=True
  • product_id Many2one
    track_visibility='onchange'
Public methods (2)
  • create(self, vals)
    @api.model
    Force the locking/unlocking, ignoring the value of 'locked'.
  • write(self, values)
    "Lock the lot if changing the product and locking is required
REPOSITORY
REPOSITORYOCA/stock-logistics-workflow
GIT
GIThttps://github.com/OCA/stock-logistics-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/stock-logistics-workflow/tree/8.0/stock_lock_lot
VERSION
VERSION 2.1.2
CATEGORY
CATEGORYWarehouse Management
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), OdooMRP team, Serv. Tecnol. Avanzados - Pedro M. Baeza, Avanzosc
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), OdooMRP team, Serv. Tecnol. Avanzados - Pedro M. Baeza, Avanzosc
COMMITTERS
COMMITTERSLionel Sausin, Pedro M. Baeza, GitHub, Stéphane Bidoul (ACSONE), OCA Transbot, oca-travis, agaldona, Weblate, OCA-git-bot, Loïc BELLIER, Oihane Crucelaegui
WEBSITE
WEBSITEhttp://www.odoomrp.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:11:24
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - stock
    - product
    - base
    - decimal_precision
    - mail
    - base_setup
    - web_kanban
    - web
    - report
    - procurement
    - board
    - web_kanban_gauge
    - web_kanban_sparkline
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (12)
XML IDNameModelTypeStatus
product_category_form_view_inh_locklot product.category.form.view.inh.locklot product.category data Inherits product.product_category_form_view
quant_search_view_inh_locklot quant.search.view.inh.locklot stock.quant field Inherits stock.quant_search_view
search_product_lot_filter_inh_locklot search.product.lot.filter.inh.locklot stock.production.lot field Inherits stock.search_product_lot_filter
stock_lot_chatter_form_view stock.lot.chatter.form stock.production.lot field Inherits stock.view_production_lot_form
view_location_form stock.location.form stock.location field Inherits stock.view_location_form
view_production_lot_form_inh_locklot view.production.lot.form.inh.locklot stock.production.lot div Inherits stock.view_production_lot_form
view_production_lot_tree_inh_locklot view.production.lot.tree.inh.locklot stock.production.lot field Inherits stock.view_production_lot_tree
view_stock_configuration Stock settings: Strict locking stock.config.settings data Inherits stock.view_stock_config_settings
view_stock_enter_transfer_details_inh_locklot view.stock.enter.transfer.details.inh.locklot stock.transfer_details field Inherits stock.view_stock_enter_transfer_details
view_stock_quant_form_inh_locklot view.stock.quant.form.inh.locklot stock.quant field Inherits stock.view_stock_quant_form
view_stock_quant_tree_inh_locklot view.stock.quant.tree.inh.locklot stock.quant field Inherits stock.view_stock_quant_tree
view_wiz_lock_lot_form view.wiz.lock.lot.form wiz.lock.lot form New
Models touched (8)

New fields (1)
  • lot_default_locked Boolean
    help='If checked, future Serial Numbers/lots will be created blocked by default' string='Block new Serial Numbers/lots'
Public methods (0)

No public methods.

New fields (1)
  • stock_lock_lot_strict Boolean
    help='When this box is checked, users are not allowed to force theavailability on blocked Serial Numbers/lots.' string='Strictly forbid moves on blocked Serial Numbers/lots.'
Public methods (2)
  • get_default_parameter_stock_lock_lot_strict(self)
    @api.multi
  • set_parameter_stock_lock_lot_strict(self)
    @api.multi

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • allow_locked Boolean
    string='Allow Locked'
Public methods (0)

No public methods.

New fields (3)
  • lock_reason Selection
    selection=[('category', 'Demanded by product category'), ('none', 'None')] string='Reason to block the lot' track_visibility='onchange'
  • locked Boolean
    default=<expr> readonly=True string='Blocked'
  • product_id Many2one
    track_visibility='onchange'
Public methods (5)
  • button_lock(self)
    @api.multi
    "Block the lot If the lot has reservations, they will be undone to lock the lot.
  • button_unlock(self)
    @api.multi
    "Lock the lot if the permissions allow it
  • create(self, vals)
    @api.model
    Force the locking/unlocking, ignoring the value of 'locked'.
  • onchange_product_id(self)
    @api.one@api.onchange('product_id')
    Instruct the client to lock/unlock a lot on product change
  • write(self, values)
    @api.multi
    "Lock the lot if changing the product and locking is required

New fields (1)
  • locked Boolean
    default=False related='lot_id.locked' store=True string='Blocked'
Public methods (2)
  • quants_get(self, location, product, qty, domain=None, restrict_lot_id=False, restrict_partner_id=False)
    @api.model
  • quants_move(self, quants, move, location_to, location_from=False, lot_id=False, owner_id=False, src_package_id=False, dest_package_id=False)
    @api.model
    Refuse to move a blocked lot if strict locking is demanded

New fields (1)
  • allow_locked Boolean
    related='destinationloc_id.allow_locked' string='Allow Locked'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (2)
  • action_lock_lots(self)
    @api.multi
  • action_unlock_lots(self)
    @api.multi
STATUS
STATUSOpen migration PR - not merged yet for this version
REPOSITORY
REPOSITORYOCA/stock-logistics-workflow
PULL REQUEST
PULL REQUEST[19.0][MIG] stock_lock_lot: Migration to 19.0 (#2350)
STATUS
STATUSOpen migration PR - not merged yet for this version
REPOSITORY
REPOSITORYOCA/stock-logistics-workflow
PULL REQUEST
PULL REQUEST[19.0][MIG] stock_lock_lot (#2229)