-
-
Notifications
You must be signed in to change notification settings - Fork 723
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
[16.0][ADD] stock_location_fill_state #2188
base: 16.0
Are you sure you want to change the base?
Conversation
7cef800
to
8cb5171
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to me, the right implementation is here
https://github.com/OCA/wms/blob/16.0/stock_storage_type/models/stock_location.py#L319
I would have migrated the stock_location_empty and extracted the computation from the above code to compute stock_amount
and location_is_empty
. It's not the exact same computation as in 14.0 but it's the most correct one in my opinion and improving previous implementation. Then we don't end-up with 3 modules computing the same concept in 3 different ways.
I prefer empty
than void
. And occupied state is like there is an hostile army ;)
Occupancy is also misleading as I thought initially it was about volume...
quants_result = self.env["stock.quant"].read_group( | ||
[("location_id", "in", self.ids)], ["location_id"], ["location_id"] | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can still have quants with 0 quantity. So that's not inline with the help no product quantity
Yes, in fact, I had this in mind but wanted simpler implementation. I would say, we should maybe transform the boolean state to a Selection one, with an 'Operation in Progress' (yellow color) there: |
|
That's why I proposed |
Being emptied is when there is stock but entirely reserved for move lines with qty done. Equals to current implementation of is empty in storage type module. Being filled is when it is empty but there are move line with location as destination. As one is when there is stock and the other when there is no stock, you cannot have both, it is exclusive |
8cb5171
to
964a55b
Compare
This is different from https://github.com/OCA/stock-logistics-warehouse/tree/14.0/stock_location_empty
As we don't compute stock amount.
Depends on: