/**
  * @param \Praxigento\Odoo\Data\Odoo\Inventory\Product\Warehouse\Lot[] $lots
  * @param \Magento\CatalogInventory\Api\Data\StockItemInterface $stockItem
  */
 public function processLots($lots, $stockItem)
 {
     $qtyTotal = 0;
     $stockItemId = $stockItem->getItemId();
     foreach ($lots as $lot) {
         $qtyTotal += $this->_subLot->processLot($stockItemId, $lot);
     }
     /* update stock item qty */
     $stockItem->setQty($qtyTotal);
     $isInStock = $qtyTotal > 0;
     $stockItem->setIsInStock($isInStock);
     $this->_mageRepoStockItem->save($stockItem);
     /* cleanup extra lots */
     $this->_subLot->cleanupLots($stockItemId, $lots);
 }