1、优化刀具拆解单

This commit is contained in:
yuxianghui
2024-09-13 17:37:20 +08:00
parent b4fef421dd
commit 722f6257ae
2 changed files with 16 additions and 18 deletions

View File

@@ -1505,29 +1505,26 @@ class FunctionalToolDismantle(models.Model):
'handle_code_id': self.handle_lot_id.id,
'handle_product_id': self.handle_product_id.id,
'loading_task_source': '3',
'use_tool_time': fields.Datetime.now() + timedelta(hours=4),
'reason_for_applying': '刀具寿命到期'
})
action = self.env.ref('sf_tool_management.sf_functional_tool_assembly_form')
return {
'type': 'ir.actions.client',
'tag': 'display_notification',
'params': {
'title': '组装单创建完成',
'message': '请组装同名称的功能刀具',
'type': 'info',
'links': [{
'label': '组装单',
'url': f'#action={action.id}&id={assembly_id.id}&model=sf.functional.tool.assembly',
}],
},
'type': 'ir.actions.act_window',
'res_model': 'sf.functional.tool.assembly',
'view_type': 'form',
'view_mode': 'form',
'res_id': assembly_id.id,
# 'target': 'new'
}
# {
# 'type': 'ir.actions.act_window',
# 'res_model': 'sf.functional.tool.assembly',
# 'view_type': 'form',
# 'view_mode': 'form',
# 'res_id': assembly_id.id,
# 'type': 'ir.actions.client',
# 'tag': 'display_notification',
# 'params': {
# 'title': '组装单创建完成',
# 'message': '请组装同名称的功能刀具',
# 'type': 'info'
# }
# }
# 'params': {