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

Module: Product Alias

Entity: product.alias

Compute Method: _compute_available_attribute

Inputs Method Outputs
for rec in self:
            if self.env.context.get("default_product_tmpl_id"):
                tmpl = self.env["product.template"].search(
                    [("id", "=", self.env.context.get("default_product_tmpl_id"))],
                    limit=1,
                )
            else:
                tmpl = self.product_tmpl_id
            rec.available_attribute_value_ids = self.env[
                "product.attribute.value"
            ].browse(tmpl.attribute_line_ids.value_ids._origin.ids)

Back to entity