From 24722f474c5e64a813b97a8b7dd045ccfa548ed2 Mon Sep 17 00:00:00 2001 From: "jinling.yang" Date: Sun, 28 Apr 2024 11:43:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=85=8D=E9=80=81=E6=97=B6ag?= =?UTF-8?q?v=E7=AB=99=E7=82=B9=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/mrp_workorder.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py index 9e3dde4c..dd7dbd3c 100644 --- a/sf_manufacturing/models/mrp_workorder.py +++ b/sf_manufacturing/models/mrp_workorder.py @@ -1176,7 +1176,9 @@ class WorkPieceDelivery(models.Model): item.feeder_station_start_id.name, item.feeder_station_start_id.state)) logging.info('工件配送-终点状态:%s-%s' % ( item.feeder_station_destination_id.name, item.feeder_station_destination_id.state)) - if item.feeder_station_start_id.state == '占用' and item.feeder_station_destination_id.state == '空闲': + if ( + item.feeder_station_start_id.state == '占用' and item.feeder_station_destination_id.state == '空闲') or ( + item.feeder_station_start_id.state == '空闲' and item.feeder_station_destination_id.state == '空闲'): is_free = True logging.info('is_free:%s' % is_free) return is_free