Update work state on production waiting

Also a work with cycle should not be set back to request.

issue11859
review415881003
This commit is contained in:
Cédric Krier committed 2022-11-24 19:12:19 +01:00
1 parent 1b38f3c9c8
commit 62b6c25b1b
2 files changed
+2 -1

No files matched your search

+1 -1
View File
@@ -210,7 +210,7 @@ class Work(sequence_ordered(), ModelSQL, ModelView):
@property
def _state(self):
if self.production.state == 'waiting':
if self.production.state == 'waiting' and not self.cycles:
return 'request'
elif self.production.state == 'done':
return 'done'