Remove duplicate method to obtain an operatio from a route_operation.

This commit is contained in:
Albert Cervera i Areny 2022-12-23 13:51:46 +01:00
parent a39c79ebbc
commit 6fb794db9b
1 changed files with 1 additions and 11 deletions

View File

@ -384,17 +384,7 @@ class Production(metaclass=PoolMeta):
self.operations = tuple()
for route_operation in self.route.operations:
self.operations += (self._operation(route_operation), )
def _operation(self, route_operation):
Operation = Pool().get('production.operation')
return Operation(
sequence=route_operation.sequence,
work_center_category=route_operation.work_center_category,
work_center=route_operation.work_center,
operation_type=route_operation.operation_type,
route_operation=route_operation,
)
self.operations += (self.get_operation(route_operation), )
class OperationSubcontrat(metaclass=PoolMeta):