EaDesgin / magento2-warehouses

Module to separate the stock on different store views based on warehouses.
https://www.eadesign.ro
Apache License 2.0
20 stars 19 forks source link

Magento 2.1.7 after add new product create only default stock #10

Open rickyproge opened 7 years ago

rickyproge commented 7 years ago

In Magento 2.1.7 after adding new product i can't create new entry in stock id. It create only default stock qty and i can't add the others.

rickyproge commented 7 years ago

Now I found how add Stocks per zone, but after set it i can't close checkout anymore. After some debugging i found where error is generated:

 if (!$stockItem->hasAdminArea()
                && !$this->stockState->checkQty($productId, $orderedQty, $stockItem->getWebsiteId())
            ) {
                $this->getResource()->commit();
                throw new \Magento\Framework\Exception\LocalizedException(
                    __('Not all of your products are available in the requested quantity.')
                );
            }

the error is placed in condition $this->stockState->checkQty($productId, $orderedQty, $stockItem->getWebsiteId())

Please help

Thanks