Clear stock moves in staging when validating amendment

Closes #12999
(grafted from abebfcfa0616585fcea20e17b9bafd6413011964)

--HG--
branch : 7.0
This commit is contained in:
Cédric Krier committed 2024-02-05 11:51:00 +01:00
1 parent 4ef1675faf
commit 206494442f
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -161,7 +161,7 @@ class Amendment(Workflow, ModelSQL, ModelView):
@classmethod
def _stock_moves(cls, line):
for move in line.moves:
if move.state == 'draft':
if move.state in {'staging', 'draft'}:
yield move
+1 -1
View File
@@ -177,7 +177,7 @@ class Amendment(Workflow, ModelSQL, ModelView):
@classmethod
def _stock_moves(cls, line):
for move in line.moves:
if move.state == 'draft':
if move.state in {'staging', 'draft'}:
yield move