summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2018-01-08 13:20:03 +0100
committerNicolas Martinelli <nim-odoo@users.noreply.github.com>2018-01-09 08:59:44 +0100
commita650f2359b7970ae130d266a5b5b60d6062b517a (patch)
tree476909c1cb8cf85b8312dbb3988008313f743224 /addons/web/static/src/xml
parentdc61861f90d15797b19f8ebddfb0c8a66d0afa88 (diff)
[FIX] mrp: extra move line in sub-location
- Define a Component A tracked by lot. - Define a Final Product B tracked by lot. - Create a BOM, e.g. 5 units of A to produce B. - Get some quantity of A in a sub-location, e.g. 'WH/Stock/Shelf 1'. - Create a MO for 1 unit of B. - When clicking on 'Produce', record 6 units consumed instead of 5. - Post the inventory 5 units of A is removed from 'WH/Stock/Shelf 1' and 1 unit of A is removed from 'WH/Stock'. The latter might create a negative quant if no stock is available in 'WH/Stock'. When the extra move line is created, it is created using the data of the stock move (in `_generate_consumed_move_line`). When posting the inventory, the quants selection is made strictly in the location set (in `_update_available_quantity`), which might cause the mentioned negative quant. The solution is to select a sub-location where the product can be found. This gives a higher chance to avoid negative quants afterwards. Note that if we wanted to avoid negative quants, we could make a reservation process on the move, and potentially create several stock move lines. This is beyond the scope of the integration of MRP with sub-locations. opw-803969
Diffstat (limited to 'addons/web/static/src/xml')
0 files changed, 0 insertions, 0 deletions