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

Error on adding warehouse #5

Closed inluxc closed 7 years ago

inluxc commented 7 years ago

I get this error after i add a new warehouse

There was a problem saving the zoneSQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (magento2.warehouseinventory_stock_item, CONSTRAINT WAREHOUSEINV_STOCK_ITEM_STOCK_ID_WAREHOUSEINV_STOCK_STOCK_ID FOREIGN KEY (stock_id) REFERENCES warehouseinventory_stock (stock_id), query was: INSERT INTO warehouseinventory_stock_item () VALUES ()

eadesignro commented 7 years ago

I guess you do not have any items. This is the same as the installation issue. When you create another zone the extension will create new items for all the products with the new item id.

We will look for this to. Thanks for the time to report and test.

eadesignro commented 7 years ago

I think the same empty rule needs to be here: copyDataFromCatalogInventoryStockStatus, i did not test.

inluxc commented 7 years ago

Issue close with commit https://github.com/EaDesgin/magento2-warehouses/commit/2f075653cbfb8c87df9c130fa3fd48c487a4612d