处理工单的Rfid扫码绑定解绑问题

This commit is contained in:
yuxianghui
2025-03-13 08:36:10 +08:00
parent 8237d04f32
commit 0d8445e444
2 changed files with 9 additions and 5 deletions

View File

@@ -46,8 +46,11 @@ class ProductionWizard(models.TransientModel):
mrp_workorder_list = self.mrp_production_id.workorder_ids.filtered(lambda kw: kw.rfid_code)
for workorder in mrp_workorder_list:
rfid_code = workorder.rfid_code
workorder.write({'rfid_code_old': rfid_code,
'rfid_code': False})
workorder.filtered(lambda wo: wo.routing_type == '装夹预调' and wo.rfid_code is not False).write(
{'rfid_code_old': rfid_code, 'rfid_code': False})
workorder.filtered(lambda wo: wo.routing_type != '装夹预调' and wo.rfid_code is not False).write(
{'rfid_code_old': False, 'rfid_code': False})
if self.is_remanufacture is True:
ret = {'programming_list': [], 'is_reprogramming': self.is_reprogramming}
if self.is_reprogramming is True: