diff --git a/sf_tool_management/models/mrp_workorder.py b/sf_tool_management/models/mrp_workorder.py index 6fbd6f18..38d952f5 100644 --- a/sf_tool_management/models/mrp_workorder.py +++ b/sf_tool_management/models/mrp_workorder.py @@ -205,7 +205,7 @@ class MrpProduction(models.Model): [('workorder_id', 'in', workorder_ids.ids), ('cutting_tool_name', 'in', missing_tool_1)]) if cnc_ids: cnc_ids.write({'tool_state': '1'}) - if missing_tool_2 and invalid_tool != []: + if missing_tool_2 and invalid_tool == []: logging.info(f'库存缺刀:{missing_tool_2}') # 调用CAM工单程序用刀计划创建方法 cnc_ids = self.env['sf.cnc.processing'].sudo().search(