Accept Merge Request #796: (feature/功能刀具组装扫录入数据功能优化 -> develop)
Merge Request: 添加功能刀具组装时扫描录入刀具物料时进行物料是否已入库和是否已经使用的判断 Created By: @禹翔辉 Reviewed By: @马广威 Approved By: @马广威 Accepted By: @禹翔辉 URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/796?initial=true
This commit is contained in:
@@ -304,6 +304,10 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
if not records:
|
||||
raise ValidationError('扫描的条形码数据不存在,请重新扫描!')
|
||||
for record_stock_lot in records:
|
||||
if record_stock_lot.quant_ids[-1].location_id.name == '刀具组装位置':
|
||||
raise ValidationError('该刀具物料已使用,请重新选择!!!')
|
||||
elif record_stock_lot.quant_ids[-1].location_id.name not in '刀具房':
|
||||
raise ValidationError('该刀具物料未入库,请重新选择!!!')
|
||||
tool_material_name = record_stock_lot.product_id.cutting_tool_material_id.name
|
||||
if tool_material_name == '整体式刀具':
|
||||
record.integral_code_id = record_stock_lot.id
|
||||
|
||||
Reference in New Issue
Block a user