Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Product Variant Default Code

Entity: product.attribute.value

Compute Method: _compute_code

Inputs Method Outputs
for rec in self:
            if rec.name and not rec.code:
                rec.code = rec.name[:2]

Back to entity