Rename move state from cancel to cancelled

issue8927
review297851002
This commit is contained in:
David Harper committed 2020-06-06 10:30:11 +01:00
1 parent 3f9bdc205d
commit 6130acf3fd
1 file changed
+3 -3
+3 -3
View File
@@ -613,14 +613,14 @@ class Production(Workflow, ModelSQL, ModelView):
dates = production._get_move_planned_date()
input_date, output_date = dates
inputs = [m for m in production.inputs
if m.state not in ('assigned', 'done', 'cancel')]
if m.state not in ('assigned', 'done', 'cancelled')]
if inputs:
to_write.append(inputs)
to_write.append({
'planned_date': input_date,
})
outputs = [m for m in production.outputs
if m.state not in ('assigned', 'done', 'cancel')]
if m.state not in ('assigned', 'done', 'cancelled')]
if outputs:
to_write.append(outputs)
to_write.append({
@@ -648,7 +648,7 @@ class Production(Workflow, ModelSQL, ModelView):
to_draft, to_delete = [], []
for production in productions:
for move in chain(production.inputs, production.outputs):
if move.state != 'cancel':
if move.state != 'cancelled':
to_draft.append(move)
else:
to_delete.append(move)