When retrieving the BOM lines in `_get_bom_lines`, we check the product attribute values to know if the BOM line should be taken into account or not. However, we do not do such a check when we retrieve the price in `_get_price`. It can lead to an inconsistency between the sub-lines displayed and the total price. We need to apply the same filtering logic when getting the price. opw-1932437 closes odoo/odoo#30917