Hello, I am working on modifying the skip bom line function internally to add so functionality but I am calling super() to keep the base functionality working, but there seems to be a problem with the default odoo function when multi-choice attribute values are selected in Apply to variant bom lines. Here's my setup:
Product: Table
Attribute: Size/Multi-Checkbox/Dynamic
Attribute values: Grandeur, Largeur
In my bom I have 1 material product: Plank, in the bom line I have selected Apply to variants: Size: Grandeur and Size: Largeur.
Even tho my variant has both these attribute values selected it still skips the bom line. I have added some prints to the odoo function to see whats going on:
other_attribute_valid = product._match_all_variant_values(bom_attribule_values - no_variant_bom_attributes)
_logger.warning("BOM values: %s", bom_attribule_values.mapped('name'))
_logger.warning("Product values: %s", product.product_template_attribute_value_ids.mapped('name'))
_logger.warning("other_attribute_valid: %s", other_attribute_valid)
# If there are no never attribute values on the line => 'always' and 'dynamic'
if not no_variant_bom_attributes:
_logger.warning("No variant bom attributes")
return not other_attribute_valid
odoo.addons.mrp.models.mrp_bom: BOM values: ['Grandeur', 'Largeur'] odoo.addons.mrp.models.mrp_bom: Product values: ['Grandeur', 'Largeur'] odoo.addons.mrp.models.mrp_bom: other_attribute_valid: False odoo.addons.mrp.models.mrp_bom: No variant bom attributes
This is inside _skip_for_no_variant that gets called by skip_bom_line. The attributes match but it seems to fail in the no_variant_bom_attributes check.