Merge branch 'feature/功能刀具组装优化' into feature/功能刀具组装流程测试及优化

This commit is contained in:
yuxianghui
2024-04-16 17:23:55 +08:00
19 changed files with 1513 additions and 1244 deletions

View File

@@ -988,9 +988,9 @@ class SfWorkOrderBarcodes(models.Model):
# raise UserError('该托盘已绑定工件,请先解除绑定!!!')
if workorder:
if workorder.routing_type == '装夹预调':
if workorder.state in ['progress', 'done']:
work_state = {'progress': '进行中', 'done': '已完工'}
raise UserError('该工单%s不能重新绑定托盘' % work_state.get(workorder.state))
if workorder.state in ['done']:
work_state = {'done': '已完工'}
raise UserError('装夹%s请勿重复扫码' % work_state.get(workorder.state))
lots = self.env['stock.lot'].sudo().search([('rfid', '=', barcode)])
if lots:
for lot in lots: