Not assign_try in case move is not draft

#047220
This commit is contained in:
Raimon Esteve 2021-09-22 14:22:36 +02:00
parent 408443ae1d
commit 9fda03ef8f
1 changed files with 3 additions and 0 deletions

View File

@ -114,7 +114,10 @@ class Move(metaclass=PoolMeta):
@classmethod
def assign_try(cls, moves, with_childs=True, grouping=('product',)):
for move in moves:
if move.state != 'draft':
continue
move._check_party()
if 'party' not in grouping:
grouping = grouping + ('party',)
return super(Move, cls).assign_try(moves, with_childs=with_childs,