1、优化功能刀具预警记录跳转功能刀具拆解单链接方法;2、优化功能刀具预警界面及搜索等方法;3、优化拆解单功能及界面;4、处理功能刀具组装时,刀柄状态不实时变更问题
This commit is contained in:
@@ -947,6 +947,12 @@ class FunctionalToolDismantle(models.Model):
|
||||
if self.chuck_freight_id == self.pad_freight_id:
|
||||
raise ValidationError('【夹头】和【刀盘】的目标货位重复,请重新选择!')
|
||||
|
||||
def tool_scrap(self):
|
||||
self.scrap_boolean = True
|
||||
|
||||
def tool_no_scrap(self):
|
||||
self.scrap_boolean = False
|
||||
|
||||
def confirmation_disassembly(self):
|
||||
logging.info('%s刀具确认开始拆解' % self.dismantle_cause)
|
||||
code = self.code
|
||||
@@ -1016,6 +1022,14 @@ class FunctionalToolDismantle(models.Model):
|
||||
'rfid': '%s(已拆解)' % self.rfid,
|
||||
'state': '已拆解'
|
||||
})
|
||||
# ==================修改刀具预警信息的值============
|
||||
warning_id = self.env['sf.functional.tool.warning'].sudo().search(
|
||||
[('functional_tool_id', '=', self.functional_tool_id.id)])
|
||||
if warning_id:
|
||||
warning_id.sudo().write({
|
||||
'dispose_user': self.env.user.name,
|
||||
'dispose_time': fields.Datetime.now()
|
||||
})
|
||||
logging.info('【%s】刀具拆解成功!' % self.name)
|
||||
|
||||
def create_tool_picking_scrap(self, datas):
|
||||
|
||||
@@ -418,7 +418,7 @@ class FunctionalToolWarning(models.Model):
|
||||
elif dismantle_ids:
|
||||
action.update({
|
||||
'view_mode': 'tree,form',
|
||||
'res_id': dismantle_ids.ids
|
||||
'domain': [('id', 'in', dismantle_ids.ids)],
|
||||
})
|
||||
else:
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user