fix on_change_route

#040326
This commit is contained in:
carlosgalvez-nan 2020-03-11 09:38:51 +01:00
parent ce90f883cb
commit 4af83ce06b
1 changed files with 1 additions and 3 deletions

View File

@ -246,9 +246,7 @@ class Production(metaclass=PoolMeta):
@fields.depends('route', 'operations')
def on_change_route(self):
Operation = Pool().get('production.operation')
delete_operations = [x for x in self.operations]
Operation.delete(delete_operations)
self.operations = None
operations = []
if self.route:
for operation in self.route.operations: