diff --git a/production.py b/production.py index 489fff42f1..4a36fae7b3 100644 --- a/production.py +++ b/production.py @@ -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)