This module define a mixin to have a product code available in any model which inherit of this mixin.
This method can be useful for exported data when you don't want deal with [ ]
Typically you may inherit it with:
- sale.order.line
- purchase.order.line
- account.move.line
- stock.move
auto_awesome What this module does
AI-generated from the code · Odoo 16.0Adds a reusable product code field that other Odoo models can inherit, so documents like sales, purchases, invoices and stock moves can show the product's internal reference.
This module does not add any new screen or menu. It provides a technical building block (a mixin) that other modules can use to display the product's internal reference (the "default code") on their own records.
The mixin defines two fields: product_code, which is a read-only text field that automatically copies the code from the linked product, and product_id, a link to a product. Any model that inherits this mixin gets both fields for free.
Because the code is a related field, it always follows the product's current internal reference. If the product code changes, the value shown on the inheriting record updates automatically. No manual entry is needed.
The module itself does not add the mixin to any specific model. It only makes it available. The OCA documentation suggests it is typically used on sales order lines, purchase order lines, invoice lines and stock moves, but those inheritances are not present in this module's code.
No menus, buttons, reports, checks, restrictions, emails or scheduled jobs are added by this module. It only touches the product.code.mixin abstract model and depends on the standard product module.
Depends on
Models and fields (1)
- product.code.mixin · new modelproduct_id, product_code (Code)
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/product-attribute.
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.