Clear stock moves in staging when validating amendment

Closes #12999
(grafted from abebfcfa0616585fcea20e17b9bafd6413011964)

--HG--
branch : 6.0
This commit is contained in:
Cédric Krier committed 2024-02-05 11:51:00 +01:00
1 parent 44b1344a88
commit 7e61c8b6f0
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -153,7 +153,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
@@ -169,7 +169,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