From 6fb794db9b82d56f99541bbaac1cc5549e153bb7 Mon Sep 17 00:00:00 2001 From: Albert Cervera i Areny Date: Fri, 23 Dec 2022 13:51:46 +0100 Subject: [PATCH] Remove duplicate method to obtain an operatio from a route_operation. --- operation.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/operation.py b/operation.py index 5af984f..e0a5618 100644 --- a/operation.py +++ b/operation.py @@ -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):