summaryrefslogtreecommitdiff
path: root/addons/website/tests/test_ui.py
diff options
context:
space:
mode:
authorArnold Moyaux <arm@odoo.com>2019-03-13 13:49:42 +0000
committerArnold Moyaux <arm@odoo.com>2019-03-14 09:25:28 +0000
commit7e96d485c7d91e5fcb3ee59c71ecb5d76827298f (patch)
tree408715a57399df55f62089844d7b6c8d905df630 /addons/website/tests/test_ui.py
parent20c6a65ce325c15a5dc5adf24398933b73bec3c8 (diff)
[FIX] stock: redundant move line on _set_quantity_done
Usecase to repdoduce: BOM 1 final product F - 2 components C - Create a MO of 2 units F - Do not reserve - Produce 1 units twice You have 1 finished line with 0 quantity and another with 2 quantity. It happens because _set_quantity_done expect reservation on move line. It checks the reservation - quantity done on a move line as quantity to add. Since you have no reservation in will result as - quantity done and it will remove the quantity done on existing line. Then it removes the quantity done added on move line on the total quantity to add passed as an argument. It results as qty_to_consume -(-move line quanity done). At the end of the method it creates a new move line with the remaining quantity to consume (on which was added the quantity done of not reserved move line). Skip the move line update if the quantity reserved - quantity done is negative. closes odoo/odoo#31805 Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Diffstat (limited to 'addons/website/tests/test_ui.py')
0 files changed, 0 insertions, 0 deletions