Skip to content
Snippets Groups Projects
Commit e77d9fc7 authored by Arnold Moyaux's avatar Arnold Moyaux
Browse files

[FIX] stock: product quantity with force company and location


Usecase to reproduce:
- Set warehouse as 3 steps delivery
- On pack rule set the procure method as 'take from stock if enough or
trigger another rule'
- Do an inventory adjustement of a product and set 10 units in pack zone
- Do a delivery order for this product with only 1 unit.

It will create the delivery order from stock to pack even if the
quantity in pack was sufficient.

It's due to [1] that introduce a new function but if the force company
and location (with an integer) are both set in the domain it will
select the wrong ids. It will take all the location in the company + the
location in the context. However if a location is explicitly given to
the context, it should only consider the stock at this location.

[1] commit 330b99f6

opw-2090384

closes odoo/odoo#39644

Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
parent 7ce7c585
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment