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

[FIX] stock: Usererror during PO import


Usecase to reproduce:
- Create and validate a PO + receipt
- Import a file containing a different PO line quantity

Expected behavior:
The PO line is modified and the receipt has the a new move

Current behavior:
UserError asking to modify the quantity done of stock.move.line instead
reserved quantity.

Following commit 76ad7b7d

The purpose is to block import with reserved quantity

It happens because the PO line import trigger the creation of a new
stock.move and reserve it (create the stock.move.line). However since
it's created by the system the data are correct.

There is no issue in multiple step since the internal step requires
the move_orig_ids and thus the product_uom_qty is empty

To fix it:
- Relax the constraint to only consider sml having an impact on quant

opw-3336131

closes odoo/odoo#127245

Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
parent c9dbfd35
No related branches found
No related tags found
Loading
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