OdooWiki OCA HUB

Product barcode required

product_barcode_required folder_open OCA/product-attribute open_in_new
Uncategorised License: LGPL-3

Makes barcode field required, defaults it to product's code.

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

Lets you make the barcode mandatory on products, with a company-wide setting. When enabled, products without a barcode cannot be saved, and the barcode is pre-filled from the internal reference.

This module adds a company setting that makes the product barcode a required field. You turn it on in Settings, in the new "Products barcode" section, with the option "Make barcode required". The setting is stored per company and is only visible to users who can manage product variants.

Once enabled, Odoo checks products when they are created or modified. If a product is not a service and has no barcode, saving is blocked with an error listing the products that have no barcode. Products with several variants are excluded from this rule, and the barcode field is hidden on the template form when the product has more than one variant.

On the product forms (both the normal product form and the simplified variant edit form), the barcode field becomes mandatory when the rule applies. When you type an internal reference (default_code) on a product that still needs a barcode, Odoo automatically copies that reference into the barcode field.

The module touches product.template, product.product, res.company and res.config.settings. It also provides a reusable mixin, product.barcode.required.mixin, so other modules can apply the same barcode check in their own constraints.

Depends on

product
Models and fields (5)
  • res.company · extends an existing modelproduct_variant_barcode_required
  • product.product · new model
  • product.template · new model
  • res.config.settings · extends an existing modelproduct_variant_barcode_required
  • product.barcode.required.mixin · new modelis_barcode_required

Text generated by AI (DeepSeek) from reading the Odoo 18.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: 3 confirmed, 6 with no information of 9 versions.

Sources · Odoo 14.0

Confirmed on 2026-11-03 in branch 14.0 of OCA/product-attribute.

terminal Installation and usage

OCA documentation · Odoo 18.0

Go to "Settings -\> General -\> Products" and enable "Product variant barcode required".

No verified information in OCA: Installation, Usage.

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.