Product Default Code with Company Code
This module extends the functionality of product module to generate automatically internal reference (default_code) for product.
Note, for that purpose, the field become readonly, and a sequence is created automatically per company.
The new products will a default code with the following pattern COD-XXXXXX, where COD is the code of the company of the product, and XXXXXX is a autoincremented value.
Note
This new feature is enabled only for products that belong to a company.
auto_awesome What this module does
AI-generated from the code · Odoo 16.0Automatically generates the internal reference (default code) of products using a per-company sequence prefixed by the company code, and makes the field read-only for company-specific products.
When a product belongs to a company, Odoo fills its internal reference automatically instead of letting users type it. The reference follows the pattern company code followed by a dash and a six-digit number, for example COD-000001.
- Each company gets its own numbering sequence, created automatically when the company is created and also for existing companies when the module is installed.
- The internal reference field becomes read-only on the product form whenever the product is linked to a company, so users cannot change it by hand.
- On the product template form, the field is hidden when the template has more than one variant, because the reference is managed at the variant level.
The module touches product.product, product.template and res.company. It adds no new menus or reports; the change is visible directly on the product screens. Products without a company keep the standard behaviour and their reference stays editable.
Depends on
Models and fields (2)
- res.company · extends an existing model
- product.product · extends an existing model
Text generated by AI (DeepSeek) from reading the Odoo 16.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-03Confirmation status: 1 confirmed, 8 with no information of 9 versions.
Sources · Odoo 16.0
Confirmed on 2026-11-03 in branch 16.0 of OCA/multi-company.
terminal Installation and usage
No verified informationInstallation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
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.