1. Incorrect validation BOM
Current check_bom_recursion  is not correct because it only recursively that the product is in the input but not to the ouput.
It does not contemplate a type possibility:
2. Current check_bom_recursion is when validate a product.
In case the product cost is “average”, for each time do a check_bom_recursion. IMHO we do a validation in the ‘production.bom’ model instead of ‘product.product’.