Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: Sales
Entity: sale.order.line
Compute Method: _compute_custom_attribute_values
| Inputs | Method | Outputs |
|---|---|---|
|
for line in self:
if not line.product_id:
line.product_custom_attribute_value_ids = False
continue
if not line.product_custom_attribute_value_ids:
continue
- valid_values = line.product_id.product_tmpl_id.valid_product_template_attribute_line_ids.product_template_value_ids
+ valid_values = line.product_id.product_tmpl_id.valid_product_template_attribute_line_ids.product_template_value_ids # noqa: E501
# remove the is_custom values that don't belong to this template
for pacv in line.product_custom_attribute_value_ids:
if pacv.custom_product_template_attribute_value_id not in valid_values:
line.product_custom_attribute_value_ids -= pacv
|
|
