1、优化机床刀位接口,数据写入到机床的刀位的方法;2、制造-刀具管理菜单下的机床换刀申请菜单隐藏,功能菜单改为作业单;3、刀柄和托盘采购入库时,对录入的Rfid做唯一性校验;

This commit is contained in:
yuxianghui
2024-04-25 17:14:30 +08:00
parent 53ed0d76a6
commit 4bcd6b9944
4 changed files with 20 additions and 12 deletions

View File

@@ -1006,6 +1006,14 @@ class CustomStockMove(models.Model):
"""
for record in self:
if record:
lot = self.env['stock.lot'].sudo().search([('rfid', '=', barcode)])
if lot:
if lot.product_id.cutting_tool_material_id:
material = lot.product_id.cutting_tool_material_id.name
else:
material = lot.product_id.fixture_material_id.name
raise ValidationError(
'该Rfid【%s】已经被序列号为【%s】的【%s】物料所占用!' % (barcode, lot.name, material))
if '刀柄' in (record.product_id.cutting_tool_material_id.name or '') or '托盘' in (
record.product_id.fixture_material_id.name or ''):
for move_line_nosuggest_id in record.move_line_nosuggest_ids: