Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent admin to overwrite Stock Data when order placed while he was editing product page #538

Open
maghamed opened this Issue Feb 15, 2018 · 1 comment

Comments

@maghamed
Copy link
Collaborator

maghamed commented Feb 15, 2018

Currently we have Qty/Stock Status fields on the Product editing page in Magento Backend
so, we have both product data and Inventory data on the same form
and it happens, that admin opens product editing page as he wants to change name/description/media data etc.
but Magento sends whole data on a form to server
and we save it all together , re-writing the previous state
thus, if at the time of admin was editing product attributes, order has been placed and inventory has been deducted
saving product form - we just loose this inventory deduction
so, the system will behave like this.

  1. Initial state. Qty = 10
  2. Admin opens product page (Qty = 10 )
  3. Customer place an order and make deduction -5 (Qty = 10- 5 = 5)
  4. Customer updates product description and save product (sending Qty = 10 , old value)
    it’s very hard to track such issue , and re-create data consistency

More discussion about this issue here - https://youtu.be/WrrH_iwFHaE

so, the simplest solution - just not to send Stock data if value of Qty/Stock Status has not changed.
We have initial Pull Request for this
#537

which affects Magento CE (two fields: Qty / Stock Status).
This is just UI part (no backend handling added)

but we also need to apply the similar approach for SourceItem grid we introduce in the scope of MSI

AC:

  • we can edit product with source items and place orders at the same time. Non-stock attributes from the product edit page should not override stock information saved when order is placed in single-stock mode
  • we can edit product with source items and place orders at the same time. Non-stock attributes from the product edit page should not override stock information saved when order is placed in multi-stock mode
@mbrinton01

This comment has been minimized.

Copy link
Collaborator

mbrinton01 commented Mar 7, 2018

Moved to Milestone 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.