PrestaShop / PrestaShop

PrestaShop is the universal open-source software platform to build your e-commerce solution.
https://www.prestashop-project.org/
Other
8.24k stars 4.81k forks source link

Stock movement registered as "Employee Edition" when order is created on BO #24424

Open sanji-japan opened 3 years ago

sanji-japan commented 3 years ago

Describe the bug

When an order is created by an admin on the BO, the stock movement associated with that order is registered as "Employee Edition" - the same as a manual modification of the stock.

Expected behavior

An order created on the BO should have a specific status like "Employee Order".

Steps to Reproduce

Steps to reproduce the behavior:

  1. Create a new order on BO - Go to "Orders/Orders", "Add New Order", order any product
  2. Change the stock for the same product - Go to "Catalog/Stocks", choose the product, remove or add 1 (or more) item
  3. Still in the Stock management, go to "Movements" and select that same product
  4. Both the order and the manual stock correction have the same type "Employee Edition"

Screenshots

screenshot Order from BO & Manual stock modification are reported exactly the same way and cannot be differentiated

Additional information

hibatallahAouadni commented 3 years ago

Hello @sanji-japan

Thanks for the detailed bug reprot :clap: Could you please check this issue #23453 it seems similar to yours. Please check and feedback.

Thanks!

sanji-japan commented 3 years ago

Hello @hibatallahAouadni,

The issue is different, the reference given is about the lack of stock update, in my case the stock is properly updated but not with the proper status. The absence of a proper status then preventing understanding the origin of a stock change...

Thanks

hibatallahAouadni commented 3 years ago

Hello @sanji-japan

Thanks for you patience :pray: I didn't manage to reproduce the issue with PS1.7.7.4, see the attached screenshot below:

image

Please check and feedback. Thanks!

sanji-japan commented 3 years ago

Hello @hibatallahAouadni,

Thanks for your feedback. I am not sure I described properly the issue. Can you please in BO create any order : Go to "Orders/Orders", "Add New Order", order any product, finalise the process.

If you go back to the screenshot you just published above, you will see that this new order register a stock movement as "Employee Edition", while it is in fact really a Customer Order created in BO...

Thanks!

hibatallahAouadni commented 3 years ago

Hello @sanji-japan

If you go back to the screenshot you just published above, you will see that this new order register a stock movement as "Employee Edition", while it is in fact really a Customer Order created in BO...

Yep, you're right! when I (employee) create an order in BO, the stock movement will be registred as 'Employee Edition". If the customer create an order in FO, it will be registred as "Customer Edition". IMHO, that's the logic!

Thanks!

sanji-japan commented 3 years ago

Hello @hibatallahAouadni, When looking at the stock_mvt_reason_lang table, there are several codes for "Customer Order" (3 & 9), and several codes for "Employee Edition" (11 & 12). So I would assume that a different status should be available when an order is done in BO. AFter all, a new BO order is NOT an "Employee Edition"... Without a specific status, it is impossible to identify when a manual adjustment in the BO...

hibatallahAouadni commented 3 years ago

Hello @sanji-japan

Let's ask the Product Team :wink:

Ping @PrestaShop/product-team can someone please clarify this behavior: If an employee create an Order from BO, should the stock movement be registred as "Employee Edition" or "Customer Edition"?

Thanks in advance :pray:

marionf commented 3 years ago

I think it could be a good idea to create a new type "Employee order" for an order made through the BO