完成了机台换刀申请的换刀申请按键弹窗数据同步回机台换刀申请界面以及转移按键界面、CAM工单程序用刀计划的申请装刀界面
This commit is contained in:
@@ -104,7 +104,11 @@ class MachineTableToolChangingApply(models.Model):
|
|||||||
_name = 'sf.machine.table.tool.changing.apply'
|
_name = 'sf.machine.table.tool.changing.apply'
|
||||||
_description = '机床换刀申请'
|
_description = '机床换刀申请'
|
||||||
|
|
||||||
apply_to_tool_change_ids = fields.One2many('sf.tool.change.requirement.information', 'tool_change_to_apply_id', string='换刀需求信息')
|
apply_to_tool_change_ids = fields.One2many(
|
||||||
|
'sf.tool.change.requirement.information',
|
||||||
|
'tool_change_to_apply_id',
|
||||||
|
string='换刀需求信息',
|
||||||
|
attrs="{'invisible': 1}")
|
||||||
|
|
||||||
CNC_machine_table = fields.Char(string='CNC机床')
|
CNC_machine_table = fields.Char(string='CNC机床')
|
||||||
# todo 机床类型和刀位号 为 Many2one
|
# todo 机床类型和刀位号 为 Many2one
|
||||||
@@ -135,32 +139,61 @@ class MachineTableToolChangingApply(models.Model):
|
|||||||
reason_for_applying = fields.Char(string='申请原因')
|
reason_for_applying = fields.Char(string='申请原因')
|
||||||
remark = fields.Char(string='备注说明')
|
remark = fields.Char(string='备注说明')
|
||||||
|
|
||||||
def sync_tool_entity_from_tool_changing_apply_table(self):
|
# def sync_tool_entity_from_tool_changing_apply_table(self):
|
||||||
"""
|
# """
|
||||||
‘功能刀具预警’数据同步到‘机床换刀申请’
|
# ‘功能刀具预警’数据同步到‘机床换刀申请’
|
||||||
"""
|
# """
|
||||||
# 获取源表中的所有记录
|
# # 获取源表中的所有记录
|
||||||
source_records = self.env['sf.functional.cutting.tool.entity'].search([])
|
# source_records = self.env['sf.functional.cutting.tool.entity'].search([])
|
||||||
|
#
|
||||||
|
# # 循环遍历每个记录
|
||||||
|
# for source_record in source_records:
|
||||||
|
# # 检查目标表中是否存在相同的记录
|
||||||
|
# destination_record = self.search([('CNC_machine_table', '=', source_record.machine_tool_code)])
|
||||||
|
# if destination_record:
|
||||||
|
# # todo 如果目标表中已经存在相同的记录,则更新该记录
|
||||||
|
# destination_record.name = source_record.name
|
||||||
|
# else:
|
||||||
|
# # todo 如果目标表中不存在相同的记录,则创建一个新记录
|
||||||
|
# destination_record = self.create({
|
||||||
|
# # 'name': source_record.name,
|
||||||
|
# })
|
||||||
|
|
||||||
# 循环遍历每个记录
|
def amendant_record(self, vals):
|
||||||
for source_record in source_records:
|
"""
|
||||||
# 检查目标表中是否存在相同的记录
|
确认换刀申请(按键)
|
||||||
destination_record = self.search([('CNC_machine_table', '=', source_record.machine_tool_code)])
|
将弹窗数据更新到记录
|
||||||
if destination_record:
|
:param vals:
|
||||||
# 如果目标表中已经存在相同的记录,则更新该记录
|
:return:
|
||||||
# todo
|
"""
|
||||||
destination_record.name = source_record.name
|
self.env['sf.machine.table.tool.changing.apply'].search(
|
||||||
else:
|
[('CNC_machine_table', '=', vals.get('CNC_machine_table'))]).write(vals)
|
||||||
# 如果目标表中不存在相同的记录,则创建一个新记录
|
|
||||||
destination_record = self.create({
|
def revocation_1(self):
|
||||||
# todo
|
"""
|
||||||
# 'name': source_record.name,
|
换刀申请撤回按键
|
||||||
|
:return:
|
||||||
|
"""
|
||||||
|
# 撤回数据更新
|
||||||
|
self.env['sf.machine.table.tool.changing.apply'].search(
|
||||||
|
[('CNC_machine_table', '=', self.CNC_machine_table)]).write({
|
||||||
|
'replacement_tool_code': False,
|
||||||
|
'replacement_tool_name': False,
|
||||||
|
'replacement_tool_type': False,
|
||||||
|
'replacement_tool_coarse_middle_thin': False,
|
||||||
|
'new_former': False,
|
||||||
|
'applicant': False,
|
||||||
|
'used_tool_time': False,
|
||||||
|
'reason_for_applying': False,
|
||||||
|
'remark': False
|
||||||
})
|
})
|
||||||
|
|
||||||
# todo
|
# todo 撤回功能刀具组装创建新任务
|
||||||
def transfer(self):
|
|
||||||
|
def revocation_1(self):
|
||||||
"""
|
"""
|
||||||
转移(按键)
|
转移撤回按键
|
||||||
|
:return:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
@@ -189,9 +222,3 @@ class CAMWorkOrderProgramKnifePlan(models.Model):
|
|||||||
applicant = fields.Char(string='申请人')
|
applicant = fields.Char(string='申请人')
|
||||||
reason_for_applying = fields.Char(string='申请原因')
|
reason_for_applying = fields.Char(string='申请原因')
|
||||||
remark = fields.Char(string='备注说明')
|
remark = fields.Char(string='备注说明')
|
||||||
|
|
||||||
# todo
|
|
||||||
def tool_loading_apply(self):
|
|
||||||
"""
|
|
||||||
装刀申请(按键)
|
|
||||||
"""
|
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ access_sf_machine_table_tool_changing_apply,sf.machine.table.tool.changing.apply
|
|||||||
|
|
||||||
|
|
||||||
access_sf_tool_change_requirement_information,sf.tool.change.requirement.information,model_sf_tool_change_requirement_information,base.group_user,1,1,1,1
|
access_sf_tool_change_requirement_information,sf.tool.change.requirement.information,model_sf_tool_change_requirement_information,base.group_user,1,1,1,1
|
||||||
|
access_sf_tool_transfer_request_information,sf.tool.transfer.request.information,model_sf_tool_transfer_request_information,base.group_user,1,1,1,1
|
||||||
|
access_sf_apply_for_tooling,sf.apply.for.tooling,model_sf_apply_for_tooling,base.group_user,1,1,1,1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
|
@@ -143,46 +143,6 @@
|
|||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
||||||
<!--================================================CAM工单程序用刀计划================================================-->
|
|
||||||
<record id="sf_CAM_work_order_program_knife_plan_tree" model="ir.ui.view">
|
|
||||||
<field name="name">CAM工单程序用刀计划</field>
|
|
||||||
<field name="model">sf.cam.work.order.program.knife.plan</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<tree>
|
|
||||||
<field name="ticket_task_code"/>
|
|
||||||
<field name="cam_procedure_code"/>
|
|
||||||
<field name="cam_cutter_spacing_code"/>
|
|
||||||
<field name="functional_tool_code"/>
|
|
||||||
<field name="functional_tool_name"/>
|
|
||||||
<field name="functional_tool_type"/>
|
|
||||||
<field name="machine_table_name"/>
|
|
||||||
<field name="machine_tool_cutter_spacing_code"/>
|
|
||||||
<field name="diameter"/>
|
|
||||||
<field name="tool_loading_length"/>
|
|
||||||
<field name="clearance_length"/>
|
|
||||||
<field name="tool_included_angle"/>
|
|
||||||
<field name="L_D"/>
|
|
||||||
<field name="coarse_middle_thin"/>
|
|
||||||
<field name="required_cutting_time"/>
|
|
||||||
<field name="whether_standard_tool"/>
|
|
||||||
<field name="need_knife_time"/>
|
|
||||||
<field name="plan_execute_status"/>
|
|
||||||
<field name="applicant"/>
|
|
||||||
<field name="reason_for_applying"/>
|
|
||||||
<field name="remark"/>
|
|
||||||
<button string="装刀申请" name="tool_loading_apply"/>
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="sf_cam_work_order_program_knife_plan_view_act" model="ir.actions.act_window">
|
|
||||||
<field name="name">CAM工单程序用刀计划</field>
|
|
||||||
<field name="type">ir.actions.act_window</field>
|
|
||||||
<field name="res_model">sf.cam.work.order.program.knife.plan</field>
|
|
||||||
<field name="view_mode">tree,form</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
<!--================================================机床换刀申请================================================-->
|
<!--================================================机床换刀申请================================================-->
|
||||||
<record id="sf_machine_table_tool_changing_apply_tree" model="ir.ui.view">
|
<record id="sf_machine_table_tool_changing_apply_tree" model="ir.ui.view">
|
||||||
<field name="name">机床换刀申请</field>
|
<field name="name">机床换刀申请</field>
|
||||||
@@ -215,8 +175,23 @@
|
|||||||
'default_replacement_tool_name': functional_tool_name,
|
'default_replacement_tool_name': functional_tool_name,
|
||||||
'default_replacement_tool_type': functional_tool_type,
|
'default_replacement_tool_type': functional_tool_type,
|
||||||
'default_replacement_tool_coarse_middle_thin': coarse_middle_thin}"
|
'default_replacement_tool_coarse_middle_thin': coarse_middle_thin}"
|
||||||
attrs="{'invisible': [('functional_tool_status', '=', '正常')]}"/>
|
attrs="{'invisible': [('functional_tool_status', '=', '正常')]}"
|
||||||
<button string="转移" name="transfer"/>
|
/>
|
||||||
|
<button string="换刀申请" name="" attrs="{'invisible': [('functional_tool_status', '=', '异常')]}"/>
|
||||||
|
|
||||||
|
<button string="转移"
|
||||||
|
name="%(sf_tool_management.sf_tool_transfer_request_information_act)d"
|
||||||
|
type="action"
|
||||||
|
context="{ 'default_CNC_machine_table':CNC_machine_table,
|
||||||
|
'default_machine_tool_code': machine_tool_code,
|
||||||
|
'default_cutter_spacing_code': cutter_spacing_code,
|
||||||
|
'default_functional_tool_code': functional_tool_code,
|
||||||
|
'default_functional_tool_name': functional_tool_name,
|
||||||
|
'default_functional_tool_type': functional_tool_type}"
|
||||||
|
/>
|
||||||
|
<button string="撤回" name="revocation_1"/>
|
||||||
|
<button string="撤回" name="revocation_2"/>
|
||||||
|
<button string="撤回" name=""/>
|
||||||
|
|
||||||
<field name="replacement_tool_code"/>
|
<field name="replacement_tool_code"/>
|
||||||
<field name="replacement_tool_name"/>
|
<field name="replacement_tool_name"/>
|
||||||
@@ -233,8 +208,6 @@
|
|||||||
|
|
||||||
<!-- <record id="sf_machine_table_tool_changing_apply_search" model="ir.ui.view">-->
|
<!-- <record id="sf_machine_table_tool_changing_apply_search" model="ir.ui.view">-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<record id="sf_machine_table_tool_changing_apply_view_act" model="ir.actions.act_window">
|
<record id="sf_machine_table_tool_changing_apply_view_act" model="ir.actions.act_window">
|
||||||
<field name="name">机床换刀申请</field>
|
<field name="name">机床换刀申请</field>
|
||||||
<field name="type">ir.actions.act_window</field>
|
<field name="type">ir.actions.act_window</field>
|
||||||
@@ -243,6 +216,69 @@
|
|||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
||||||
|
<!--================================================CAM工单程序用刀计划================================================-->
|
||||||
|
<record id="sf_CAM_work_order_program_knife_plan_tree" model="ir.ui.view">
|
||||||
|
<field name="name">CAM工单程序用刀计划</field>
|
||||||
|
<field name="model">sf.cam.work.order.program.knife.plan</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<tree>
|
||||||
|
<field name="ticket_task_code"/>
|
||||||
|
<field name="cam_procedure_code"/>
|
||||||
|
<field name="cam_cutter_spacing_code"/>
|
||||||
|
<field name="functional_tool_code"/>
|
||||||
|
<field name="functional_tool_name"/>
|
||||||
|
<field name="functional_tool_type"/>
|
||||||
|
<field name="machine_table_name"/>
|
||||||
|
<field name="machine_tool_cutter_spacing_code"/>
|
||||||
|
<field name="diameter"/>
|
||||||
|
<field name="tool_loading_length"/>
|
||||||
|
<field name="clearance_length"/>
|
||||||
|
<field name="tool_included_angle"/>
|
||||||
|
<field name="L_D"/>
|
||||||
|
<field name="coarse_middle_thin"/>
|
||||||
|
<field name="required_cutting_time"/>
|
||||||
|
<field name="whether_standard_tool"/>
|
||||||
|
<field name="need_knife_time"/>
|
||||||
|
<field name="plan_execute_status"/>
|
||||||
|
<field name="applicant"/>
|
||||||
|
<field name="reason_for_applying"/>
|
||||||
|
<field name="remark"/>
|
||||||
|
<button string="装刀申请"
|
||||||
|
name="%(sf_tool_management.sf_apply_for_tooling_act)d"
|
||||||
|
type="action"
|
||||||
|
context="{ 'default_ticket_task_code':ticket_task_code,
|
||||||
|
'default_cam_procedure_code': cam_procedure_code,
|
||||||
|
'default_machine_table_name': machine_table_name,
|
||||||
|
'default_cam_cutter_spacing_code': cam_cutter_spacing_code,
|
||||||
|
'default_functional_tool_code': functional_tool_code,
|
||||||
|
'default_functional_tool_name': functional_tool_name,
|
||||||
|
'default_functional_tool_type': functional_tool_type,
|
||||||
|
'default_diameter': diameter,
|
||||||
|
'default_tool_loading_length': tool_loading_length,
|
||||||
|
'default_clearance_length': clearance_length,
|
||||||
|
'default_tool_included_angle': tool_included_angle,
|
||||||
|
'default_L_D': L_D,
|
||||||
|
'default_coarse_middle_thin': coarse_middle_thin,
|
||||||
|
'default_whether_standard_tool': whether_standard_tool,
|
||||||
|
'default_need_knife_time': need_knife_time,
|
||||||
|
'default_required_cutting_time': required_cutting_time,
|
||||||
|
'default_reason_for_applying': reason_for_applying}"
|
||||||
|
/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="sf_cam_work_order_program_knife_plan_view_act" model="ir.actions.act_window">
|
||||||
|
<field name="name">CAM工单程序用刀计划</field>
|
||||||
|
<field name="type">ir.actions.act_window</field>
|
||||||
|
<field name="res_model">sf.cam.work.order.program.knife.plan</field>
|
||||||
|
<field name="view_mode">tree,form</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</data>
|
</data>
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -22,14 +22,102 @@ class ToolChangeRequirementInformation(models.TransientModel):
|
|||||||
reason_for_applying = fields.Char(string='申请原因')
|
reason_for_applying = fields.Char(string='申请原因')
|
||||||
remark = fields.Char(string='备注说明')
|
remark = fields.Char(string='备注说明')
|
||||||
|
|
||||||
# todo 未完成
|
|
||||||
def tool_changing_apply(self):
|
def tool_changing_apply(self):
|
||||||
"""
|
"""
|
||||||
确认换刀申请(按键)
|
确认换刀申请(按键)
|
||||||
|
:return:
|
||||||
"""
|
"""
|
||||||
|
# 封装数据
|
||||||
|
desc = {
|
||||||
|
'CNC_machine_table': self.CNC_machine_table,
|
||||||
|
'machine_tool_code': self.machine_tool_code,
|
||||||
|
'cutter_spacing_code': self.cutter_spacing_code,
|
||||||
|
'replacement_tool_code': self.replacement_tool_code,
|
||||||
|
'replacement_tool_name': self.replacement_tool_name,
|
||||||
|
'replacement_tool_type': self.replacement_tool_type,
|
||||||
|
'replacement_tool_coarse_middle_thin': self.replacement_tool_coarse_middle_thin,
|
||||||
|
'new_former': self.new_former,
|
||||||
|
'applicant': self.applicant,
|
||||||
|
'used_tool_time': self.used_tool_time,
|
||||||
|
'reason_for_applying': self.reason_for_applying,
|
||||||
|
'remark': self.new_former
|
||||||
|
}
|
||||||
# 将数据更新到换刀申请
|
# 将数据更新到换刀申请
|
||||||
self.tool_change_to_apply_id.write({'replacement_tool_name': self.replacement_tool_name})
|
self.env['sf.machine.table.tool.changing.apply'].amendant_record(desc)
|
||||||
self.env.cr.commit()
|
|
||||||
|
# todo 功能刀具组装创建新任务
|
||||||
|
|
||||||
# 关闭弹出窗口
|
# 关闭弹出窗口
|
||||||
return {'type': 'ir.actions.act_window_close'}
|
return {'type': 'ir.actions.act_window_close'}
|
||||||
|
|
||||||
|
|
||||||
|
class ToolTransferRequestInformation(models.TransientModel):
|
||||||
|
_name = 'sf.tool.transfer.request.information'
|
||||||
|
_description = '刀具转移申请信息'
|
||||||
|
|
||||||
|
CNC_machine_table = fields.Char(string='CNC机床', readonly=True)
|
||||||
|
machine_tool_code = fields.Char(string='机台号', readonly=True)
|
||||||
|
cutter_spacing_code = fields.Char(string='刀位号', readonly=True)
|
||||||
|
functional_tool_code = fields.Char(string='功能刀具编码', readonly=True)
|
||||||
|
functional_tool_name = fields.Char(string='功能刀具名称', readonly=True)
|
||||||
|
# todo 功能刀具类型为 Many2one
|
||||||
|
functional_tool_type = fields.Char(string='功能刀具类型', readonly=True)
|
||||||
|
transfer_target = fields.Selection([('机台', '机台'),
|
||||||
|
('线边刀库', '线边刀库'),
|
||||||
|
('刀具房', '刀具房')], string='转移到:', default='线边刀库')
|
||||||
|
|
||||||
|
new_cnc_machine_table = fields.Char(string='机床名称')
|
||||||
|
new_machine_tool_code = fields.Char(string='机床号')
|
||||||
|
new_cutter_spacing_code = fields.Char(string='刀位号')
|
||||||
|
|
||||||
|
magazine_tool_warehouse_district = fields.Char(string='库区')
|
||||||
|
magazine_tool_warehouse_position = fields.Char(string='库位')
|
||||||
|
|
||||||
|
tool_room_warehouse_district = fields.Char(string='库区')
|
||||||
|
tool_room_warehouse_position = fields.Char(string='库位')
|
||||||
|
|
||||||
|
def tool_transfer_apply(self):
|
||||||
|
"""
|
||||||
|
刀具转移申请信息确定按钮
|
||||||
|
:return:
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
class ApplyForTooling(models.TransientModel):
|
||||||
|
_name = 'sf.apply.for.tooling'
|
||||||
|
_description = '申请装刀'
|
||||||
|
|
||||||
|
ticket_task_code = fields.Char(string='工单任务编号', readonly=True)
|
||||||
|
cam_procedure_code = fields.Char(string='CAM程序编号', readonly=True)
|
||||||
|
machine_table_name = fields.Char(string='机床名称', readonly=True)
|
||||||
|
cam_cutter_spacing_code = fields.Char(string='CAM刀位号', readonly=True)
|
||||||
|
functional_tool_code = fields.Char(string='功能刀具编码', readonly=True)
|
||||||
|
functional_tool_name = fields.Char(string='功能刀具名称', readonly=True)
|
||||||
|
functional_tool_type = fields.Char(string='功能刀具类型', readonly=True)
|
||||||
|
|
||||||
|
diameter = fields.Char(string='直径(程式)', readonly=True)
|
||||||
|
tool_loading_length = fields.Char(string='装刀长', readonly=True)
|
||||||
|
clearance_length = fields.Char(string='避空长', readonly=True)
|
||||||
|
tool_included_angle = fields.Char(string='刀尖角(R角)', readonly=True)
|
||||||
|
L_D = fields.Char(string='L/D', readonly=True)
|
||||||
|
coarse_middle_thin = fields.Selection([("1", "粗"), ('2', '中'), ('3', '精')], string='粗/中/精', readonly=True)
|
||||||
|
|
||||||
|
whether_standard_tool = fields.Boolean(string='是否标准刀', readonly=True)
|
||||||
|
need_knife_time = fields.Datetime(string='需要用刀时间', readonly=True)
|
||||||
|
required_cutting_time = fields.Char(string='需要切割时间', readonly=True)
|
||||||
|
reason_for_applying = fields.Char(string='申请原因', readonly=True)
|
||||||
|
|
||||||
|
def apply_for_tooling(self):
|
||||||
|
"""
|
||||||
|
|
||||||
|
:return:
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<odoo>
|
<odoo>
|
||||||
|
<!--================================================换刀需求信息================================================-->
|
||||||
<record id="sf_tool_change_requirement_information_form" model="ir.ui.view">
|
<record id="sf_tool_change_requirement_information_form" model="ir.ui.view">
|
||||||
<field name="name">换刀需求信息</field>
|
<field name="name">换刀需求信息</field>
|
||||||
<field name="model">sf.tool.change.requirement.information</field>
|
<field name="model">sf.tool.change.requirement.information</field>
|
||||||
@@ -54,4 +55,126 @@
|
|||||||
<field name="target">new</field>
|
<field name="target">new</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
||||||
|
<!--================================================刀具转移申请信息================================================-->
|
||||||
|
<record id="sf_tool_transfer_request_information_form" model="ir.ui.view">
|
||||||
|
<field name="name">刀具转移申请信息</field>
|
||||||
|
<field name="model">sf.tool.transfer.request.information</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form string="刀具转移申请信息">
|
||||||
|
<sheet>
|
||||||
|
<group>
|
||||||
|
<group>
|
||||||
|
<group>
|
||||||
|
<field name="CNC_machine_table"/>
|
||||||
|
<field name="functional_tool_code" string="刀具编码"/>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="machine_tool_code"/>
|
||||||
|
<field name="functional_tool_name" string="刀具名称"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="cutter_spacing_code"/>
|
||||||
|
<field name="functional_tool_type" string="刀具类型"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<group>
|
||||||
|
<field name="transfer_target" widget="radio"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<group>
|
||||||
|
<group>
|
||||||
|
<field name="new_cnc_machine_table" attrs="{'readonly': [('transfer_target', '!=', '机台')]}"/>
|
||||||
|
<field name="new_machine_tool_code" attrs="{'readonly': [('transfer_target', '!=', '机台')]}"/>
|
||||||
|
<field name="new_cutter_spacing_code" attrs="{'readonly': [('transfer_target', '!=', '机台')]}"/>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="magazine_tool_warehouse_district" attrs="{'readonly': [('transfer_target', '!=', '线边刀库')]}"/>
|
||||||
|
<field name="magazine_tool_warehouse_position" attrs="{'readonly': [('transfer_target', '!=', '线边刀库')]}"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="tool_room_warehouse_district" attrs="{'readonly': [('transfer_target', '!=', '刀具房')]}"/>
|
||||||
|
<field name="tool_room_warehouse_position" attrs="{'invisible': [('transfer_target', '!=', '刀具房')]}"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
</sheet>
|
||||||
|
<footer>
|
||||||
|
<button string="确定" name="tool_transfer_apply" type="object" class="btn-primary" confirm="是否确认刀具转移申请"/>
|
||||||
|
<button string="取消" class="btn-secondary" special="cancel"/>
|
||||||
|
</footer>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="sf_tool_transfer_request_information_act" model="ir.actions.act_window">
|
||||||
|
<field name="name">刀具转移申请信息</field>
|
||||||
|
<field name="type">ir.actions.act_window</field>
|
||||||
|
<field name="res_model">sf.tool.transfer.request.information</field>
|
||||||
|
<field name="view_mode">form</field>
|
||||||
|
<field name="view_id" ref="sf_tool_transfer_request_information_form"/>
|
||||||
|
<field name="target">new</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
|
||||||
|
<!--================================================申请装刀================================================-->
|
||||||
|
<record id="sf_apply_for_tooling_form" model="ir.ui.view">
|
||||||
|
<field name="name">申请装刀</field>
|
||||||
|
<field name="model">sf.apply.for.tooling</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form string="申请装刀">
|
||||||
|
<sheet>
|
||||||
|
<group>
|
||||||
|
<group>
|
||||||
|
<field name="ticket_task_code" string="工单编号"/>
|
||||||
|
<field name="machine_table_name" string="CAM指定机床"/>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="cam_procedure_code" string="CAM程序编号"/>
|
||||||
|
<field name="cam_cutter_spacing_code" string="CAM指定刀位号"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
|
||||||
|
<group>
|
||||||
|
<group>
|
||||||
|
<group>
|
||||||
|
<field name="diameter" string="直径"/>
|
||||||
|
<field name="tool_included_angle"/>
|
||||||
|
<field name="whether_standard_tool"/>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="tool_loading_length" string="刀尖角"/>
|
||||||
|
<field name="L_D"/>
|
||||||
|
<field name="need_knife_time"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="clearance_length"/>
|
||||||
|
<field name="coarse_middle_thin"/>
|
||||||
|
<field name="required_cutting_time" string="需切削时长"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="reason_for_applying"/>
|
||||||
|
</group>
|
||||||
|
</sheet>
|
||||||
|
<footer>
|
||||||
|
<button string="确定" name="apply_for_tooling" type="object" class="btn-primary" confirm="是否确认申请装刀"/>
|
||||||
|
<button string="取消" class="btn-secondary" special="cancel"/>
|
||||||
|
</footer>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="sf_apply_for_tooling_act" model="ir.actions.act_window">
|
||||||
|
<field name="name">申请装刀</field>
|
||||||
|
<field name="type">ir.actions.act_window</field>
|
||||||
|
<field name="res_model">sf.apply.for.tooling</field>
|
||||||
|
<field name="view_mode">form</field>
|
||||||
|
<field name="view_id" ref="sf_apply_for_tooling_form"/>
|
||||||
|
<field name="target">new</field>
|
||||||
|
</record>
|
||||||
</odoo>
|
</odoo>
|
||||||
Reference in New Issue
Block a user