odoo/addons/stock/tests
Lucas Perais (lpe) 46263eb398 [FIX] stock: backport fix negative quants
Original commit (in 10.0) be9dce625c55e1b2d6039573c7035d61f762edc8

From original commit:
It is still possible to have negative and positive quants in the same
location because of returns: if you send something to the customer that
is not there and you return it, you will still be able to reserve the
returned goods to send to another client.

Before, if you would do an inventory adjustment, it would not take into
account these returned quants and their negative counterpart, which made
them difficult to get out of the system.

This fix takes them into account by creating two movements for one
inventory line: move the positive counterpart to the inventory location
before getting back from this location the same quantity.

This way, even if you have 0 as quantity on hand but you have those 2
quants, it will eliminate them. (if you are increasing the stock, part
of the process might have done it automatically already).

Also, a key of context has been added which authorizes the process described above in the case of both a tracked product and no lot_id on the stock inventory

OPW 743107
Closes #17167
2017-06-15 08:42:57 +02:00
..
__init__.py [FIX] stock: let resupply from warehouse work 2015-08-12 08:14:48 +02:00
common.py [FIX] stock: when matching moves with pack operations through quants, it did not match the packages correctly. Courtesy of Pedro Baeza 2016-11-16 11:26:20 +01:00
test_owner_available.py [FIX] stock: use owner for virtual stock and in/out 2015-04-10 11:14:30 +02:00
test_resupply.py [FIX] stock: let resupply from warehouse work 2015-08-12 08:14:48 +02:00
test_stock_flow.py [FIX] stock: backport fix negative quants 2017-06-15 08:42:57 +02:00