完成了弹窗换刀需求信息的视图和默认数据的同步

This commit is contained in:
yuxianghui
2023-06-21 17:21:58 +08:00
parent 6caae0325a
commit f135f0a5e7
8 changed files with 129 additions and 12 deletions

View File

@@ -104,9 +104,12 @@ class MachineTableToolChangingApply(models.Model):
_name = 'sf.machine.table.tool.changing.apply'
_description = '机床换刀申请'
apply_to_tool_change_ids = fields.One2many('sf.tool.change.requirement.information', 'tool_change_to_apply_id', string='换刀需求信息')
CNC_machine_table = fields.Char(string='CNC机床')
# todo 机床类型和刀位号 为 Many2one
machine_table_type = fields.Char(string='机床类型')
machine_tool_code = fields.Char(string='机台号', attrs="{'invisible': 1}")
cutter_spacing_code = fields.Char(string='刀位号')
functional_tool_code = fields.Char(string='功能刀具编码')
functional_tool_name = fields.Char(string='功能刀具名称')
@@ -119,7 +122,7 @@ class MachineTableToolChangingApply(models.Model):
max_lifetime_value = fields.Char(string='最大寿命值')
alarm_value = fields.Char(string='报警值')
used_value = fields.Char(string='已使用值')
functional_tool_status = fields.Selection([("0", "正常"), ('1', '异常')], string='功能刀具状态')
functional_tool_status = fields.Selection([('正常', '正常'), ('异常', '异常')], string='功能刀具状态')
replacement_tool_code = fields.Char(string='待换刀具编码')
replacement_tool_name = fields.Char(string='待换刀具名称')
@@ -154,12 +157,6 @@ class MachineTableToolChangingApply(models.Model):
# 'name': source_record.name,
})
# todo
def tool_changing_apply(self):
"""
换刀申请(按键)
"""
# todo
def transfer(self):
"""
@@ -171,11 +168,14 @@ class CAMWorkOrderProgramKnifePlan(models.Model):
_name = 'sf.cam.work.order.program.knife.plan'
_description = 'CAM工单程序用刀计划'
CAM_cutter_spacing_code = fields.Char(string='CAM刀位')
ticket_task_code = fields.Char(string='工单任务编')
cam_procedure_code = fields.Char(string='CAM程序编号')
cam_cutter_spacing_code = fields.Char(string='CAM刀位号')
functional_tool_code = fields.Char(string='功能刀具编码')
functional_tool_name = fields.Char(string='功能刀具名称')
functional_tool_type = fields.Char(string='功能刀具类型')
machine_table_name = fields.Char(string='名称')
machine_table_name = fields.Char(string='名称')
machine_tool_cutter_spacing_code = fields.Char(string='机床刀位号')
diameter = fields.Char(string='直径(程式)')
tool_loading_length = fields.Char(string='装刀长')
clearance_length = fields.Char(string='避空长')
@@ -185,6 +185,7 @@ class CAMWorkOrderProgramKnifePlan(models.Model):
required_cutting_time = fields.Char(string='需要切割时间')
whether_standard_tool = fields.Boolean(string='是否标准刀')
need_knife_time = fields.Datetime(string='需要用刀时间')
plan_execute_status = fields.Selection([('0', '待下发'), ('1', '执行中'), ('2', '已完成')], string='计划执行状态')
applicant = fields.Char(string='申请人')
reason_for_applying = fields.Char(string='申请原因')
remark = fields.Char(string='备注说明')