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

FIX Warehouse Parent error #25961

Open
wants to merge 2 commits into
base: 17.0
Choose a base branch
from

Conversation

samifilali
Copy link
Contributor

FIX

fix the problem of creating a shipment if it is parent and negative stock is authorized

@eldy
Copy link
Member

eldy commented Sep 19, 2023

I don't understand the fix.
The test is to know if a warehouse was already known or not. It should have no relation with the option to allow negative or not.
Can you describe the situation you face and how to reproduce the bug ?

@eldy eldy added the Discussion Some questions or discussions are opened and wait answers of author or other people to be processed label Sep 19, 2023
@samifilali
Copy link
Contributor Author

When I attempt to ship, even though negative stock is allowed, if my selected warehouse is a parent warehouse, I cannot ship the out-of-stock items with it.

@eldy
Copy link
Member

eldy commented Sep 26, 2023

When I attempt to ship, even though negative stock is allowed, if my selected warehouse is a parent warehouse, I cannot ship the out-of-stock items with it.

Can you provide a screenshot with data (and full screen) ?

@samifilali
Copy link
Contributor Author

image

@samifilali samifilali added Bug This is a bug (something does not work as expected) and removed Bug This is a bug (something does not work as expected) labels Oct 8, 2023
@eldy
Copy link
Member

eldy commented Oct 12, 2023

image

On previous step, you probably select the warehouse "Rack A" ? If yes, it mean you force the warehouse you want to use for stock movement so only stock into Rack A is allowed to fill shipment creation. Can you try without setting warehouse at previous step ?

@samifilali
Copy link
Contributor Author

The problem is precisely there. Indeed, I should be able to carry out stock movements by selecting a child warehouse if negative stock is authorized

@eldy
Copy link
Member

eldy commented Oct 20, 2023

The problem is precisely there. Indeed, I should be able to carry out stock movements by selecting a child warehouse if negative stock is authorized

You should be able if you are in the mode all warehouse can be used.
If you force a warehouse W, you can only pick in warehouse W, not into a child nor a parent of W.

@samifilali
Copy link
Contributor Author

yes, but if I select a warehouse W and my product A has no stock in this warehouse, I must be able to ship it anyway (if I authorise negative stock).

@eldy
Copy link
Member

eldy commented Nov 7, 2023

yes, but if I select a warehouse W and my product A has no stock in this warehouse, I must be able to ship it anyway (if I authorise negative stock).

It depends.
If you select the warehouse at the first step, it means "i want to ship only what isbinside this warehouse" so if there is not stock in it, you should not be able to ship it at all.
But if you do not force the warehouse when building the shipment from the order, you should be able to ship it.

@atm-thibaultf
Copy link
Contributor

It depends.
If you select the warehouse at the first step, it means "i want to ship only what isbinside this warehouse" so if there is not stock in it, you should not be able to ship it at all.
But if you do not force the warehouse when building the shipment from the order, you should be able to ship it.

If I authorize stock to be negative, I should be able to ship from any warehouse no matter if I select one warehouse from the order or not.

Anyway, in fact, the only case when it works correctly is the case you talk about saying it shouldn't work (when I select a warehouse from the order). We have 3 cases explained below (assuming that I have allowed the negative stock and I don't have any stock in warehouses for my product) :

  1. I select a warehouse with no child warehouse (it's important) from the order, I can ship my product from it : => Ok, it works correctly
    image

  2. I select a warehouse with child warehouse from the order, I can't ship my product from it : => Not OK, I should be able to ship it like below
    image

  3. I don't select any warehouse from the order, I can't ship my product : => Not OK, I should be able to ship it like below and like you said it
    image

@samifilali
Copy link
Contributor Author

@eldy ?

@eldy
Copy link
Member

eldy commented Jan 15, 2025

@samifilali I still not see what is the trouble.

Case A
If you select a warehouse at first step to say "I want to ship only products that are inside this warehouse", then you are not able to select a product that is not. This doe not depends on stock qty.

Case B
If you want to be able to ship from any warehouse, do not select a warehouse at first step. And then on next page you should be able to select any product (and if option "disallow negative stock is on", only products with enough in stock)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Some questions or discussions are opened and wait answers of author or other people to be processed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants