diff options
| author | Pratima Gupta <pgu@odoo.com> | 2019-12-30 09:43:50 +0000 |
|---|---|---|
| committer | Arnold Moyaux <arm@odoo.com> | 2019-12-30 11:27:07 +0000 |
| commit | e901dfe466169e6134ed2aa0071b1dd454db3152 (patch) | |
| tree | 76f1562716b69d775593c92aa5b849ab2e8caac4 /addons/web/static/src/xml/debug.xml | |
| parent | c7b960216509d1568b4da8739ae97dc3a0631e8c (diff) | |
[FIX] stock, purchase_stock: do not recompute draft, done, cancel moves
Usecase to reproduce:
- Set a product with routes: MTO + Buy
- Create and valide a SO
- Cancel the delivery
- Cancel the RFQ linked
-> The delivery will be switch to confirmed state while it should remain
cancel.
It happens because the button_cancel on purchase.order call
_recompute_state on move. _recompute_state modify the state to confirm,
partially_available or available depending the reservation status.
Howver it should never be call on 'draft', 'cancel' or 'done' moves
since it would modify their state.
A fix would be to filter the set of moves in order to exclude moves that
are cancel, done or draft before using _recompute_state. However this is
easy to forget and the issue would be probably redo in the future.
A more stable fix is to add the filter in the _recompute_state directly.
closes odoo/odoo#42471
Task: 2157543
X-original-commit: 0619415c17dc810aea67890cd3415c3f05dd2290
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Diffstat (limited to 'addons/web/static/src/xml/debug.xml')
0 files changed, 0 insertions, 0 deletions
