Closed AaronHForgeFlow closed 4 months ago
CI fixed now :tada:
@rousseldenis , @JordiMForgeFlow I dediced to fix the tests in the stock_cycle_count module, indeed the test that was failing was actually not testing anything as long the inventory adjustment was never created in that test.
for now I left the method _get_overlapping_inventories as self.ensure_one(), for the purpose of the PR that is sufficient. If this change is a blocking change then I can consider make it multi.
@AaronHForgeFlow could you add some test to validate the new changes for the constrain?
@JordiMForgeFlow Added the test. Also remove the constraint check in the action_in_progress method. It is not necessary as the constraint method depends in the state. Adapted a bit the code.
conflicts
conflicts
rebased & solved
Hi @AaronHForgeFlow
I've noticed we have overlapping PRs (https://github.com/OCA/stock-logistics-warehouse/pull/2021) . Here are my observations and proposal:
Review of this PR:
My Proposal:
to_do
, where to_do
represents the quant currently in a stock inventory in progress.to_do = True
gets blocked in order to allow reviews in sublocations where this product is not in stock. (You can review test_09 of my PR, this is the one I think this PR is not covering https://github.com/OCA/stock-logistics-warehouse/pull/2021/files#diff-4307516705b49705a1076c0c27cb158684c4bde931c08199f7273efa32d1de7cR457 )I hope this clarifies my proposal. Looking forward to your thoughts.
Thanks.
I am closing this PR in favor of https://github.com/OCA/stock-logistics-warehouse/pull/2021/ Please do not delete the branch
The other PR covers more use cases than this one, and that is why it is ok to me to keep the other.
This change allows to create several inventory adjustments on the same location if the products involved are different
You may say that creating inventory adjustment in the same location by product category is not efficient and I agree with that. However, the possibility is there, and the constraint should not be raised in this case.
@ ForgeFlow