Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/新增夹具功能
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
|
|
||||||
|
|
||||||
# -*-coding:utf-8-*-
|
# -*-coding:utf-8-*-
|
||||||
from . import models
|
from . import models
|
||||||
from . import wizard
|
from . import wizard
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||||
{
|
{
|
||||||
@@ -13,13 +12,14 @@
|
|||||||
'website': 'https://www.sf.jikimo.com',
|
'website': 'https://www.sf.jikimo.com',
|
||||||
'depends': ['account', 'sf_base', 'mrp'],
|
'depends': ['account', 'sf_base', 'mrp'],
|
||||||
'data': [
|
'data': [
|
||||||
'security/group_security.xml',
|
#'security/group_security.xml',
|
||||||
'security/ir.model.access.csv',
|
'security/ir.model.access.csv',
|
||||||
# 'views/tool_base_views.xml',
|
# 'views/tool_base_views.xml',
|
||||||
# # 'views/menu_view.xml',
|
# # 'views/menu_view.xml',
|
||||||
'wizard/wizard_view.xml',
|
'wizard/wizard_view.xml',
|
||||||
'views/tool_base_views.xml',
|
'views/tool_base_views.xml',
|
||||||
'views/menu_view.xml',
|
'views/menu_view.xml',
|
||||||
|
'views/tool_material_search.xml',
|
||||||
],
|
],
|
||||||
'demo': [
|
'demo': [
|
||||||
],
|
],
|
||||||
|
|||||||
3
sf_tool_management/models/__init__.py
Normal file
3
sf_tool_management/models/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
from . import base
|
||||||
|
from . import tool_material_search
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from odoo import fields, models, api
|
||||||
|
|
||||||
|
|
||||||
class FunctionalCuttingToolEntity(models.Model):
|
class FunctionalCuttingToolEntity(models.Model):
|
||||||
@@ -148,7 +148,7 @@ class MachineTableToolChangingApply(models.Model):
|
|||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
# 更新数据到机台换刀申请界面
|
# 更新数据到机台换刀申请界面
|
||||||
# todo 换刀申请条件需补充完善
|
# todo 自动换刀申请条件需补充完善
|
||||||
if(self.functional_tool_status == '异常'):
|
if(self.functional_tool_status == '异常'):
|
||||||
self.env['sf.machine.table.tool.changing.apply'].search([
|
self.env['sf.machine.table.tool.changing.apply'].search([
|
||||||
('CNC_machine_table', '=', self.CNC_machine_table)]).write({
|
('CNC_machine_table', '=', self.CNC_machine_table)]).write({
|
||||||
@@ -157,9 +157,9 @@ class MachineTableToolChangingApply(models.Model):
|
|||||||
'replacement_tool_type': self.functional_tool_type,
|
'replacement_tool_type': self.functional_tool_type,
|
||||||
'replacement_tool_coarse_middle_thin': self.coarse_middle_thin,
|
'replacement_tool_coarse_middle_thin': self.coarse_middle_thin,
|
||||||
'new_former': '0',
|
'new_former': '0',
|
||||||
'applicant': None,
|
'applicant': '自动申请',
|
||||||
'used_tool_time': fields.Datetime.now(),
|
'used_tool_time': fields.Datetime.now(),
|
||||||
'reason_for_applying': None,
|
'reason_for_applying': '功能刀具状态异常',
|
||||||
'remark': None,
|
'remark': None,
|
||||||
'status': '1'
|
'status': '1'
|
||||||
})
|
})
|
||||||
@@ -171,12 +171,12 @@ class MachineTableToolChangingApply(models.Model):
|
|||||||
'functional_tool_type': self.functional_tool_type,
|
'functional_tool_type': self.functional_tool_type,
|
||||||
'functional_tool_diameter': self.diameter,
|
'functional_tool_diameter': self.diameter,
|
||||||
'loading_task_source': '1',
|
'loading_task_source': '1',
|
||||||
'applicant': self.applicant,
|
'applicant': '自动申请',
|
||||||
'reason_for_applying': self.reason_for_applying,
|
'reason_for_applying': '功能刀具状态异常',
|
||||||
'use_tool_time': self.used_tool_time,
|
'use_tool_time': self.used_tool_time,
|
||||||
'machine_tool_name': self.CNC_machine_table,
|
'machine_tool_name': self.CNC_machine_table,
|
||||||
'machine_tool_code': self.machine_tool_code,
|
'machine_tool_code': self.machine_tool_code,
|
||||||
'cutter_spacing_code': self.cutter_spacing_code
|
'cutter_spacing_code': self.cutter_spacing_code,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
@@ -187,12 +187,10 @@ class MachineTableToolChangingApply(models.Model):
|
|||||||
:param vals:
|
:param vals:
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
# todo 增加设置直径的值
|
# 增加设置直径的值
|
||||||
# tool_changing_apply = self.env['sf.machine.table.tool.changing.apply'].search(
|
tool_changing_apply = self.env['sf.machine.table.tool.changing.apply'].search(
|
||||||
# [('CNC_machine_table', '=', vals.get('CNC_machine_table'))])
|
[('CNC_machine_table', '=', vals['machine_tool_name'])])
|
||||||
# for i in tool_changing_apply:
|
vals['functional_tool_diameter'] = tool_changing_apply.diameter
|
||||||
# print(i)
|
|
||||||
# vals['functional_tool_diameter'] = self.diameter
|
|
||||||
|
|
||||||
self.env['sf.functional.tool.assembly'].create(vals)
|
self.env['sf.functional.tool.assembly'].create(vals)
|
||||||
|
|
||||||
@@ -253,7 +251,7 @@ class CAMWorkOrderProgramKnifePlan(models.Model):
|
|||||||
required_cutting_time = fields.Char(string='需要切割时间')
|
required_cutting_time = fields.Char(string='需要切割时间')
|
||||||
whether_standard_tool = fields.Boolean(string='是否标准刀')
|
whether_standard_tool = fields.Boolean(string='是否标准刀')
|
||||||
need_knife_time = fields.Datetime(string='需要用刀时间')
|
need_knife_time = fields.Datetime(string='需要用刀时间')
|
||||||
plan_execute_status = fields.Selection([('0', '待下发'), ('1', '执行中'), ('2', '已完成')], string='计划执行状态')
|
plan_execute_status = fields.Selection([('0', '待下发'), ('1', '执行中'), ('2', '已完成')], string='计划执行状态', default='0')
|
||||||
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='备注说明')
|
||||||
@@ -342,7 +340,13 @@ class FunctionalToolAssembly(models.Model):
|
|||||||
receive_time = fields.Datetime(string='领用出库时间')
|
receive_time = fields.Datetime(string='领用出库时间')
|
||||||
remark = fields.Char(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):
|
def cancel_functional_tool_assembly(self):
|
||||||
"""
|
"""
|
||||||
@@ -366,7 +370,9 @@ class FunctionalToolAssembly(models.Model):
|
|||||||
'cut_time': None,
|
'cut_time': None,
|
||||||
'cut_length': None,
|
'cut_length': None,
|
||||||
'cut_number': None,
|
'cut_number': None,
|
||||||
'assemble_status': '0'
|
'assemble_status': '0',
|
||||||
|
'tool_loading_person':None,
|
||||||
|
'tool_loading_time':None
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
@@ -377,7 +383,7 @@ class FunctionalToolAssembly(models.Model):
|
|||||||
"""
|
"""
|
||||||
self.env['sf.delivery.of.cargo.from.storage'].search([]).unlink()
|
self.env['sf.delivery.of.cargo.from.storage'].search([]).unlink()
|
||||||
|
|
||||||
vals = self.env['sf.functional.tool.assembly'].search([('check_box', '=', True),('assemble_status', '=', '1')])
|
vals = self.env['sf.functional.tool.assembly'].search([('check_box_1', '=', True),('assemble_status', '=', '1')])
|
||||||
|
|
||||||
if vals:
|
if vals:
|
||||||
for val in vals:
|
for val in vals:
|
||||||
|
|||||||
179
sf_tool_management/models/tool_material_search.py
Normal file
179
sf_tool_management/models/tool_material_search.py
Normal file
@@ -0,0 +1,179 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from odoo import fields, models, api
|
||||||
|
|
||||||
|
|
||||||
|
# 刀具物料搜索
|
||||||
|
class SfToolMaterialSearch(models.Model):
|
||||||
|
_name = 'sf.tool.material.search'
|
||||||
|
_description = '刀具物料搜索'
|
||||||
|
|
||||||
|
sequence = fields.Integer('序号')
|
||||||
|
code = fields.Char('编码')
|
||||||
|
name = fields.Char('名称')
|
||||||
|
# 关联刀具类型
|
||||||
|
mrs_cutting_tool_type_id = fields.Many2one(
|
||||||
|
'sf.cutting.tool.type', '刀具类型',
|
||||||
|
domain="[('mrs_cutting_tool_material_id.name', '=', mrs_cutting_tool_material_name)]")
|
||||||
|
mrs_machine_brand_id = fields.Many2one('sf.machine.brand', '品牌')
|
||||||
|
# 关联刀具型号
|
||||||
|
mrs_cutting_tool_model_id = fields.Many2one('sf.cutting.tool.model', '刀具型号')
|
||||||
|
|
||||||
|
# 关联刀具物料模型
|
||||||
|
mrs_cutting_tool_material_id = fields.Many2one('sf.cutting.tool.material', '刀具物料')
|
||||||
|
|
||||||
|
# 刀片特有字段
|
||||||
|
blade_code = fields.Char('刀片编码')
|
||||||
|
blade_length = fields.Float('长度L(mm)')
|
||||||
|
blade_width = fields.Float('宽度D(mm)')
|
||||||
|
blade_height = fields.Float('高度T(mm)')
|
||||||
|
blade_top_angle = fields.Float('顶角(°)')
|
||||||
|
blade_front_angle = fields.Float('前角(°)')
|
||||||
|
blade_rear_angle = fields.Float('后角(°)')
|
||||||
|
blade_main_included_angle = fields.Float('主偏角(°)')
|
||||||
|
blade_r_angle = fields.Float('R角(°)')
|
||||||
|
blade_hardness = fields.Char('加工硬度')
|
||||||
|
blade_accuracy = fields.Char('精度等级')
|
||||||
|
blade_coating_material_id = fields.Char('涂层材质')
|
||||||
|
blade_radius = fields.Float('刀尖半径(mm)')
|
||||||
|
blade_nut = fields.Float('配对螺母(mm)')
|
||||||
|
mrs_cutting_tool_model_blade_cutter_bar_ids = fields.Many2many(
|
||||||
|
'sf.cutting.tool.model',
|
||||||
|
relation='sf_tool_material_search_blade_cutter_bar_rel',
|
||||||
|
column1='model_id_1',
|
||||||
|
column2='model_id_2',
|
||||||
|
domain="[('mrs_cutting_tool_material_id.name', '=', '刀杆')]",
|
||||||
|
string='适用刀杆型号',
|
||||||
|
default=lambda self: [], # 使用空列表作为默认值
|
||||||
|
)
|
||||||
|
mrs_cutting_tool_model_blade_cutter_pad_ids = fields.Many2many(
|
||||||
|
'sf.cutting.tool.model',
|
||||||
|
relation='sf_tool_material_search_blade_cutter_pad_rel',
|
||||||
|
column1='model_id_1',
|
||||||
|
column2='model_id_2',
|
||||||
|
domain="[('mrs_cutting_tool_material_id.name', '=', '刀盘')]",
|
||||||
|
string='适用刀盘型号',
|
||||||
|
default=lambda self: [], # 使用空列表作为默认值
|
||||||
|
)
|
||||||
|
|
||||||
|
# 整体式刀具特有字段
|
||||||
|
integral_code = fields.Char('整体式刀具编码', readonly=True)
|
||||||
|
integral_total_length = fields.Float('总长度(mm)')
|
||||||
|
integral_shank_length = fields.Float('柄部长度(mm)')
|
||||||
|
integral_blade_length = fields.Float('刃部长度(mm)')
|
||||||
|
integral_diameter = fields.Float('直径(mm)')
|
||||||
|
integral_blade_number = fields.Integer('刃数')
|
||||||
|
integral_front_angle = fields.Float('前角(°)')
|
||||||
|
integral_rear_angle = fields.Float('后角(°)')
|
||||||
|
integral_main_included_angle = fields.Float('主偏角(°)')
|
||||||
|
integral_accuracy = fields.Float('精度等级')
|
||||||
|
integral_hardness = fields.Float('加工硬度(HRC)')
|
||||||
|
integral_coating_material = fields.Char('涂层材质')
|
||||||
|
integral_nut = fields.Float('配对螺母(mm)')
|
||||||
|
integral_scope = fields.Char('适用范围')
|
||||||
|
|
||||||
|
# 刀杆特有字段
|
||||||
|
bar_code = fields.Char('刀杆编码', readonly=True)
|
||||||
|
# bar_name = fields.Char('刀杆名称', required=True)
|
||||||
|
bar_c_diameter = fields.Float('C柄径(mm)')
|
||||||
|
bar_total_length = fields.Float('L总长(mm)')
|
||||||
|
bar_blade_number = fields.Integer('刃数')
|
||||||
|
bar_d_diameter = fields.Float('D刃径(mm)')
|
||||||
|
mrs_cutting_tool_model_bar_blade_ids = fields.Many2many(
|
||||||
|
'sf.cutting.tool.model',
|
||||||
|
relation='sf_tool_material_search_bar_blade_rel',
|
||||||
|
column1='model_id_1',
|
||||||
|
column2='model_id_2',
|
||||||
|
domain="[('mrs_cutting_tool_material_id.name', '=', '刀片')]",
|
||||||
|
string='适用刀片型号'
|
||||||
|
)
|
||||||
|
bar_wrench = fields.Float('配对扳手(mm)')
|
||||||
|
bar_screw = fields.Float('配备螺丝(mm)')
|
||||||
|
bar_radius = fields.Float('刀尖圆角半径')
|
||||||
|
bar_accuracy = fields.Char('精度等级')
|
||||||
|
bar_hardness = fields.Char('硬度(°)')
|
||||||
|
bar_scope = fields.Char('适用范围')
|
||||||
|
|
||||||
|
# 刀盘特有字段
|
||||||
|
pad_code = fields.Char('刀盘编码', readonly=True)
|
||||||
|
# pad_name = fields.Char('刀盘名称', required=True)
|
||||||
|
pad_c_diameter = fields.Float('C柄径(mm)')
|
||||||
|
pad_total_length = fields.Float('L总长(mm)')
|
||||||
|
pad_blade_number = fields.Integer('刃数')
|
||||||
|
pad_d_diameter = fields.Float('D刃径(mm)')
|
||||||
|
mrs_cutting_tool_model_pad_blade_ids = fields.Many2many(
|
||||||
|
'sf.cutting.tool.model',
|
||||||
|
relation='sf_tool_material_search_pad_blade_rel',
|
||||||
|
column1='model_id_1',
|
||||||
|
column2='model_id_2',
|
||||||
|
domain="[('mrs_cutting_tool_material_id.name', '=', '刀片')]",
|
||||||
|
string='适用刀片型号'
|
||||||
|
)
|
||||||
|
pad_wrench = fields.Float('配对扳手(mm)')
|
||||||
|
pad_screw = fields.Float('配备螺丝(mm)')
|
||||||
|
pad_radius = fields.Float('刀尖圆角半径')
|
||||||
|
pad_accuracy = fields.Char('精度等级')
|
||||||
|
pad_hardness = fields.Char('硬度(°)')
|
||||||
|
pad_scope = fields.Char('适用范围')
|
||||||
|
|
||||||
|
# 刀柄特有字段
|
||||||
|
handle_code = fields.Char('刀柄编码', readonly=True)
|
||||||
|
# 柄长L(mm)、法兰柄长L1(mm)、法兰直径D1(mm)
|
||||||
|
handle_length = fields.Float('柄长L(mm)')
|
||||||
|
handle_diameter = fields.Float('直径D(mm)')
|
||||||
|
handle_flange_length = fields.Float('法兰柄长L1(mm)')
|
||||||
|
handle_flange_diameter = fields.Float('法兰直径D1(mm)')
|
||||||
|
# 夹持直径min、夹持直径max、径跳精度、最大转速n/min、3D模型图
|
||||||
|
handle_clamping_diameter_min = fields.Float('夹持直径min')
|
||||||
|
handle_clamping_diameter_max = fields.Float('夹持直径max')
|
||||||
|
handle_jump_accuracy = fields.Float('径跳精度')
|
||||||
|
handle_max_speed = fields.Float('最大转速n/min')
|
||||||
|
handle_weight = fields.Float('重量(kg)')
|
||||||
|
handle_body_accuracy = fields.Float('本体精度(mm)')
|
||||||
|
handle_nut = fields.Float('配对螺母(mm)')
|
||||||
|
mrs_cutting_tool_model_handle_chuck_model_ids = fields.Many2many(
|
||||||
|
'sf.cutting.tool.model',
|
||||||
|
relation='sf_tool_material_search_handle_chuck_rel',
|
||||||
|
column1='model_id_1',
|
||||||
|
column2='model_id_2',
|
||||||
|
domain="[('mrs_cutting_tool_material_id.name', '=', '夹头')]",
|
||||||
|
string='适用夹头型号'
|
||||||
|
)
|
||||||
|
handle_clamping_range = fields.Float('夹持范围(mm)')
|
||||||
|
handle_detection_accuracy = fields.Float('检测精度')
|
||||||
|
handle_detection_hardness = fields.Char('检测硬度')
|
||||||
|
handle_standard_speed = fields.Float('标准转速')
|
||||||
|
|
||||||
|
# 夹头特有字段
|
||||||
|
chuck_code = fields.Char('夹头编码', readonly=True)
|
||||||
|
# chuck_name = fields.Char('夹头名称', required=True)
|
||||||
|
chuck_accuracy = fields.Float('精度(mm)')
|
||||||
|
# 夹持直径min、夹持直径max、3D模型图
|
||||||
|
chuck_clamping_diameter_min = fields.Float('夹持直径min')
|
||||||
|
chuck_clamping_diameter_max = fields.Float('夹持直径max')
|
||||||
|
chuck_diameter = fields.Float('外径(mm)')
|
||||||
|
chuck_inner_diameter = fields.Float('内径(mm)')
|
||||||
|
chuck_height = fields.Float('高度(mm)')
|
||||||
|
chuck_nut = fields.Float('配对螺母(mm)')
|
||||||
|
mrs_cutting_tool_model_chuck_handle_model_ids = fields.Many2many(
|
||||||
|
'sf.cutting.tool.model',
|
||||||
|
relation='sf_tool_material_search_chuck_handle_rel',
|
||||||
|
column1='model_id_1',
|
||||||
|
column2='model_id_2',
|
||||||
|
domain="[('mrs_cutting_tool_material_id.name', '=', '刀柄')]",
|
||||||
|
string='适用刀柄型号'
|
||||||
|
)
|
||||||
|
chuck_clamping_range = fields.Float('夹持范围(mm)')
|
||||||
|
chuck_feature = fields.Char('特性')
|
||||||
|
image = fields.Binary('图片')
|
||||||
|
|
||||||
|
# 数量、采购入库日期、采购批次、供应商、仓库名称、库区、库位、3D模型
|
||||||
|
number = fields.Integer('数量')
|
||||||
|
mrs_materials_model_id = fields.Many2one('sf.materials.model', '材料型号')
|
||||||
|
purchase_date = fields.Date('采购入库日期')
|
||||||
|
purchase_batch = fields.Char('采购批次')
|
||||||
|
supplier = fields.Char('供应商')
|
||||||
|
warehouse_name = fields.Char('仓库名称')
|
||||||
|
warehouse_area = fields.Char('库区')
|
||||||
|
warehouse_location = fields.Char('库位')
|
||||||
|
three_d_model = fields.Many2one('ir.attachment', '3D模型')
|
||||||
|
|
||||||
4
sf_tool_management/security/group_security.xml
Normal file
4
sf_tool_management/security/group_security.xml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<odoo>
|
||||||
|
<data>
|
||||||
|
</data>
|
||||||
|
</odoo>
|
||||||
@@ -11,6 +11,7 @@ access_sf_apply_for_tooling,sf.apply.for.tooling,model_sf_apply_for_tooling,base
|
|||||||
access_sf_functional_tool_assembly,sf.functional.tool.assembly,model_sf_functional_tool_assembly,base.group_user,1,1,1,1
|
access_sf_functional_tool_assembly,sf.functional.tool.assembly,model_sf_functional_tool_assembly,base.group_user,1,1,1,1
|
||||||
access_sf_functional_tool_assembly_order,sf.functional.tool.assembly.order,model_sf_functional_tool_assembly_order,base.group_user,1,1,1,1
|
access_sf_functional_tool_assembly_order,sf.functional.tool.assembly.order,model_sf_functional_tool_assembly_order,base.group_user,1,1,1,1
|
||||||
access_sf_delivery_of_cargo_from_storage,sf.delivery.of.cargo.from.storage,model_sf_delivery_of_cargo_from_storage,base.group_user,1,1,1,1
|
access_sf_delivery_of_cargo_from_storage,sf.delivery.of.cargo.from.storage,model_sf_delivery_of_cargo_from_storage,base.group_user,1,1,1,1
|
||||||
|
access_sf_tool_material_search,sf.tool.material.search,model_sf_tool_material_search,base.group_user,1,1,1,1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
<data>
|
||||||
|
|
||||||
<record id="action_sf_functional_cutting_tool_warning" model="ir.actions.act_window">
|
<record id="action_sf_functional_cutting_tool_warning" model="ir.actions.act_window">
|
||||||
<field name="name">功能刀具预警</field>
|
<field name="name">功能刀具预警</field>
|
||||||
|
|||||||
@@ -427,7 +427,7 @@
|
|||||||
|
|
||||||
<button string="组装单打印" name="assemble_single_print" type="object" class="btn-primary"/>
|
<button string="组装单打印" name="assemble_single_print" type="object" class="btn-primary"/>
|
||||||
|
|
||||||
<field name="check_box"/>
|
<field name="check_box_1" attrs="{'readonly': [('assemble_status', '!=', '1')]}"/>
|
||||||
|
|
||||||
<field name="assemble_status"/>
|
<field name="assemble_status"/>
|
||||||
<field name="use_tool_time" />
|
<field name="use_tool_time" />
|
||||||
|
|||||||
148
sf_tool_management/views/tool_material_search.xml
Normal file
148
sf_tool_management/views/tool_material_search.xml
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<odoo>
|
||||||
|
<data>
|
||||||
|
<record id="sf_tool_material_search_tree" model="ir.ui.view">
|
||||||
|
<field name="name">sf.tool.material.search.tree</field>
|
||||||
|
<field name="model">sf.tool.material.search</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<tree string="刀具物料查询">
|
||||||
|
<field name="sequence"/>
|
||||||
|
<field name="code"/>
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="mrs_cutting_tool_type_id"/>
|
||||||
|
<field name="mrs_machine_brand_id"/>
|
||||||
|
<field name="mrs_cutting_tool_model_id"/>
|
||||||
|
<field name="mrs_materials_model_id"/>
|
||||||
|
<field name="mrs_cutting_tool_material_id"/>
|
||||||
|
|
||||||
|
<!-- <field name="blade_code" optional="hide"/> -->
|
||||||
|
<field name="blade_length" optional="hide"/>
|
||||||
|
<field name="blade_width" optional="hide"/>
|
||||||
|
<field name="blade_height" optional="hide"/>
|
||||||
|
<field name="blade_top_angle" optional="hide"/>
|
||||||
|
<field name="blade_front_angle" optional="hide"/>
|
||||||
|
<field name="blade_rear_angle" optional="hide"/>
|
||||||
|
<field name="blade_main_included_angle" optional="hide"/>
|
||||||
|
<field name="blade_r_angle" optional="hide"/>
|
||||||
|
<field name="blade_hardness" optional="hide"/>
|
||||||
|
<field name="blade_accuracy" optional="hide"/>
|
||||||
|
<field name="blade_coating_material_id" optional="hide"/>
|
||||||
|
<field name="blade_radius" optional="hide"/>
|
||||||
|
<field name="blade_nut" optional="hide"/>
|
||||||
|
<field name="mrs_cutting_tool_model_blade_cutter_pad_ids" optional="hide"/>
|
||||||
|
<field name="mrs_cutting_tool_model_blade_cutter_bar_ids" optional="hide"/>
|
||||||
|
|
||||||
|
<!-- <field name="integral_code" readonly="1"/> -->
|
||||||
|
<field name="integral_total_length" optional="hide"/>
|
||||||
|
<field name="integral_shank_length" optional="hide"/>
|
||||||
|
<field name="integral_blade_length" optional="hide"/>
|
||||||
|
<field name="integral_diameter" optional="hide"/>
|
||||||
|
<field name="integral_blade_number" optional="hide"/>
|
||||||
|
<field name="integral_front_angle" optional="hide"/>
|
||||||
|
<field name="integral_rear_angle" optional="hide"/>
|
||||||
|
<field name="integral_main_included_angle" optional="hide"/>
|
||||||
|
<field name="integral_accuracy" optional="hide"/>
|
||||||
|
<field name="integral_hardness" optional="hide"/>
|
||||||
|
<field name="integral_coating_material" optional="hide"/>
|
||||||
|
<field name="integral_nut" optional="hide"/>
|
||||||
|
<field name="integral_scope" optional="hide"/>
|
||||||
|
|
||||||
|
<!-- <field name="bar_code" readonly="1"/> -->
|
||||||
|
<field name="bar_c_diameter" optional="hide"/>
|
||||||
|
<field name="bar_total_length" optional="hide"/>
|
||||||
|
<field name="bar_blade_number" optional="hide"/>
|
||||||
|
<field name="bar_d_diameter" optional="hide"/>
|
||||||
|
<field name="mrs_cutting_tool_model_bar_blade_ids" widget="many2many_tags" optional="hide"/>
|
||||||
|
<field name="bar_wrench" optional="hide"/>
|
||||||
|
<field name="bar_screw" optional="hide"/>
|
||||||
|
<field name="bar_radius" optional="hide"/>
|
||||||
|
<field name="bar_accuracy" optional="hide"/>
|
||||||
|
<field name="bar_hardness" optional="hide"/>
|
||||||
|
<field name="bar_scope" optional="hide"/>
|
||||||
|
|
||||||
|
<!-- <field name="pad_code" readonly="1"/> -->
|
||||||
|
<field name="pad_c_diameter" optional="hide"/>
|
||||||
|
<field name="pad_total_length" optional="hide"/>
|
||||||
|
<field name="pad_blade_number" optional="hide"/>
|
||||||
|
<field name="pad_d_diameter" optional="hide"/>
|
||||||
|
<field name="mrs_cutting_tool_model_pad_blade_ids" widget="many2many_tags" optional="hide"/>
|
||||||
|
<field name="pad_wrench" optional="hide"/>
|
||||||
|
<field name="pad_screw" optional="hide"/>
|
||||||
|
<field name="pad_radius" optional="hide"/>
|
||||||
|
<field name="pad_accuracy" optional="hide"/>
|
||||||
|
<field name="pad_hardness" optional="hide"/>
|
||||||
|
<field name="pad_scope" optional="hide"/>
|
||||||
|
|
||||||
|
<!-- <field name="handle_code" readonly="1"/> -->
|
||||||
|
<field name="handle_length" optional="hide"/>
|
||||||
|
<field name="handle_diameter" optional="hide"/>
|
||||||
|
<field name="handle_flange_length" optional="hide"/>
|
||||||
|
<field name="handle_flange_diameter" optional="hide"/>
|
||||||
|
<field name="handle_clamping_diameter_min" optional="hide"/>
|
||||||
|
<field name="handle_clamping_diameter_max" optional="hide"/>
|
||||||
|
<field name="handle_jump_accuracy" optional="hide"/>
|
||||||
|
<field name="handle_max_speed" optional="hide"/>
|
||||||
|
<field name="handle_weight" optional="hide"/>
|
||||||
|
<field name="handle_body_accuracy" optional="hide"/>
|
||||||
|
<field name="handle_nut" optional="hide"/>
|
||||||
|
<field name="mrs_cutting_tool_model_handle_chuck_model_ids" widget="many2many_tags" optional="hide"/>
|
||||||
|
<field name="handle_clamping_range" optional="hide"/>
|
||||||
|
<field name="handle_detection_accuracy" optional="hide"/>
|
||||||
|
<field name="handle_detection_hardness" optional="hide"/>
|
||||||
|
<field name="handle_standard_speed" optional="hide"/>
|
||||||
|
|
||||||
|
<!-- <field name="chuck_code" readonly="1"/> -->
|
||||||
|
<field name="chuck_accuracy" optional="hide"/>
|
||||||
|
<field name="chuck_clamping_diameter_min" optional="hide"/>
|
||||||
|
<field name="chuck_clamping_diameter_max" optional="hide"/>
|
||||||
|
<field name="chuck_diameter" optional="hide"/>
|
||||||
|
<field name="chuck_inner_diameter" optional="hide"/>
|
||||||
|
<field name="chuck_height" optional="hide"/>
|
||||||
|
<field name="chuck_nut" optional="hide"/>
|
||||||
|
<field name="mrs_cutting_tool_model_chuck_handle_model_ids" widget="many2many_tags" optional="hide"/>
|
||||||
|
<field name="chuck_clamping_range" optional="hide"/>
|
||||||
|
<field name="chuck_feature" optional="hide"/>
|
||||||
|
<field name="image" widget="image" optional="hide"/>
|
||||||
|
|
||||||
|
<field name="number"/>
|
||||||
|
<field name="mrs_materials_model_id"/>
|
||||||
|
<field name="purchase_date"/>
|
||||||
|
<field name="purchase_batch"/>
|
||||||
|
<field name="supplier"/>
|
||||||
|
<field name="warehouse_name"/>
|
||||||
|
<field name="warehouse_area"/>
|
||||||
|
<field name="warehouse_location"/>
|
||||||
|
<field name="three_d_model" widget="many2one"/>
|
||||||
|
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
<!-- 刀具物料搜索 -->
|
||||||
|
<record id="search_sf_tool_material_search" model="ir.ui.view">
|
||||||
|
<field name="name">sf.tool.material.search.search</field>
|
||||||
|
<field name="model">sf.tool.material.search</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<search string="刀具物料搜索">
|
||||||
|
<field name="name" string="名称搜索" filter_domain="[('name','ilike',self)]"/>
|
||||||
|
<field name="code" string="编码搜索" filter_domain="[('code','ilike',self)]"/>
|
||||||
|
<searchpanel class="account_root" string="刀具物料">
|
||||||
|
<field name="mrs_cutting_tool_material_id" icon="fa-filter"/>
|
||||||
|
</searchpanel>
|
||||||
|
</search>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
<record id="action_sf_tool_material_search" model="ir.actions.act_window">
|
||||||
|
<field name="name">刀具物料查询</field>
|
||||||
|
<field name="type">ir.actions.act_window</field>
|
||||||
|
<field name="res_model">sf.tool.material.search</field>
|
||||||
|
<field name="view_mode">tree,form</field>
|
||||||
|
</record>
|
||||||
|
<menuitem
|
||||||
|
sequence="3"
|
||||||
|
name="刀具物料查询"
|
||||||
|
id="menu_sf_tool_material_search"
|
||||||
|
action="action_sf_tool_material_search"
|
||||||
|
parent="menu_sf_tool_manage"
|
||||||
|
/>
|
||||||
|
</data>
|
||||||
|
</odoo>
|
||||||
@@ -43,6 +43,7 @@ class ToolChangeRequirementInformation(models.TransientModel):
|
|||||||
'remark': self.new_former,
|
'remark': self.new_former,
|
||||||
'status': '1'
|
'status': '1'
|
||||||
}
|
}
|
||||||
|
print('desc:', desc)
|
||||||
# 将数据更新到机台换刀申请界面
|
# 将数据更新到机台换刀申请界面
|
||||||
self.env['sf.machine.table.tool.changing.apply'].search(
|
self.env['sf.machine.table.tool.changing.apply'].search(
|
||||||
[('CNC_machine_table', '=', desc.get('CNC_machine_table'))]).write(desc)
|
[('CNC_machine_table', '=', desc.get('CNC_machine_table'))]).write(desc)
|
||||||
@@ -92,7 +93,7 @@ class ToolTransferRequestInformation(models.TransientModel):
|
|||||||
|
|
||||||
def tool_transfer_apply(self):
|
def tool_transfer_apply(self):
|
||||||
"""
|
"""
|
||||||
刀具转移申请信息确定按钮
|
todo 刀具转移申请信息确定按钮
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
self.env['sf.machine.table.tool.changing.apply'].search(
|
self.env['sf.machine.table.tool.changing.apply'].search(
|
||||||
@@ -245,5 +246,20 @@ class DeliveryOfCargoFromStorage(models.TransientModel):
|
|||||||
('functional_tool_code', '=', val.functional_tool_code),
|
('functional_tool_code', '=', val.functional_tool_code),
|
||||||
('functional_tool_name', '=', val.functional_tool_name)
|
('functional_tool_name', '=', val.functional_tool_name)
|
||||||
]).write({
|
]).write({
|
||||||
'assemble_status': '2'
|
'assemble_status': '2',
|
||||||
|
'receive_person': self.env.user.name,
|
||||||
|
'receive_time': fields.Datetime.now()
|
||||||
|
})
|
||||||
|
|
||||||
|
tool_assembly = self.env['sf.functional.tool.assembly'].search([
|
||||||
|
('functional_tool_code', '=', val.functional_tool_code),
|
||||||
|
('functional_tool_name', '=', val.functional_tool_name)
|
||||||
|
])
|
||||||
|
# 判断装刀任务来源,如果来源于CAM装刀,则修改CAM装刀的计划执行状态
|
||||||
|
if tool_assembly.loading_task_source == '0':
|
||||||
|
self.env['sf.cam.work.order.program.knife.plan'].search([
|
||||||
|
('functional_tool_code', '=', val.functional_tool_code),
|
||||||
|
('functional_tool_name', '=', val.functional_tool_name)
|
||||||
|
]).write({
|
||||||
|
'plan_execute_status': '2'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -281,11 +281,12 @@
|
|||||||
<field name="machine_tool_code"/>
|
<field name="machine_tool_code"/>
|
||||||
<field name="receive_person"/>
|
<field name="receive_person"/>
|
||||||
<field name="receive_time"/>
|
<field name="receive_time"/>
|
||||||
</tree>
|
|
||||||
<footer>
|
|
||||||
<button string="确定" name="stock_removal" type="object" class="btn-primary" />
|
<button string="确定" name="stock_removal" type="object" class="btn-primary" />
|
||||||
<button string="取消" class="btn-secondary" special="cancel"/>
|
<button string="取消" class="btn-secondary" special="cancel"/>
|
||||||
</footer>
|
|
||||||
|
</tree>
|
||||||
|
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user