Clear stock moves in staging when validating amendment

Closes #12999
This commit is contained in:
Cédric Krier
2024-02-05 11:51:00 +01:00
parent bb9a1fd2f5
commit ea9740846e
2 changed files with 2 additions and 2 deletions
+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