1、删除功能刀具组装模型的打印二维码按钮,隐藏组装单打印按钮;2、添加功能刀具组装时的rfid验重功能;
This commit is contained in:
@@ -445,6 +445,21 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
if obj.after_assembly_functional_tool_length == 0:
|
||||
raise ValidationError('组装参数信息【伸出长】不能为0!!!')
|
||||
|
||||
@api.constrains('rfid')
|
||||
def _check_rfid(self):
|
||||
self.get_rfid()
|
||||
|
||||
@api.onchange('rfid')
|
||||
def _onchange_rfid(self):
|
||||
self.get_rfid()
|
||||
|
||||
def get_rfid(self):
|
||||
for obj in self:
|
||||
if obj.rfid:
|
||||
tool_entity = self.env['sf.functional.cutting.tool.entity'].sudo().search([('rfid', '=', obj.rfid)])
|
||||
if tool_entity:
|
||||
raise ValidationError('【%s】的rfid已被使用,请重新录入!!!' % obj.rfid)
|
||||
|
||||
def functional_tool_assembly(self):
|
||||
"""
|
||||
功能刀具组装
|
||||
|
||||
Reference in New Issue
Block a user