Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/修复工件配送

This commit is contained in:
jinling.yang
2024-05-06 11:48:53 +08:00
4 changed files with 19 additions and 3 deletions

View File

@@ -1042,7 +1042,10 @@ class SfWorkOrderBarcodes(models.Model):
# [('routing_type', '=', '装夹预调'), ('rfid_code', '=', barcode)])
workorder_old = self.env['mrp.workorder'].search([('rfid_code', '=', barcode)])
if workorder_old:
raise UserError('该托盘已绑定【%s】制造订单,请先解除绑定!!!' % workorder_old.production_id.name)
name = ''
for workorder in workorder_old:
name = '%s %s' % (name, workorder.production_id.name)
raise UserError('该托盘已绑定【%s】制造订单,请先解除绑定!!!' % name)
if workorder:
if workorder.routing_type == '装夹预调':
if workorder.state in ['done']: