Impacted versions:10.0

Steps to reproduce: Create a BOM type kit and add a route, then create another that includes the the last type and also add a route. 

Current behavior: Create a MO for this last one and run the steps,it will produce 2 finished products consuming only half the raw materials
Expected behavior: Create a MO for this last one and run the steps,it should produce 1 finished product.

Video/Screenshot link (optional):
https://youtu.be/FiBr4g4V14U

addons/mrp/models/mrp_production.py
"""
        :param bom: in case of recursive boms: we could create work orders for child
                    BoMs
        """
        workorders = self.env['mrp.workorder']
        bom_qty = bom_data['qty']
        
        if self.product_id.tracking == 'serial':
            quantity = 1.0
        else:
            quantity = self.product_qty - sum(self.move_finished_ids.mapped('quantity_done'))
            quantity = quantity if (quantity > 0) else 0
        for operation in bom.routing_id.operation_ids:
            
            cycle_number = math.ceil(bom_qty / operation.workcenter_id.capacity)  
            duration_expected = (operation.workcenter_id.time_start +
                                 operation.workcenter_id.time_stop +
                                 cycle_number * operation.time_cycle * 100.0 / operation.workcenter_id.time_efficiency)
            workorder = workorders.create({
                'name': operation.name,
                'production_id': self.id,
                'workcenter_id': operation.workcenter_id.id,
                'operation_id': operation.id,
                'duration_expected': duration_expected,
                'state': len(workorders) == 0 and 'ready' or 'pending',
                'qty_producing': quantity,
                'capacity': operation.workcenter_id.capacity,
            })
            if workorders:
                workorders[-1].next_work_order_id = workorder.id