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

self.ensure_one()
        return True
    @api.multi
    def post_inventory(self):
        for order in self:
            moves_not_to_do = order.move_raw_ids.filtered(lambda x: x.state == 'done')
            moves_to_do = order.move_raw_ids.filtered(lambda x: x.state not in ('done', 'cancel'))
            moves_to_do.action_done()
            moves_to_do = order.move_raw_ids.filtered(lambda x: x.state == 'done') - moves_not_to_do
            order._cal_price(moves_to_do)
            moves_to_finish = order.move_finished_ids.filtered(lambda x: x.state not in ('done','cancel'))
            moves_to_finish.action_done()
            
            for move in moves_to_finish:
                
                lot_quants = {}
                raw_lot_quants = {}
                quants = self.env['stock.quant']
                if move.has_tracking != 'none':
                    for quant in move.quant_ids:
                        lot_quants.setdefault(quant.lot_id.id, self.env['stock.quant'])
                        raw_lot_quants.setdefault(quant.lot_id.id, self.env['stock.quant'])
                        lot_quants[quant.lot_id.id] |= quant
                for move_raw in moves_to_do:
                    if (move.has_tracking != 'none') and (move_raw.has_tracking != 'none'):
                        for lot in lot_quants: