magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.46k stars 9.28k forks source link

inventory_stock_1 view shows wrong quantity for configurables #38102

Open ioweb-gr opened 11 months ago

ioweb-gr commented 11 months ago

Preconditions and environment

Steps to reproduce

Do not add any other sources, just the default source and default stock Create a configurable product Add some variations to it Add quantity to the variations e.g.

Expected result

inventory_stock_1 tables shows 5 qty for the configurable product's SKU

Actual result

inventory_stock_1 tables shows 0 qty for the configurable product's SKU

This doesn't happen when using MSI though, so tables inventorystock(Greather than 1) will show the correct quantity for configurables.

Additional information

I think this is important for consistency and some marketplaces actually require this quantity total to process XML feeds.

Release note

No response

Triage and priority

m2-assistant[bot] commented 11 months ago

Hi @ioweb-gr. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

m2-assistant[bot] commented 11 months ago

Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Bravo commented 10 months ago

Hi @ioweb-gr,

Thank you for reporting and collaboration.

Verified the issue on Magento 2.4-develop instance and the issue is not reproducible.Kindly refer the screenshots.

Steps to reproduce

Screenshot 2023-10-30 at 12 10 11 PM Screenshot 2023-10-30 at 12 10 18 PM

In inventory_stock_1 tables it is showing quantity as per the child variations.

As per the devdocs https://experienceleague.adobe.com/docs/commerce-admin/catalog/products/types/product-create-configurable.html?lang=en

Screenshot 2023-10-30 at 12 12 56 PM

Configurable product stock status depends on child variations and it is working as expected.

Thanks.

ioweb-gr commented 10 months ago

Hi I think you missed the point. On the screenshot you shared of the table rows you can see that the product with sku "configure" shows quantity as 0

If you repeat the same steps for a second stock you will notice that on table inventory_stock_2 it will not say 0

The problem is the different behavior of the default stock index table and for other stock index tables

The behavior is not consistent

image

This one should say 5.

If you do the same for a second stock you'll notice it will say 5 @engcom-Bravo

engcom-Bravo commented 10 months ago

Hi @ioweb-gr,

Thanks for your update.

Verified the issue on Magento 2.4-develop instance and the issue is reproducible.Kindly refer the screenshots.

Steps to reproduce

Screenshot 2023-10-30 at 12 10 11 PM

inventory_stock_1 tables shows 0 qty for the configurable product's SKU

Screenshot 2023-11-08 at 2 43 17 PM

inventory_stock_2 tables shows 5 qty for the configurable product's SKU

Hence Confirming the issue.

Thanks.

github-jira-sync-bot commented 10 months ago

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-10524 is successfully created for this GitHub issue.

m2-assistant[bot] commented 10 months ago

:white_check_mark: Confirmed by @engcom-Bravo. Thank you for verifying the issue.
Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

ioweb-gr commented 10 months ago

@engcom-Bravo Thank you for confirming this issue because it's very important for consistency in product feeds.