I created a module which create new product type. And I want to set dynamic product quantity (calculation from other) for checkout. Like custom function getQty().
UPDATE: I found a solution to this problem.
I used DI for \Magento\CatalogInventory\Model\Stock\Item class and changed getQty() method. It only works for the catalog, but it suits me.