解除装夹起点从下产线agv调度任务关联带出

This commit is contained in:
胡尧
2024-09-06 15:34:30 +08:00
parent 096542c8ff
commit 2d5ef0aae4
3 changed files with 29 additions and 2 deletions

View File

@@ -210,6 +210,13 @@ class WorkpieceDeliveryWizard(models.TransientModel):
# 将对象添加到对应的同模型且是多对多类型里
self.production_ids |= workorder.production_id
self.workorder_ids |= workorder
if not self.feeder_station_start_id:
down_product_agv_scheduling = self.get_down_product_agv_scheduling()
if down_product_agv_scheduling:
self.feeder_station_start_id = down_product_agv_scheduling.end_site_id.id
else:
raise UserError('该rfid码对应的工单不存在')
return