优化了申请换刀功能的数据,
This commit is contained in:
@@ -148,7 +148,7 @@ class MachineTableToolChangingApply(models.Model):
|
||||
:return:
|
||||
"""
|
||||
# 更新数据到机台换刀申请界面
|
||||
# todo 换刀申请条件需补充完善
|
||||
# todo 自动换刀申请条件需补充完善
|
||||
if(self.functional_tool_status == '异常'):
|
||||
self.env['sf.machine.table.tool.changing.apply'].search([
|
||||
('CNC_machine_table', '=', self.CNC_machine_table)]).write({
|
||||
@@ -187,12 +187,10 @@ class MachineTableToolChangingApply(models.Model):
|
||||
:param vals:
|
||||
:return:
|
||||
"""
|
||||
# todo 增加设置直径的值
|
||||
# tool_changing_apply = self.env['sf.machine.table.tool.changing.apply'].search(
|
||||
# [('CNC_machine_table', '=', vals.get('CNC_machine_table'))])
|
||||
# for i in tool_changing_apply:
|
||||
# print(i)
|
||||
# vals['functional_tool_diameter'] = self.diameter
|
||||
# 增加设置直径的值
|
||||
tool_changing_apply = self.env['sf.machine.table.tool.changing.apply'].search(
|
||||
[('CNC_machine_table', '=', vals['machine_tool_name'])])
|
||||
vals['functional_tool_diameter'] = tool_changing_apply.diameter
|
||||
|
||||
self.env['sf.functional.tool.assembly'].create(vals)
|
||||
|
||||
@@ -342,7 +340,13 @@ class FunctionalToolAssembly(models.Model):
|
||||
receive_time = fields.Datetime(string='领用出库时间')
|
||||
remark = fields.Char(string='备注说明')
|
||||
|
||||
check_box = fields.Boolean(string='复选框', default=False, attrs="{'readonly': [('assemble_status', '!=', '1')]}")
|
||||
check_box_1 = fields.Boolean(string='复选框', default=False)
|
||||
|
||||
@api.onchange('assemble_status')
|
||||
def check_box(self):
|
||||
if self.assemble_status != '1':
|
||||
self.check_box_1 = False
|
||||
|
||||
|
||||
def cancel_functional_tool_assembly(self):
|
||||
"""
|
||||
@@ -366,7 +370,9 @@ class FunctionalToolAssembly(models.Model):
|
||||
'cut_time': None,
|
||||
'cut_length': None,
|
||||
'cut_number': None,
|
||||
'assemble_status': '0'
|
||||
'assemble_status': '0',
|
||||
'tool_loading_person':None,
|
||||
'tool_loading_time':None
|
||||
})
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user