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

Module: Product Class

Entity: product.template

Compute Method: _compute_class_attribute_ids

Inputs Method Outputs
for product in self:
            if not product.class_id:
                product.class_attribute_ids = False
                product.class_required_attribute_ids = False
                continue

            class_lines = product.class_id.attribute_line_ids
            product.class_attribute_ids = class_lines.attribute_id
            product.class_required_attribute_ids = class_lines.filtered(
                "required"
            ).attribute_id

Back to entity