[FIX] stock: get product qty based on location and warehouse
When getting the available quantity of a product, it is possible to specify the warehouse and/or the location in the context. However, it does not correctly work. For instance, if we provide the stock location ID (8) and the warehouse ID (1): we first use the view location of the warehouse, and we then get the intersection between this view location and the provided locations: nothing. In such case, we should keep the stock location. Few other examples are given in the test. OPW-3450169 closes odoo/odoo#134680 Signed-off-by:William Henrotin (whe) <whe@odoo.com> Co-authored-by:
Simon Schmid <simon.schmid@braintec.com>
Loading