Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/制造优化
This commit is contained in:
@@ -17,6 +17,7 @@ div:has(.o_required_modifier) > label::before {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.my-image div {
|
.my-image div {
|
||||||
|
|
||||||
width: 110px !important;
|
width: 110px !important;
|
||||||
height: 110px !important;
|
height: 110px !important;
|
||||||
}
|
}
|
||||||
@@ -261,7 +262,7 @@ div[class="o_content o_component_with_search_panel"] .o_kanban_primary_right > .
|
|||||||
|
|
||||||
.test_model > .o_form_label {
|
.test_model > .o_form_label {
|
||||||
margin-left: 4px !important;
|
margin-left: 4px !important;
|
||||||
line-height: 0 !important;
|
//line-height: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 1200px) {
|
@media screen and (min-width: 1200px) {
|
||||||
|
|||||||
@@ -19,8 +19,9 @@
|
|||||||
'views/fixture_view.xml',
|
'views/fixture_view.xml',
|
||||||
'views/functional_fixture_view.xml',
|
'views/functional_fixture_view.xml',
|
||||||
'views/menu_view.xml',
|
'views/menu_view.xml',
|
||||||
"views/tool_views.xml",
|
'views/tool_views.xml',
|
||||||
"views/tool_menu.xml",
|
'views/tool_basic_param.xml',
|
||||||
|
'views/tool_menu.xml',
|
||||||
'views/menu_fixture_view.xml',
|
'views/menu_fixture_view.xml',
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ from . import common
|
|||||||
from . import tool_base_new
|
from . import tool_base_new
|
||||||
from . import fixture
|
from . import fixture
|
||||||
from . import functional_fixture
|
from . import functional_fixture
|
||||||
|
from . import tool_other_features
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ class MrsMaterialModel(models.Model):
|
|||||||
active = fields.Boolean('有效', default=True)
|
active = fields.Boolean('有效', default=True)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class MrsProductionProcessCategory(models.Model):
|
class MrsProductionProcessCategory(models.Model):
|
||||||
_name = 'sf.production.process.category'
|
_name = 'sf.production.process.category'
|
||||||
_description = '表面工艺类别'
|
_description = '表面工艺类别'
|
||||||
|
|||||||
@@ -1,304 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
import logging
|
|
||||||
|
|
||||||
from odoo import fields, models, api
|
|
||||||
# from odoo.exceptions import UserError
|
|
||||||
# # from odoo.addons import sf_base, sf_common
|
|
||||||
# from datetime import datetime
|
|
||||||
|
|
||||||
|
|
||||||
# 功能刀具物料
|
|
||||||
class CuttingToolMaterial(models.Model):
|
|
||||||
_name = 'sf.cutting.tool.material'
|
|
||||||
_description = '刀具物料'
|
|
||||||
|
|
||||||
code = fields.Char('编码')
|
|
||||||
name = fields.Char('名称')
|
|
||||||
remark = fields.Char('备注')
|
|
||||||
active = fields.Boolean('有效', default=True)
|
|
||||||
|
|
||||||
|
|
||||||
# 功能刀具
|
|
||||||
class FunctionalCuttingTool(models.Model):
|
|
||||||
_name = 'sf.functional.cutting.tool'
|
|
||||||
_description = '功能刀具'
|
|
||||||
|
|
||||||
code = fields.Char('编码')
|
|
||||||
name = fields.Char('名称')
|
|
||||||
functional_model_number = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型')
|
|
||||||
integral_model_number = fields.Many2one('sf.integral.cutting.tool', string='整体式刀具型号')
|
|
||||||
blade_model_number = fields.Many2one('sf.blade', string='刀片型号')
|
|
||||||
cutterbar_model_number = fields.Many2one('sf.cutter.bar', string='刀杆型号')
|
|
||||||
cutterpad_model_number = fields.Many2one('sf.cutter.pad', string='刀盘型号')
|
|
||||||
handle_model_number = fields.Many2one('sf.handle', string='刀柄型号')
|
|
||||||
chuck_model_number = fields.Many2one('sf.chuck', string='夹头型号')
|
|
||||||
diameter = fields.Float('直径(mm)')
|
|
||||||
tool_grade = fields.Selection([('1', 'P1'), ('2', 'P2'), ('3', 'P3'), ('4', 'P4'), ('5', 'P5'), ('6', 'P6')],
|
|
||||||
string='刀具等级')
|
|
||||||
machining_accuracy = fields.Float('加工精度(mm)')
|
|
||||||
tool_length = fields.Float('装刀长')
|
|
||||||
blade_number = fields.Integer('刃数')
|
|
||||||
integral_blade_length = fields.Float('整体刃长(mm)')
|
|
||||||
effective_blade_length = fields.Float('有效刃长(mm)')
|
|
||||||
max_life = fields.Float('最大寿命值')
|
|
||||||
is_standard = fields.Boolean('是否标准刀')
|
|
||||||
applicable_range = fields.Char('适用范围')
|
|
||||||
image = fields.Binary('图片')
|
|
||||||
active = fields.Boolean('有效', default=True)
|
|
||||||
|
|
||||||
|
|
||||||
# 功能刀具类型
|
|
||||||
class FunctionalCuttingToolModel(models.Model):
|
|
||||||
_name = 'sf.functional.cutting.tool.model'
|
|
||||||
_description = '功能刀具类型'
|
|
||||||
|
|
||||||
name = fields.Char('名称')
|
|
||||||
code = fields.Char('编码')
|
|
||||||
remark = fields.Char('备注')
|
|
||||||
active = fields.Boolean('有效', default=True)
|
|
||||||
|
|
||||||
|
|
||||||
# 整体式刀具
|
|
||||||
class IntegralCuttingTool(models.Model):
|
|
||||||
_name = 'sf.integral.cutting.tool'
|
|
||||||
_description = '整体式刀具'
|
|
||||||
|
|
||||||
code = fields.Char('编码')
|
|
||||||
name = fields.Char('型号名称')
|
|
||||||
# 关联刀具物料
|
|
||||||
cutting_tool_material = fields.Many2one('sf.cutting.tool.material', '刀具物料')
|
|
||||||
# 整体式刀具类型字段,关联整体式刀具类型对象
|
|
||||||
integral_model_number = fields.Many2one('sf.integral.cutting.tool.model', '整体式刀具类型')
|
|
||||||
# 增加品牌、总长度(mm)、柄部长度(mm)、刃部长度(mm)、直径(mm)、刃数、前角(°)、后角(°)、主偏角(°)、材料型号、配对螺母(mm)、适用夹头型号、适用范围、图片、创建人、创建时间等字段
|
|
||||||
brand = fields.Many2one('sf.machine.brand', '品牌', domain="[('tag_ids.name', 'ilike', '刀具')]")
|
|
||||||
total_length = fields.Float('总长度(mm)')
|
|
||||||
shank_length = fields.Float('柄部长度(mm)')
|
|
||||||
blade_length = fields.Float('刃部长度(mm)')
|
|
||||||
diameter = fields.Float('直径(mm)')
|
|
||||||
blade_number = fields.Integer('刃数')
|
|
||||||
front_angle = fields.Float('前角(°)')
|
|
||||||
rear_angle = fields.Float('后角(°)')
|
|
||||||
main_included_angle = fields.Float('主偏角(°)')
|
|
||||||
material_model = fields.Many2one('sf.materials.model', '材料型号')
|
|
||||||
nut = fields.Float('配对螺母(mm)')
|
|
||||||
# 适用夹头型号可以多选
|
|
||||||
chuck_model = fields.Many2many('sf.chuck', string='适用夹头型号')
|
|
||||||
scope = fields.Char('适用范围')
|
|
||||||
image = fields.Binary('图片')
|
|
||||||
active = fields.Boolean('有效', default=True)
|
|
||||||
|
|
||||||
|
|
||||||
# 整体式刀具类型
|
|
||||||
class IntegralCuttingToolModel(models.Model):
|
|
||||||
_name = 'sf.integral.cutting.tool.model'
|
|
||||||
_description = '整体式刀具类型'
|
|
||||||
|
|
||||||
code = fields.Char('编码')
|
|
||||||
name = fields.Char('名称')
|
|
||||||
# 关联刀具物料
|
|
||||||
cutting_tool_material = fields.Many2one('sf.cutting.tool.material', '刀具物料')
|
|
||||||
remark = fields.Char('备注')
|
|
||||||
|
|
||||||
|
|
||||||
# 刀片
|
|
||||||
class Blade(models.Model):
|
|
||||||
_name = 'sf.blade'
|
|
||||||
_description = '刀片'
|
|
||||||
|
|
||||||
code = fields.Char('编码')
|
|
||||||
name = fields.Char('型号名称')
|
|
||||||
# 关联刀具物料
|
|
||||||
cutting_tool_material = fields.Many2one('sf.cutting.tool.material', '刀具物料')
|
|
||||||
# 刀片类型字段,关联刀片类型对象
|
|
||||||
blade_model_number = fields.Many2one('sf.blade.model', '刀片类型')
|
|
||||||
# 编码、型号名称、刀片类型、品牌、长度L(mm)、宽度D(mm)、高度T(mm)、顶角(°)、前角(°)、后角(°)、主偏角(°)、R角(°)、材料型号、加工硬度、配对螺母(mm)、适用刀杆/刀盘型号、刀尖半径(mm)、图片、创建人、创建时间字段
|
|
||||||
brand = fields.Many2one('sf.machine.brand', '品牌', )
|
|
||||||
length = fields.Float('长度L(mm)')
|
|
||||||
width = fields.Float('宽度D(mm)')
|
|
||||||
height = fields.Float('高度T(mm)')
|
|
||||||
top_angle = fields.Float('顶角(°)')
|
|
||||||
front_angle = fields.Float('前角(°)')
|
|
||||||
rear_angle = fields.Float('后角(°)')
|
|
||||||
main_included_angle = fields.Float('主偏角(°)')
|
|
||||||
r_angle = fields.Float('R角(°)')
|
|
||||||
material_model = fields.Many2one('sf.materials.model', '材料型号')
|
|
||||||
hardness = fields.Char('加工硬度')
|
|
||||||
nut = fields.Float('配对螺母(mm)')
|
|
||||||
# 适用刀杆型号可以多选
|
|
||||||
cutter_bar = fields.Many2many('sf.cutter.bar', string='适用刀杆型号')
|
|
||||||
# 适用刀盘型号可以多选
|
|
||||||
cutter_pad = fields.Many2many('sf.cutter.pad', string='适用刀盘型号')
|
|
||||||
radius = fields.Float('刀尖半径(mm)')
|
|
||||||
image = fields.Binary('图片')
|
|
||||||
|
|
||||||
|
|
||||||
# 刀片类型
|
|
||||||
class BladeModel(models.Model):
|
|
||||||
_name = 'sf.blade.model'
|
|
||||||
_description = '刀片类型'
|
|
||||||
|
|
||||||
code = fields.Char('编码')
|
|
||||||
name = fields.Char('名称')
|
|
||||||
# 关联刀具物料
|
|
||||||
cutting_tool_material = fields.Many2one('sf.cutting.tool.material', '刀具物料')
|
|
||||||
# 刀片类型字段,关联刀片对象
|
|
||||||
blade_ids = fields.One2many('sf.blade', 'blade_model_number', '刀片类型')
|
|
||||||
remark = fields.Char('备注')
|
|
||||||
|
|
||||||
|
|
||||||
# 刀杆
|
|
||||||
class CutterBar(models.Model):
|
|
||||||
_name = 'sf.cutter.bar'
|
|
||||||
_description = '刀杆'
|
|
||||||
|
|
||||||
code = fields.Char('编码')
|
|
||||||
name = fields.Char('型号名称')
|
|
||||||
# 关联刀具物料
|
|
||||||
cutting_tool_material = fields.Many2one('sf.cutting.tool.material', '刀具物料')
|
|
||||||
# 刀杆类型字段,关联刀杆类型对象
|
|
||||||
cutter_bar_model_number = fields.Many2one('sf.cutter.bar.model', '刀杆类型')
|
|
||||||
# 品牌、C柄径(mm)、L总长(mm)、材料型号、刃数、D刃径(mm)、适用刀片型号、配对扳手(mm)、配备螺丝(mm)、刀尖圆角半径、精度等级、硬度(°)、适用范围、图片、创建人、创建时间
|
|
||||||
brand = fields.Many2one('sf.machine.brand', '品牌')
|
|
||||||
c_diameter = fields.Float('C柄径(mm)')
|
|
||||||
total_length = fields.Float('L总长(mm)')
|
|
||||||
material_model = fields.Many2one('sf.materials.model', '材料型号')
|
|
||||||
blade_number = fields.Integer('刃数')
|
|
||||||
d_diameter = fields.Float('D刃径(mm)')
|
|
||||||
blade = fields.Many2many('sf.blade', string='适用刀片型号')
|
|
||||||
wrench = fields.Float('配对扳手(mm)')
|
|
||||||
screw = fields.Float('配备螺丝(mm)')
|
|
||||||
radius = fields.Float('刀尖圆角半径')
|
|
||||||
accuracy = fields.Char('精度等级')
|
|
||||||
hardness = fields.Char('硬度(°)')
|
|
||||||
scope = fields.Char('适用范围')
|
|
||||||
image = fields.Binary('图片')
|
|
||||||
|
|
||||||
|
|
||||||
# 刀杆类型
|
|
||||||
class CutterBarModel(models.Model):
|
|
||||||
_name = 'sf.cutter.bar.model'
|
|
||||||
_description = '刀杆类型'
|
|
||||||
|
|
||||||
code = fields.Char('编码')
|
|
||||||
name = fields.Char('名称')
|
|
||||||
# 关联刀具物料
|
|
||||||
cutting_tool_material = fields.Many2one('sf.cutting.tool.material', '刀具物料')
|
|
||||||
remark = fields.Char('备注')
|
|
||||||
|
|
||||||
|
|
||||||
# 刀盘
|
|
||||||
class CutterPad(models.Model):
|
|
||||||
_name = 'sf.cutter.pad'
|
|
||||||
_description = '刀盘'
|
|
||||||
|
|
||||||
code = fields.Char('编码')
|
|
||||||
name = fields.Char('型号名称')
|
|
||||||
# 关联刀具物料
|
|
||||||
cutting_tool_material = fields.Many2one('sf.cutting.tool.material', '刀具物料')
|
|
||||||
# 刀盘类型字段,关联刀盘类型对象
|
|
||||||
cutter_pad_model_number = fields.Many2one('sf.cutter.pad.model', '刀盘类型')
|
|
||||||
# 增加品牌、C柄径(mm)、L总长(mm)、材料型号、刃数、D刃径(mm)、适用刀片型号、配对扳手(mm)、配备螺丝(mm)、刀尖圆角半径、精度等级、硬度(°)、适用范围、图片、创建人、创建时间
|
|
||||||
brand = fields.Many2one('sf.machine.brand', '品牌')
|
|
||||||
c_diameter = fields.Float('C柄径(mm)')
|
|
||||||
total_length = fields.Float('L总长(mm)')
|
|
||||||
material_model = fields.Many2one('sf.materials.model', '材料型号')
|
|
||||||
blade_number = fields.Integer('刃数')
|
|
||||||
d_diameter = fields.Float('D刃径(mm)')
|
|
||||||
blade = fields.Many2many('sf.blade', string='适用刀片型号')
|
|
||||||
wrench = fields.Float('配对扳手(mm)')
|
|
||||||
screw = fields.Float('配备螺丝(mm)')
|
|
||||||
radius = fields.Float('刀尖圆角半径')
|
|
||||||
accuracy = fields.Char('精度等级')
|
|
||||||
hardness = fields.Char('硬度(°)')
|
|
||||||
scope = fields.Char('适用范围')
|
|
||||||
image = fields.Binary('图片')
|
|
||||||
|
|
||||||
|
|
||||||
# 刀盘类型
|
|
||||||
class CutterPadModel(models.Model):
|
|
||||||
_name = 'sf.cutter.pad.model'
|
|
||||||
_description = '刀盘类型'
|
|
||||||
|
|
||||||
code = fields.Char('编码')
|
|
||||||
name = fields.Char('名称')
|
|
||||||
# 关联刀具物料
|
|
||||||
cutting_tool_material = fields.Many2one('sf.cutting.tool.material', '刀具物料')
|
|
||||||
remark = fields.Char('备注')
|
|
||||||
|
|
||||||
|
|
||||||
# 刀柄
|
|
||||||
class Handle(models.Model):
|
|
||||||
_name = 'sf.handle'
|
|
||||||
_description = '刀柄'
|
|
||||||
|
|
||||||
code = fields.Char('编码')
|
|
||||||
name = fields.Char('型号名称')
|
|
||||||
# 关联刀具物料
|
|
||||||
cutting_tool_material = fields.Many2one('sf.cutting.tool.material', '刀具物料')
|
|
||||||
# 刀柄类型字段,关联刀柄类型对象
|
|
||||||
handle_model_number = fields.Many2one('sf.handle.model', '刀柄类型')
|
|
||||||
# 增加、刀柄类型、品牌、L(mm)、L1(mm)、D1(mm)、重量(kg)、材料型号、本体精度(mm)、配对螺母(mm)、适用夹头型号、夹持范围(mm)、检测精度、检测硬度、标准转速、图片、创建人、创建时间
|
|
||||||
brand = fields.Many2one('sf.machine.brand', '品牌')
|
|
||||||
length = fields.Float('L(mm)')
|
|
||||||
length1 = fields.Float('L1(mm)')
|
|
||||||
diameter1 = fields.Float('D1(mm)')
|
|
||||||
weight = fields.Float('重量(kg)')
|
|
||||||
material_model = fields.Many2one('sf.materials.model', '材料型号')
|
|
||||||
body_accuracy = fields.Float('本体精度(mm)')
|
|
||||||
nut = fields.Float('配对螺母(mm)')
|
|
||||||
chuck_model = fields.Many2many('sf.chuck.model', string='适用夹头型号')
|
|
||||||
clamping_range = fields.Float('夹持范围(mm)')
|
|
||||||
detection_accuracy = fields.Float('检测精度')
|
|
||||||
detection_hardness = fields.Char('检测硬度')
|
|
||||||
standard_speed = fields.Float('标准转速')
|
|
||||||
image = fields.Binary('图片')
|
|
||||||
|
|
||||||
|
|
||||||
# 刀柄类型
|
|
||||||
class HandleModel(models.Model):
|
|
||||||
_name = 'sf.handle.model'
|
|
||||||
_description = '刀柄类型'
|
|
||||||
|
|
||||||
code = fields.Char('编码')
|
|
||||||
name = fields.Char('名称')
|
|
||||||
# 关联刀具物料
|
|
||||||
cutting_tool_material = fields.Many2one('sf.cutting.tool.material', '刀具物料')
|
|
||||||
remark = fields.Char('备注')
|
|
||||||
|
|
||||||
|
|
||||||
# 夹头对象(夹头型号对象)
|
|
||||||
class Chuck(models.Model):
|
|
||||||
_name = 'sf.chuck'
|
|
||||||
_description = '夹头'
|
|
||||||
_rec_name = 'code'
|
|
||||||
|
|
||||||
code = fields.Char('编码')
|
|
||||||
name = fields.Char('型号名称')
|
|
||||||
# 关联刀具物料
|
|
||||||
cutting_tool_material = fields.Many2one('sf.cutting.tool.material', '刀具物料')
|
|
||||||
# 夹头类型字段,关联夹头类型对象
|
|
||||||
chuck_model_number = fields.Many2one('sf.chuck.model', '夹头类型')
|
|
||||||
# 增加品牌、精度(mm)、外径(mm)、内径(mm)、高度(mm)、材料型号、配对螺母(mm)、适用刀柄型号、夹持范围(mm)、特性、图片、创建人、创建时间
|
|
||||||
brand = fields.Many2one('sf.machine.brand', '品牌')
|
|
||||||
accuracy = fields.Float('精度(mm)')
|
|
||||||
diameter = fields.Float('外径(mm)')
|
|
||||||
inner_diameter = fields.Float('内径(mm)')
|
|
||||||
height = fields.Float('高度(mm)')
|
|
||||||
material_model = fields.Many2one('sf.materials.model', '材料型号')
|
|
||||||
nut = fields.Float('配对螺母(mm)')
|
|
||||||
handle_model = fields.Many2many('sf.handle.model', string='适用刀柄型号')
|
|
||||||
clamping_range = fields.Float('夹持范围(mm)')
|
|
||||||
feature = fields.Char('特性')
|
|
||||||
image = fields.Binary('图片')
|
|
||||||
|
|
||||||
|
|
||||||
# 夹头类型
|
|
||||||
class ChuckModel(models.Model):
|
|
||||||
_name = 'sf.chuck.model'
|
|
||||||
_description = '夹头类型'
|
|
||||||
|
|
||||||
code = fields.Char('编码')
|
|
||||||
name = fields.Char('名称')
|
|
||||||
# 关联刀具物料
|
|
||||||
cutting_tool_material = fields.Many2one('sf.cutting.tool.material', '刀具物料')
|
|
||||||
remark = fields.Char('备注')
|
|
||||||
@@ -26,7 +26,7 @@ class FunctionalCuttingTool(models.Model):
|
|||||||
name = fields.Char('名称')
|
name = fields.Char('名称')
|
||||||
active = fields.Boolean('有效', default=True)
|
active = fields.Boolean('有效', default=True)
|
||||||
mrs_cutting_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型')
|
mrs_cutting_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型')
|
||||||
mrs_cutting_tool_model_id = fields.Many2one('sf.cutting.tool.model', string='刀具型号')
|
mrs_cutting_tool_model_id = fields.Many2one('sf.cutting_tool.standard.library', string='刀具型号')
|
||||||
|
|
||||||
# # 整体式刀具型号
|
# # 整体式刀具型号
|
||||||
# mrs_cutting_tool_integral_model_ids = fields.Many2many('sf.cutting.tool.model', 'rel_integral_model_functional_sf',
|
# mrs_cutting_tool_integral_model_ids = fields.Many2many('sf.cutting.tool.model', 'rel_integral_model_functional_sf',
|
||||||
@@ -91,133 +91,6 @@ class FunctionalCuttingToolModel(models.Model):
|
|||||||
active = fields.Boolean('有效', default=True)
|
active = fields.Boolean('有效', default=True)
|
||||||
|
|
||||||
|
|
||||||
# 刀具型号
|
|
||||||
class CuttingToolModel(models.Model):
|
|
||||||
_name = 'sf.cutting.tool.model'
|
|
||||||
_description = '刀具型号'
|
|
||||||
|
|
||||||
name = fields.Char('名称')
|
|
||||||
cutting_tool_material_id = fields.Many2one('sf.cutting.tool.material', string='刀具物料')
|
|
||||||
cutting_tool_type = fields.Char(string="刀具物料类型", related='cutting_tool_material_id.name', store=True)
|
|
||||||
cutting_tool_type_id = fields.Many2one('sf.cutting.tool.type', string='刀具类型',
|
|
||||||
)
|
|
||||||
brand_id = fields.Many2one('sf.machine.brand', '品牌', domain="[('tag_ids.name', 'ilike', '刀具')]")
|
|
||||||
tool_length = fields.Integer('长度(mm)')
|
|
||||||
tool_width = fields.Integer('宽度(mm)')
|
|
||||||
tool_height = fields.Integer('高度(mm)')
|
|
||||||
tool_thickness = fields.Integer('厚度(mm)')
|
|
||||||
tool_weight = fields.Float('重量(kg)')
|
|
||||||
coating_material = fields.Char('涂层材质')
|
|
||||||
|
|
||||||
# 整体式刀具参数
|
|
||||||
total_length = fields.Float('总长度(mm)')
|
|
||||||
shank_length = fields.Float('柄部长度(mm)')
|
|
||||||
blade_length = fields.Float('刃部长度(mm)')
|
|
||||||
diameter = fields.Float('直径(mm)')
|
|
||||||
blade_number = fields.Integer('刃数')
|
|
||||||
front_angle = fields.Float('前角(°)')
|
|
||||||
rear_angle = fields.Float('后角(°)')
|
|
||||||
main_included_angle = fields.Float('主偏角(°)')
|
|
||||||
material_model_id = fields.Many2one('sf.materials.model', '材料型号')
|
|
||||||
nut = fields.Float('配对螺母(mm)')
|
|
||||||
# 适用夹头型号可以多选
|
|
||||||
chuck_ids = fields.Many2many(
|
|
||||||
'sf.cutting.tool.model',
|
|
||||||
relation='cutting_tool_model_handle_chuck_rel',
|
|
||||||
column1='model_id_1',
|
|
||||||
column2='model_id_2',
|
|
||||||
domain="[('cutting_tool_type', '=', '夹头')]",
|
|
||||||
string='适用夹头型号')
|
|
||||||
# 刀片参数
|
|
||||||
top_angle = fields.Float('顶角(°)')
|
|
||||||
jump_accuracy = fields.Float('径跳精度(um)')
|
|
||||||
working_hardness = fields.Char('加工硬度(hrc)')
|
|
||||||
cutter_bar_ids = fields.Many2many(
|
|
||||||
'sf.cutting.tool.model',
|
|
||||||
relation='cutting_tool_model_blade_cutter_bar_rel',
|
|
||||||
column1='model_id_1',
|
|
||||||
column2='model_id_2',
|
|
||||||
domain="[('cutting_tool_type', '=', '刀杆')]",
|
|
||||||
string='适用刀杆型号'
|
|
||||||
)
|
|
||||||
cutter_pad_ids = fields.Many2many(
|
|
||||||
'sf.cutting.tool.model',
|
|
||||||
relation='cutting_tool_model_blade_cutter_pad_rel',
|
|
||||||
column1='model_id_1',
|
|
||||||
column2='model_id_2',
|
|
||||||
domain="[('cutting_tool_type', '=', '刀盘')]",
|
|
||||||
string='适用刀盘型号' # 使用空列表作为默认值
|
|
||||||
)
|
|
||||||
# 刀杆/参数
|
|
||||||
blade_diameter = fields.Float('刃径(mm)')
|
|
||||||
blade_ids = fields.Many2many(
|
|
||||||
'sf.cutting.tool.model',
|
|
||||||
relation='cutting_tool_model_pad_blade_rel',
|
|
||||||
column1='model_id_1',
|
|
||||||
column2='model_id_2',
|
|
||||||
domain="[('cutting_tool_type', '=', '刀片')]",
|
|
||||||
string='适用刀片型号' # 使用空列表作为默认值
|
|
||||||
)
|
|
||||||
wrench = fields.Float('配对扳手(mm)')
|
|
||||||
screw = fields.Float('配备螺丝(mm)')
|
|
||||||
accuracy_level = fields.Char('精度等级')
|
|
||||||
# 刀柄参数
|
|
||||||
diameter_max = fields.Float('最大直径(mm)')
|
|
||||||
clamping_diameter = fields.Float('夹持直径(mm)')
|
|
||||||
flange_length = fields.Float('法兰柄长度(mm)')
|
|
||||||
flange_diameter = fields.Float('法兰直径(mm)')
|
|
||||||
# 夹头参数
|
|
||||||
outer_diameter = fields.Float('外径(mm)')
|
|
||||||
inner_diameter = fields.Float('内径(mm)')
|
|
||||||
handle_ids = fields.Many2many(
|
|
||||||
'sf.cutting.tool.model',
|
|
||||||
relation='cutting_tool_model_chuck_handle_rel',
|
|
||||||
column1='model_id_1',
|
|
||||||
column2='model_id_2',
|
|
||||||
domain="[('cutting_tool_type', '=', '刀柄')]",
|
|
||||||
string='适用刀柄型号'
|
|
||||||
)
|
|
||||||
active = fields.Boolean('有效', default=True)
|
|
||||||
|
|
||||||
def _get_code(self, cutting_tool_type_code):
|
|
||||||
cutting_tool_model = self.search(
|
|
||||||
[('code', 'ilike', cutting_tool_type_code)],
|
|
||||||
limit=1,
|
|
||||||
order="id desc")
|
|
||||||
if not cutting_tool_model:
|
|
||||||
num = "%03d" % 1
|
|
||||||
else:
|
|
||||||
m = int(cutting_tool_model.code[-3:]) + 1
|
|
||||||
num = "%03d" % m
|
|
||||||
return "%s%s" % (cutting_tool_type_code, num)
|
|
||||||
|
|
||||||
code = fields.Char(string='编码', readonly=True)
|
|
||||||
|
|
||||||
def _onchange_cutting_tool_material_id(self, cutting_tool_material_id):
|
|
||||||
if cutting_tool_material_id:
|
|
||||||
if cutting_tool_material_id.name == "整体式刀具":
|
|
||||||
code = self._get_code("JKM-T-DJWL-ZTDJ-")
|
|
||||||
elif cutting_tool_material_id.name == "刀片":
|
|
||||||
code = self._get_code("JKM-T-DJWL-DPIA-")
|
|
||||||
elif cutting_tool_material_id.name == "刀杆":
|
|
||||||
code = self._get_code("JKM-T-DJWL-DGAN-")
|
|
||||||
elif cutting_tool_material_id.name == "刀盘":
|
|
||||||
code = self._get_code("JKM-T-DJWL-DPAN-")
|
|
||||||
elif cutting_tool_material_id.name == "夹头":
|
|
||||||
code = self._get_code("JKM-T-DJWL-DJIA-")
|
|
||||||
else:
|
|
||||||
code = self._get_code("JKM-T-DJWL-DBIN-")
|
|
||||||
return code
|
|
||||||
|
|
||||||
@api.model_create_multi
|
|
||||||
def create(self, vals):
|
|
||||||
obj = super(CuttingToolModel, self).create(vals)
|
|
||||||
if obj.cutting_tool_material_id:
|
|
||||||
code = self._onchange_cutting_tool_material_id(obj.cutting_tool_material_id)
|
|
||||||
obj.code = code
|
|
||||||
return obj
|
|
||||||
|
|
||||||
|
|
||||||
# 刀具类型
|
# 刀具类型
|
||||||
class CuttingToolType(models.Model):
|
class CuttingToolType(models.Model):
|
||||||
_name = 'sf.cutting.tool.type'
|
_name = 'sf.cutting.tool.type'
|
||||||
@@ -229,3 +102,175 @@ class CuttingToolType(models.Model):
|
|||||||
cutting_tool_material_id = fields.Many2one('sf.cutting.tool.material', '刀具物料')
|
cutting_tool_material_id = fields.Many2one('sf.cutting.tool.material', '刀具物料')
|
||||||
remark = fields.Char('备注')
|
remark = fields.Char('备注')
|
||||||
active = fields.Boolean('有效', default=True)
|
active = fields.Boolean('有效', default=True)
|
||||||
|
|
||||||
|
|
||||||
|
# 刀具标准库
|
||||||
|
class CuttingToolModel(models.Model):
|
||||||
|
_name = 'sf.cutting_tool.standard.library'
|
||||||
|
_description = '刀具标准库'
|
||||||
|
|
||||||
|
code = fields.Char(string='编码')
|
||||||
|
name = fields.Char('名称')
|
||||||
|
# 关联刀具物料
|
||||||
|
cutting_tool_material_id = fields.Many2one('sf.cutting.tool.material', '刀具物料', required=True)
|
||||||
|
# 刀具物料类型
|
||||||
|
cutting_tool_type = fields.Char(related='cutting_tool_material_id.name', string='刀具物料类型',
|
||||||
|
store=True)
|
||||||
|
# 关联刀具类型
|
||||||
|
cutting_tool_type_id = fields.Many2one('sf.cutting.tool.type', '类型',
|
||||||
|
domain="[('cutting_tool_material_id.name', '=', cutting_tool_type)]")
|
||||||
|
brand_id = fields.Many2one('sf.machine.brand', '品牌')
|
||||||
|
status = fields.Boolean(string='状态', default=False)
|
||||||
|
image = fields.Binary('图片')
|
||||||
|
|
||||||
|
# 整体式刀具参数
|
||||||
|
material_model_id = fields.Many2one('mrs.materials.model', '刀具材质')
|
||||||
|
tool_hardness = fields.Integer('刀具硬度(hrc)')
|
||||||
|
coating_material = fields.Char('涂层材质')
|
||||||
|
blade_type = fields.Char('刃部类型')
|
||||||
|
integral_coarse_medium_fine = fields.Selection([('粗', '粗'), ('中', '中'), ('精', '精')], '粗/中/精')
|
||||||
|
integral_run_out_accuracy_max = fields.Char('整体式刀具端跳精度max')
|
||||||
|
integral_run_out_accuracy_min = fields.Char('整体式刀具端跳精度min')
|
||||||
|
|
||||||
|
fit_blade_shape_id = fields.Many2many('maintenance.equipment.image', 'fit_blade_shape_library_rel',
|
||||||
|
'适配刀片形状', domain=[('type', '=', '刀片形状')])
|
||||||
|
suitable_machining_method_ids = fields.Many2many('maintenance.equipment.image',
|
||||||
|
'suitable_machining_method_library_rel',
|
||||||
|
'适合加工方式', domain=[('type', '=', '加工能力')])
|
||||||
|
blade_tip_characteristics_id = fields.Many2many('maintenance.equipment.image',
|
||||||
|
'blade_tip_character_library_rel',
|
||||||
|
'刀尖特征', domain=[('type', '=', '刀尖特征')])
|
||||||
|
handle_type_ids = fields.Many2many('maintenance.equipment.image', 'handle_type_library_rel',
|
||||||
|
'柄部类型', domain=[('type', '=', '柄部类型')])
|
||||||
|
cutting_direction_ids = fields.Many2many('maintenance.equipment.image', 'cutting_direction_library_rel',
|
||||||
|
'走刀方向', domain=[('type', '=', '走刀方向')])
|
||||||
|
suitable_coolant_ids = fields.Many2many('maintenance.equipment.image', 'suitable_coolant_library_rel',
|
||||||
|
'适合冷却液', domain=[('type', '=', '冷却液')])
|
||||||
|
compaction_way_ids = fields.Many2many('maintenance.equipment.image', 'compaction_way_library_rel',
|
||||||
|
'压紧方式', domain=[('type', '=', '压紧方式')])
|
||||||
|
integral_tool_basic_parameters_ids = fields.One2many('sf.tool.materials.basic.parameters',
|
||||||
|
'standard_library_id', string='整体式刀具基本参数')
|
||||||
|
blade_basic_parameters_ids = fields.One2many('sf.tool.materials.basic.parameters',
|
||||||
|
'standard_library_id', string='刀片基本参数')
|
||||||
|
cutter_bar_basic_parameters_ids = fields.One2many('sf.tool.materials.basic.parameters',
|
||||||
|
'standard_library_id', string='刀杆基本参数')
|
||||||
|
cutter_head_basic_parameters_ids = fields.One2many('sf.tool.materials.basic.parameters',
|
||||||
|
'standard_library_id', string='刀盘基本参数')
|
||||||
|
knife_handle_basic_parameters_ids = fields.One2many('sf.tool.materials.basic.parameters',
|
||||||
|
'standard_library_id', string='刀柄基本参数')
|
||||||
|
chuck_basic_parameters_ids = fields.One2many('sf.tool.materials.basic.parameters',
|
||||||
|
'standard_library_id', string='夹头基本参数')
|
||||||
|
cutting_speed_ids = fields.One2many('sf.cutting.speed', 'standard_library_id', string='切削速度Vc')
|
||||||
|
feed_per_tooth_ids = fields.One2many('sf.feed.per.tooth', 'standard_library_id', '每齿走刀量fz',
|
||||||
|
domain=[('cutting_speed', '!=', False)])
|
||||||
|
feed_per_tooth_ids_2 = fields.One2many('sf.feed.per.tooth', 'standard_library_id', '每齿走刀量fz',
|
||||||
|
domain=[('machining_method', '!=', False)])
|
||||||
|
feed_per_tooth_ids_3 = fields.One2many('sf.feed.per.tooth', 'standard_library_id', '每齿走刀量fz',
|
||||||
|
domain=[('cutting_speed', '!=', False)])
|
||||||
|
feed_per_tooth_ids_4 = fields.One2many('sf.feed.per.tooth', 'standard_library_id', '每齿走刀量fz',
|
||||||
|
domain=[('machining_method', '!=', False)])
|
||||||
|
material_model_id = fields.Many2one('sf.materials.model', '材料型号')
|
||||||
|
# 适用夹头型号可以多选
|
||||||
|
chuck_ids = fields.Many2many(
|
||||||
|
'sf.cutting_tool.standard.library',
|
||||||
|
relation='cutting_tool_type_library_handle_chuck_rel',
|
||||||
|
column1='model_id_1',
|
||||||
|
column2='model_id_2',
|
||||||
|
domain="[('cutting_tool_material_id.name', '=', '夹头')]",
|
||||||
|
string='适用夹头型号')
|
||||||
|
cutter_bar_ids = fields.Many2many(
|
||||||
|
'sf.cutting_tool.standard.library',
|
||||||
|
relation='cutting_tool_type_library_cutter_bar_rel',
|
||||||
|
column1='model_id_1',
|
||||||
|
column2='model_id_2',
|
||||||
|
domain="[('cutting_tool_material_id.name', '=', '刀杆')]",
|
||||||
|
string='适用刀杆型号'
|
||||||
|
)
|
||||||
|
cutter_pad_ids = fields.Many2many(
|
||||||
|
'sf.cutting_tool.standard.library',
|
||||||
|
relation='cutting_tool_type_library_cutter_pad_rel',
|
||||||
|
column1='model_id_1',
|
||||||
|
column2='model_id_2',
|
||||||
|
domain="[('cutting_tool_material_id.name', '=', '刀盘')]",
|
||||||
|
string='适用刀盘型号' # 使用空列表作为默认值
|
||||||
|
)
|
||||||
|
# 刀杆/参数
|
||||||
|
blade_ids = fields.Many2many(
|
||||||
|
'sf.cutting_tool.standard.library',
|
||||||
|
relation='cutting_tool_type_library_pad_blade_rel',
|
||||||
|
column1='model_id_1',
|
||||||
|
column2='model_id_2',
|
||||||
|
domain="[('cutting_tool_material_id.name', '=', '刀片')]",
|
||||||
|
string='适用刀片型号' # 使用空列表作为默认值
|
||||||
|
)
|
||||||
|
handle_ids = fields.Many2many(
|
||||||
|
'sf.cutting_tool.standard.library',
|
||||||
|
relation='cutting_tool_type_library_chuck_handle_rel',
|
||||||
|
column1='model_id_1',
|
||||||
|
column2='model_id_2',
|
||||||
|
domain="[('cutting_tool_material_id.name', '=', '刀柄')]",
|
||||||
|
string='适用刀柄型号'
|
||||||
|
)
|
||||||
|
active = fields.Boolean('有效', default=True)
|
||||||
|
is_cloud = fields.Boolean('云端数据', default=False)
|
||||||
|
|
||||||
|
def _get_ids(self, cutting_tool_type_code, factory_short_name):
|
||||||
|
cutting_tool_type_ids = []
|
||||||
|
for item in cutting_tool_type_code:
|
||||||
|
cutting_tool_type = self.search([('code', '=', item.replace("JKM", factory_short_name))])
|
||||||
|
if cutting_tool_type:
|
||||||
|
cutting_tool_type_ids.append(cutting_tool_type.id)
|
||||||
|
return [(6, 0, cutting_tool_type_ids)]
|
||||||
|
|
||||||
|
|
||||||
|
class MaintenanceStandardImage(models.Model):
|
||||||
|
_name = 'maintenance.equipment.image'
|
||||||
|
_description = '能力特征库'
|
||||||
|
|
||||||
|
active = fields.Boolean('有效', default=True)
|
||||||
|
name = fields.Char('名称')
|
||||||
|
image = fields.Binary(string='图文')
|
||||||
|
type = fields.Selection(
|
||||||
|
[('加工能力', '加工能力'), ('刀尖特征', '刀尖特征'), ('柄部类型', '柄部类型'), ('走刀方向', '走刀方向'),
|
||||||
|
('冷却液', '冷却液'), ('压紧方式', '压紧方式'), ('刀片形状', '刀片形状')],
|
||||||
|
string='特征')
|
||||||
|
equipment_id = fields.Many2many('maintenance.equipment', 'image_id', string='设备')
|
||||||
|
|
||||||
|
def _get_ids(self, name_arr):
|
||||||
|
ability_feature_ids = []
|
||||||
|
for item in name_arr:
|
||||||
|
ability_feature = self.search([('name', '=', item)])
|
||||||
|
if ability_feature:
|
||||||
|
ability_feature_ids.append(ability_feature.id)
|
||||||
|
return [(6, 0, ability_feature_ids)]
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def name_search(self, name='', args=None, operator='ilike', limit=100):
|
||||||
|
# 调用父类的name_search方法,获取原始的结果列表
|
||||||
|
res = super().name_search(name, args, operator, limit)
|
||||||
|
# 定义一个空字典用来存储id和name的映射关系
|
||||||
|
name_dict = {}
|
||||||
|
# 遍历结果列表,将id和name存入字典中
|
||||||
|
for item in res:
|
||||||
|
id = item[0]
|
||||||
|
name = item[1]
|
||||||
|
name_dict[id] = name
|
||||||
|
# 根据id列表搜索符合条件的记录
|
||||||
|
records = self.browse(name_dict.keys())
|
||||||
|
# 定义一个新的结果列表用来存储修改后的结果
|
||||||
|
new_res = []
|
||||||
|
# 遍历每条记录
|
||||||
|
for record in records:
|
||||||
|
# 获取记录的id,name和image属性
|
||||||
|
id = record.id
|
||||||
|
name = name_dict[id]
|
||||||
|
image = record.image
|
||||||
|
# 如果image不为空,将其转换为data URI scheme
|
||||||
|
if image:
|
||||||
|
data_uri = f"data:image/png;base64,{image.decode('utf-8')}"
|
||||||
|
else:
|
||||||
|
data_uri = ""
|
||||||
|
# 将这三个属性组成一个数组,并添加到结果列表中 result.append([id, name, data_uri]) # 返回结果列表 return result
|
||||||
|
new_res.append([id, name, data_uri])
|
||||||
|
# 返回新的结果列表
|
||||||
|
return new_res
|
||||||
|
|||||||
383
sf_base/models/tool_other_features.py
Normal file
383
sf_base/models/tool_other_features.py
Normal file
@@ -0,0 +1,383 @@
|
|||||||
|
from odoo import fields, models, api
|
||||||
|
|
||||||
|
|
||||||
|
class ToolMaterialsBasicParameters(models.Model):
|
||||||
|
_name = 'sf.tool.materials.basic.parameters'
|
||||||
|
_description = '刀具物料基本参数'
|
||||||
|
|
||||||
|
name = fields.Char('物料号', size=50)
|
||||||
|
standard_library_id = fields.Many2one('sf.cutting_tool.standard.library', string='刀具标准库')
|
||||||
|
cutting_tool_type = fields.Char(related='standard_library_id.cutting_tool_type', string='刀具物料类型',
|
||||||
|
store=True)
|
||||||
|
|
||||||
|
# 整体式刀具参数
|
||||||
|
total_length = fields.Char('总长度(mm)', size=20)
|
||||||
|
blade_number = fields.Selection(
|
||||||
|
[('2', '2'), ('3', '3'), ('4', '4'), ('5', '5'), ('6', '6'), ('7', '7'), ('8', '8')],
|
||||||
|
string='刃数(个)')
|
||||||
|
neck_diameter = fields.Char('颈部直径(mm)', size=20)
|
||||||
|
neck_length = fields.Char('颈部长度(mm)', size=20)
|
||||||
|
handle_diameter = fields.Char('柄部直径(mm)', size=20)
|
||||||
|
handle_length = fields.Char('柄部长度(mm)', size=20)
|
||||||
|
blade_tip_diameter = fields.Char('刀尖直径(mm)', size=20)
|
||||||
|
blade_tip_working_size = fields.Char('刀尖处理尺寸(R半径mm/倒角)', size=20)
|
||||||
|
blade_tip_taper = fields.Integer('刀尖锥度(°)')
|
||||||
|
blade_diameter = fields.Char('刃部直径(mm)', size=20)
|
||||||
|
blade_length = fields.Char('刃部长度(mm)', size=20)
|
||||||
|
blade_helix_angle = fields.Integer('刃部螺旋角(°)')
|
||||||
|
blade_width = fields.Char('刃部宽度(mm)', size=20)
|
||||||
|
blade_depth = fields.Char('刃部深度(mm)', size=20)
|
||||||
|
pitch = fields.Char('牙距(mm)', size=20)
|
||||||
|
cutting_depth = fields.Char('切削深度(mm)', size=20)
|
||||||
|
# 刀片参数
|
||||||
|
length = fields.Char('长度(mm)', size=20)
|
||||||
|
thickness = fields.Char('厚度(mm)', size=20)
|
||||||
|
width = fields.Char('宽度(mm)', size=20)
|
||||||
|
cutting_blade_length = fields.Char('切削刃长(mm)', size=20)
|
||||||
|
relief_angle = fields.Integer('后角(°)')
|
||||||
|
blade_tip_circular_arc_radius = fields.Char('刀尖圆弧半径(mm)', size=20)
|
||||||
|
inscribed_circle_diameter = fields.Char('内接圆直径(mm)', size=20)
|
||||||
|
install_aperture_diameter = fields.Char('安装孔直径(mm)', size=20)
|
||||||
|
chip_breaker_groove = fields.Selection([('无', '无'), ('单面', '单面'), ('双面', '双面')],
|
||||||
|
string='有无断屑槽')
|
||||||
|
blade_teeth_model = fields.Selection(
|
||||||
|
[('无', '无'), ('V牙型', 'V牙型'), ('米制全牙型', '米制全牙型'), ('美制全牙型', '美制全牙型'),
|
||||||
|
('惠氏全牙型', '惠氏全牙型'), ('BSPT全牙型', 'BSPT全牙型'), ('NPT全牙型', 'NPT全牙型'),
|
||||||
|
('UNJ全牙型', 'UNJ全牙型'), ('DIN405圆牙型', 'DIN405圆牙型'), ('ACME梯形', 'ACME梯形'),
|
||||||
|
('石油管螺纹刀片', '石油管螺纹刀片'), ('矮牙ACME梯形', '矮牙ACME梯形'),
|
||||||
|
('Trapeze30° 103', 'Trapeze30° 103')], string='刀片牙型', default='无')
|
||||||
|
blade_blade_number = fields.Selection([('1', '1'), ('2', '2'), ('3', '3'), ('4', '4'), ('5', '5'), ('6', '6'),
|
||||||
|
('7', '7'), ('8', '8'), ('9', '9'), ('10', '10')],
|
||||||
|
string='刀片的刃数(个)')
|
||||||
|
main_included_angle = fields.Integer('主偏角(°)')
|
||||||
|
top_angle = fields.Integer('顶角(°)')
|
||||||
|
blade_tip_dip_angle = fields.Integer('刀尖倾角(°)')
|
||||||
|
side_cutting_edge_angle = fields.Integer('侧切削角(°)')
|
||||||
|
thread_model = fields.Selection([('无', '无'), ('外螺纹', '外螺纹'), ('内螺纹', '内螺纹')], string='螺纹类型', default='无')
|
||||||
|
thread_num = fields.Char('每英寸螺纹数(tpi)', size=20)
|
||||||
|
blade_tip_height_tolerance = fields.Char('刀尖高度公差(mm)', size=20)
|
||||||
|
inscribed_circle_tolerance = fields.Char('内接圆公差(mm)', size=20)
|
||||||
|
thickness_tolerance = fields.Char('厚度公差(mm)', size=20)
|
||||||
|
# 刀杆参数
|
||||||
|
height = fields.Char('高度(mm)', size=20)
|
||||||
|
blade_height = fields.Char('刃部高度(mm)', size=20)
|
||||||
|
knife_head_height = fields.Char('刀头高度(mm)', size=20)
|
||||||
|
knife_head_width = fields.Char('刀头宽度(mm)', size=20)
|
||||||
|
knife_head_length = fields.Char('刀头长度(mm)', size=20)
|
||||||
|
cut_depth_max = fields.Char('最大切削深度(mm)', size=20)
|
||||||
|
cutter_arbor_diameter = fields.Char('刀杆直径(mm)', size=20)
|
||||||
|
min_machining_aperture = fields.Char('最小加工孔径(mm)', size=20)
|
||||||
|
install_blade_tip_num = fields.Char('可装刀片数/齿数(个)', size=20)
|
||||||
|
cutting_blade_model = fields.Char('切削类型', size=20)
|
||||||
|
is_cooling_hole = fields.Boolean('有无冷却孔', default=False)
|
||||||
|
locating_slot_code = fields.Char('定位槽代号', size=20)
|
||||||
|
installing_structure = fields.Char('安装结构', size=20)
|
||||||
|
blade_ids = fields.Many2many(
|
||||||
|
'sf.cutting.tool.type',
|
||||||
|
relation='basic_param_pad_blade_rel',
|
||||||
|
column1='model_id_1',
|
||||||
|
column2='model_id_2',
|
||||||
|
domain="[('cutting_tool_material_id.name', '=', '刀片')]",
|
||||||
|
string='适配刀片型号' # 使用空列表作为默认值
|
||||||
|
)
|
||||||
|
tool_shim = fields.Char('适配刀垫型号', size=50)
|
||||||
|
cotter_pin = fields.Char('适配销钉型号', size=50)
|
||||||
|
pressing_plate = fields.Char('适配压板型号', size=50)
|
||||||
|
screw = fields.Char('适配螺钉型号', size=50)
|
||||||
|
spanner = fields.Char('适配扳手型号', size=50)
|
||||||
|
# 刀盘参数
|
||||||
|
cutter_head_diameter = fields.Char('刀盘直径(mm)', size=20)
|
||||||
|
interface_diameter = fields.Char('接口直径(mm)', size=20)
|
||||||
|
# 刀柄参数
|
||||||
|
flange_shank_length = fields.Char('法兰柄长(mm)', size=20)
|
||||||
|
handle_external_diameter = fields.Char('柄部外径(mm)', size=20)
|
||||||
|
handle_inside_diameter = fields.Char('柄部内径(mm)', size=20)
|
||||||
|
min_clamping_diameter = fields.Char('最小夹持直径(mm)', size=20)
|
||||||
|
max_clamping_diameter = fields.Char('最大夹持直径(mm)', size=20)
|
||||||
|
clamping_mode = fields.Char('夹持方式', size=20)
|
||||||
|
max_load_capacity = fields.Char('最大负载能力(kg)', size=20)
|
||||||
|
taper = fields.Integer('锥度(°)')
|
||||||
|
tool_changing_time = fields.Integer('换刀时间(s)')
|
||||||
|
standard_rotate_speed = fields.Char('标准转速(n/min)', size=20)
|
||||||
|
max_rotate_speed = fields.Char('最大转速(n/min)', size=20)
|
||||||
|
diameter_slip_accuracy = fields.Char('径跳精度(mm)', size=20)
|
||||||
|
cooling_model = fields.Char('冷却类型', size=20)
|
||||||
|
is_rough_machining = fields.Boolean('可粗加工', default=False)
|
||||||
|
is_finish_machining = fields.Boolean('可精加工', default=False)
|
||||||
|
is_quick_cutting = fields.Boolean('可高速切削', default=False)
|
||||||
|
is_drill_hole = fields.Boolean('可钻孔', default=False)
|
||||||
|
is_safe_lock = fields.Boolean('有无安全锁', default=False)
|
||||||
|
# 夹头参数
|
||||||
|
er_size_model = fields.Char('ER尺寸型号', size=20)
|
||||||
|
outer_diameter = fields.Char('外径(mm)', size=20)
|
||||||
|
inner_diameter = fields.Char('内径(mm)', size=20)
|
||||||
|
run_out_accuracy = fields.Char('跳动精度(mm)', size=20)
|
||||||
|
top_diameter = fields.Char('顶部直径(mm)', size=20)
|
||||||
|
weight = fields.Char('重量(kg)', size=20)
|
||||||
|
clamping_length = fields.Char('夹持长度(mm)', size=20)
|
||||||
|
clamping_tolerance = fields.Char('夹持公差(mm)', size=20)
|
||||||
|
cooling_jacket = fields.Char('适用冷却套型号', size=50)
|
||||||
|
handle_ids = fields.Many2many(
|
||||||
|
'sf.cutting.tool.type',
|
||||||
|
relation='basic_param_chuck_handle_rel',
|
||||||
|
column1='model_id_1',
|
||||||
|
column2='model_id_2',
|
||||||
|
domain="[('cutting_tool_material_id.name', '=', '刀柄')]",
|
||||||
|
string='适用刀柄型号'
|
||||||
|
)
|
||||||
|
|
||||||
|
def _json_integral_tool_basic_param(self, obj):
|
||||||
|
integral_tool_basic_param_str = (0, '', {
|
||||||
|
'name': obj['name'],
|
||||||
|
'cutting_tool_type': obj['cutting_tool_type'],
|
||||||
|
'total_length': obj['total_length'],
|
||||||
|
'blade_diameter': obj['blade_diameter'],
|
||||||
|
'blade_length': obj['blade_length'],
|
||||||
|
'blade_number': obj['blade_number'],
|
||||||
|
'neck_length': obj['neck_length'],
|
||||||
|
'neck_diameter': obj['neck_diameter'],
|
||||||
|
'handle_diameter': obj['handle_diameter'],
|
||||||
|
'handle_length': obj['handle_length'],
|
||||||
|
'blade_tip_diameter': obj['blade_tip_diameter'],
|
||||||
|
'blade_tip_working_size': obj['blade_tip_working_size'],
|
||||||
|
'blade_tip_taper': obj['blade_tip_taper'],
|
||||||
|
'blade_helix_angle': obj['blade_helix_angle'],
|
||||||
|
'blade_width': obj['blade_width'],
|
||||||
|
'blade_depth': obj['blade_depth'],
|
||||||
|
'pitch': obj['pitch'],
|
||||||
|
'cutting_depth': obj['cutting_depth'],
|
||||||
|
})
|
||||||
|
return integral_tool_basic_param_str
|
||||||
|
|
||||||
|
def _json_blade_basic_param(self, obj):
|
||||||
|
blade_basic_param_str = (0, '', {
|
||||||
|
'name': obj['name'],
|
||||||
|
'cutting_tool_type': obj['cutting_tool_type'],
|
||||||
|
'length': obj['length'],
|
||||||
|
'thickness': obj['thickness'],
|
||||||
|
'width': obj['width'],
|
||||||
|
'cutting_blade_length': obj['cutting_blade_length'],
|
||||||
|
'relief_angle': obj['relief_angle'],
|
||||||
|
'blade_tip_circular_arc_radius': obj['blade_tip_circular_arc_radius'],
|
||||||
|
'inscribed_circle_diameter': obj['inscribed_circle_diameter'],
|
||||||
|
'install_aperture_diameter': obj['install_aperture_diameter'],
|
||||||
|
'pitch': obj['pitch'],
|
||||||
|
'chip_breaker_groove': obj['chip_breaker_groove'],
|
||||||
|
'blade_teeth_model': '无' if not obj['bladed_teeth_model'] else obj['bladed_teeth_model'],
|
||||||
|
'blade_blade_number': obj['blade_blade_number'],
|
||||||
|
'cutting_depth': obj['cutting_depth'],
|
||||||
|
'blade_width': obj['blade_width'],
|
||||||
|
'main_included_angle': obj['main_included_angle'],
|
||||||
|
'top_angle': obj['top_angle'],
|
||||||
|
'blade_tip_dip_angle': obj['blade_tip_dip_angle'],
|
||||||
|
'side_cutting_edge_angle': obj['side_cutting_edge_angle'],
|
||||||
|
'thread_model': '无' if not obj['thread_model'] else obj['thread_model'],
|
||||||
|
'thread_num': obj['thread_num'],
|
||||||
|
'blade_tip_height_tolerance': obj['blade_tip_height_tolerance'],
|
||||||
|
'inscribed_circle_tolerance': obj['inscribed_circle_tolerance'],
|
||||||
|
'thickness_tolerance': obj['thickness_tolerance'],
|
||||||
|
})
|
||||||
|
return blade_basic_param_str
|
||||||
|
|
||||||
|
def _json_cutter_arbor_basic_param(self, obj):
|
||||||
|
cutter_arbor_basic_param_str = (0, '', {
|
||||||
|
'name': obj['name'],
|
||||||
|
'cutting_tool_type': obj['cutting_tool_type'],
|
||||||
|
'height': obj['height'],
|
||||||
|
'width': obj['width'],
|
||||||
|
'total_length': obj['total_length'],
|
||||||
|
'knife_head_height': obj['knife_head_height'],
|
||||||
|
'knife_head_width': obj['knife_head_width'],
|
||||||
|
'knife_head_length': obj['knife_head_length'],
|
||||||
|
'cutter_arbor_diameter': obj['cutter_arbor_diameter'],
|
||||||
|
'main_included_angle': obj['main_included_angle'],
|
||||||
|
'relief_angle': obj['relief_angle'],
|
||||||
|
'cutting_depth': obj['cutting_depth'],
|
||||||
|
'min_machining_aperture': obj['min_machining_aperture'],
|
||||||
|
'install_blade_tip_num': obj['install_blade_tip_num'],
|
||||||
|
'cutting_blade_model': obj['cutting_blade_model'],
|
||||||
|
'is_cooling_hole': obj['is_cooling_hole'],
|
||||||
|
'locating_slot_code': obj['locating_slot_code'],
|
||||||
|
'installing_structure': obj['installing_structure'],
|
||||||
|
'blade_ids': [(6, 0, [])] if not obj.get('blade_codes') else self.evn['sf.cutting_tool.standard.library']._get_ids(
|
||||||
|
obj['blade_codes']),
|
||||||
|
'tool_shim': obj['tool_shim'],
|
||||||
|
'cotter_pin': obj['cotter_pin'],
|
||||||
|
'pressing_plate': obj['pressing_plate'],
|
||||||
|
'screw': obj['screw'],
|
||||||
|
'spanner': obj['spanner'],
|
||||||
|
})
|
||||||
|
return cutter_arbor_basic_param_str
|
||||||
|
|
||||||
|
def _json_cutter_head_basic_param(self, obj):
|
||||||
|
cutter_head_basic_param_str = (0, '', {
|
||||||
|
'name': obj['name'],
|
||||||
|
'cutting_tool_type': obj['cutting_tool_type'],
|
||||||
|
'install_blade_tip_num': obj['install_blade_tip_num'],
|
||||||
|
'blade_diameter': obj['blade_diameter'],
|
||||||
|
'cutter_head_diameter': obj['cutter_head_diameter'],
|
||||||
|
'interface_diameter': obj['interface_diameter'],
|
||||||
|
'total_length': obj['total_length'],
|
||||||
|
'blade_length': obj['blade_length'],
|
||||||
|
'cutting_depth': obj['cutting_depth'],
|
||||||
|
'main_included_angle': obj['main_included_angle'],
|
||||||
|
'installing_structure': obj['installing_structure'],
|
||||||
|
'blade_ids': [(6, 0, [])] if not obj.get('blade_codes') else self.evn['sf.cutting_tool.standard.library']._get_ids(
|
||||||
|
obj['blade_codes']),
|
||||||
|
'screw': obj['screw'],
|
||||||
|
'spanner': obj['spanner'],
|
||||||
|
'cutting_blade_model': obj['cutting_blade_model'],
|
||||||
|
'is_cooling_hole': obj['is_cooling_hole'],
|
||||||
|
'locating_slot_code': obj['locating_slot_code'],
|
||||||
|
})
|
||||||
|
return cutter_head_basic_param_str
|
||||||
|
|
||||||
|
def _json_knife_handle_basic_param(self, obj):
|
||||||
|
knife_handle_basic_param_str = (0, '', {
|
||||||
|
'name': obj['name'],
|
||||||
|
'cutting_tool_type': obj['cutting_tool_type'],
|
||||||
|
'total_length': obj['total_length'],
|
||||||
|
'flange_shank_length': obj['flange_shank_length'],
|
||||||
|
'handle_external_diameter': obj['handle_external_diameter'],
|
||||||
|
'handle_inside_diameter': obj['handle_inside_diameter'],
|
||||||
|
'min_clamping_diameter': obj['min_clamping_diameter'],
|
||||||
|
'max_clamping_diameter': obj['max_clamping_diameter'],
|
||||||
|
'clamping_mode': obj['clamping_mode'],
|
||||||
|
'max_load_capacity': obj['max_load_capacity'],
|
||||||
|
'taper': obj['taper'],
|
||||||
|
'tool_changing_time': obj['tool_changing_time'],
|
||||||
|
'standard_rotate_speed': obj['standard_rotate_speed'],
|
||||||
|
'max_rotate_speed': obj['max_rotate_speed'],
|
||||||
|
'diameter_slip_accuracy': obj['diameter_slip_accuracy'],
|
||||||
|
'cooling_model': obj['cooling_model'],
|
||||||
|
'is_rough_machining': obj['is_rough_machining'],
|
||||||
|
'is_finish_machining': obj['is_finish_machining'],
|
||||||
|
'is_quick_cutting': obj['is_quick_cutting'],
|
||||||
|
'is_drill_hole': obj['is_drill_hole'],
|
||||||
|
'is_safe_lock': obj['is_safe_lock'],
|
||||||
|
'screw': obj['screw'],
|
||||||
|
'spanner': obj['spanner'],
|
||||||
|
})
|
||||||
|
return knife_handle_basic_param_str
|
||||||
|
|
||||||
|
def _json_chuck_basic_param(self, obj):
|
||||||
|
chuck_basic_param_str = (0, '', {
|
||||||
|
'name': obj['name'],
|
||||||
|
'cutting_tool_type': obj['cutting_tool_type'],
|
||||||
|
'er_size_model': obj['er_size_model'],
|
||||||
|
'min_clamping_diameter': obj['min_clamping_diameter'],
|
||||||
|
'max_clamping_diameter': obj['max_clamping_diameter'],
|
||||||
|
'outer_diameter': obj['outer_diameter'],
|
||||||
|
'inner_diameter': obj['inner_diameter'],
|
||||||
|
'run_out_accuracy': obj['run_out_accuracy'],
|
||||||
|
'total_length': obj['total_length'],
|
||||||
|
'taper': obj['taper'],
|
||||||
|
'run_out_accuracy': obj['run_out_accuracy'],
|
||||||
|
'top_diameter': obj['top_diameter'],
|
||||||
|
'weight': obj['weight'],
|
||||||
|
'clamping_mode': obj['clamping_mode'],
|
||||||
|
'clamping_length': obj['clamping_length'],
|
||||||
|
'clamping_tolerance': obj['clamping_tolerance'],
|
||||||
|
'max_load_capacity': obj['max_load_capacity'],
|
||||||
|
'handle_ids': [(6, 0, [])] if not obj.get(
|
||||||
|
'handle_codes') else self.evn['sf.cutting_tool.standard.library']._get_ids(obj['handle_codes']),
|
||||||
|
'cooling_jacket': obj['cooling_jacket'],
|
||||||
|
})
|
||||||
|
return chuck_basic_param_str
|
||||||
|
|
||||||
|
|
||||||
|
class CuttingSpeed(models.Model):
|
||||||
|
_name = 'sf.cutting.speed'
|
||||||
|
_description = '切削速度Vc'
|
||||||
|
|
||||||
|
product_template_id = fields.Many2one('product.template')
|
||||||
|
standard_library_id = fields.Many2one('sf.cutting_tool.standard.library', string='标准库')
|
||||||
|
execution_standard_id = fields.Many2one('sf.international.standards', string='执行标准', store=True)
|
||||||
|
material_code = fields.Char('材料代号')
|
||||||
|
material_id = fields.Many2one('sf.materials.model', '材料名称',
|
||||||
|
domain="[('standards_id', '=', execution_standard_id)]")
|
||||||
|
slope_milling_angle = fields.Integer('坡铣角度(°)')
|
||||||
|
material_grade = fields.Char('材料牌号')
|
||||||
|
tensile_strength = fields.Char('拉伸强度 (N/mm²)')
|
||||||
|
hardness = fields.Float('硬度(HRC)')
|
||||||
|
cutting_speed_n1 = fields.Char('径向切宽 ae=100%D1 ap=1*D1 切削速度Vc')
|
||||||
|
cutting_speed_n2 = fields.Char('径向切宽 ae=50%D1 ap=1.5*D1 切削速度Vc')
|
||||||
|
cutting_speed_n3 = fields.Char('径向切宽 ae=25%D1 ap=L1max 切削速度Vc')
|
||||||
|
cutting_speed_n4 = fields.Char('径向切宽 ae=15%D1 ap=L1max 切削速度Vc')
|
||||||
|
cutting_speed_n5 = fields.Char('径向切宽 ae=5%D1 ap=L1max 切削速度Vc')
|
||||||
|
rough_machining = fields.Char('粗加工 Vc(m/min)')
|
||||||
|
precision_machining = fields.Char('精加工 Vc(m/min)')
|
||||||
|
application = fields.Selection([('主应用', '主应用'), ('次应用', '次应用')], '主/次应用')
|
||||||
|
|
||||||
|
def _json_cutting_speed(self, obj):
|
||||||
|
cutting_speed_str = (0, '', {
|
||||||
|
'execution_standard_id': self.env['sf.international.standards'].search(
|
||||||
|
[('code', '=', obj['execution_standard_code'])]).id,
|
||||||
|
'material_code': obj['material_code'],
|
||||||
|
'material_id': self.env['sf.materials.model'].search([('materials_no', '=', obj['material_name_code'])]).id,
|
||||||
|
'material_grade': obj['material_grade'],
|
||||||
|
'tensile_strength': obj['tensile_strength'],
|
||||||
|
'hardness': obj['hardness'],
|
||||||
|
'cutting_speed_n1': obj['cutting_speed_n1'],
|
||||||
|
'cutting_speed_n2': obj['cutting_speed_n2'],
|
||||||
|
'cutting_speed_n3': obj['cutting_speed_n3'],
|
||||||
|
'cutting_speed_n4': obj['cutting_speed_n4'],
|
||||||
|
'cutting_speed_n5': obj['cutting_speed_n5'],
|
||||||
|
'rough_machining': obj['rough_machining'],
|
||||||
|
'precision_machining': obj['precision_machining'],
|
||||||
|
'application': obj['application'],
|
||||||
|
})
|
||||||
|
return cutting_speed_str
|
||||||
|
|
||||||
|
|
||||||
|
class FeedPerTooth(models.Model):
|
||||||
|
_name = 'sf.feed.per.tooth'
|
||||||
|
_description = '每齿走刀量fz'
|
||||||
|
_order = 'machining_method desc, blade_diameter, materials_type_id'
|
||||||
|
|
||||||
|
product_template_id = fields.Many2one('product.template')
|
||||||
|
standard_library_id = fields.Many2one('sf.cutting_tool.standard.library', string='标准库')
|
||||||
|
cutting_speed = fields.Char('径向切宽 ae(mm)')
|
||||||
|
machining_method = fields.Selection([('直铣', '直铣'), ('坡铣', '坡铣')], string='加工方式')
|
||||||
|
materials_type_id = fields.Many2one('sf.materials.model', string='材料型号')
|
||||||
|
blade_diameter = fields.Char('刃部直径(mm)', readonly=True)
|
||||||
|
feed_per_tooth = fields.Char('每齿走刀量 (mm/z)')
|
||||||
|
|
||||||
|
def _json_feed_per_tooth(self, obj):
|
||||||
|
feed_per_tooth_str = (0, '', {
|
||||||
|
'cutting_speed': obj['cutting_speed'],
|
||||||
|
'blade_diameter': obj['blade_diameter'],
|
||||||
|
'feed_per_tooth': obj['feed_per_tooth'],
|
||||||
|
})
|
||||||
|
return feed_per_tooth_str
|
||||||
|
|
||||||
|
def _json_feed_per_tooth_2(self, obj):
|
||||||
|
feed_per_tooth_2_str = (0, '', {
|
||||||
|
'machining_method': obj['machining_method'],
|
||||||
|
'materials_type_id': self.env['sf.materials.model'].search(
|
||||||
|
[('materials_no', '=', obj['materials_type_code'])]).id,
|
||||||
|
'blade_diameter': obj['blade_diameter'],
|
||||||
|
'feed_per_tooth': obj['feed_per_tooth'],
|
||||||
|
})
|
||||||
|
return feed_per_tooth_2_str
|
||||||
|
|
||||||
|
def _json_feed_per_tooth_3(self, obj):
|
||||||
|
feed_per_tooth_3_str = (0, '', {
|
||||||
|
'cutting_speed': obj['cutting_speed'],
|
||||||
|
'feed_per_tooth': obj['feed_per_tooth'],
|
||||||
|
})
|
||||||
|
return feed_per_tooth_3_str
|
||||||
|
|
||||||
|
def _json_feed_per_tooth_4(self, obj):
|
||||||
|
feed_per_tooth_4_str = (0, '', {
|
||||||
|
'machining_method': obj['machining_method'],
|
||||||
|
'materials_type_id': self.env['sf.materials.model'].search(
|
||||||
|
[('materials_no', '=', obj['materials_type_code'])]).id,
|
||||||
|
'feed_per_tooth': obj['feed_per_tooth'],
|
||||||
|
})
|
||||||
|
return feed_per_tooth_4_str
|
||||||
|
|
||||||
|
# @api.depends('product_template_id')
|
||||||
|
# def _compute_product_template_id(self):
|
||||||
|
# if self.product_template_id is not None:
|
||||||
|
# self.blade_diameter = self.product_template_id.cutting_tool_blade_diameter
|
||||||
@@ -15,7 +15,6 @@ access_sf_production_process_category,sf_production_process_category,model_sf_pr
|
|||||||
access_sf_machine_tool_category,sf_machine_tool_category,model_sf_machine_tool_category,base.group_user,1,1,1,1
|
access_sf_machine_tool_category,sf_machine_tool_category,model_sf_machine_tool_category,base.group_user,1,1,1,1
|
||||||
access_sf_cutting_tool_material,sf_cutting_tool_material,model_sf_cutting_tool_material,base.group_user,1,1,1,1
|
access_sf_cutting_tool_material,sf_cutting_tool_material,model_sf_cutting_tool_material,base.group_user,1,1,1,1
|
||||||
access_sf_cutting_tool_type,sf_cutting_tool_type,model_sf_cutting_tool_type,base.group_user,1,1,1,1
|
access_sf_cutting_tool_type,sf_cutting_tool_type,model_sf_cutting_tool_type,base.group_user,1,1,1,1
|
||||||
access_sf_cutting_tool_model,sf_cutting_tool_model,model_sf_cutting_tool_model,base.group_user,1,1,1,1
|
|
||||||
access_sf_functional_cutting_tool,sf_functional_cutting_tool,model_sf_functional_cutting_tool,base.group_user,1,1,1,1
|
access_sf_functional_cutting_tool,sf_functional_cutting_tool,model_sf_functional_cutting_tool,base.group_user,1,1,1,1
|
||||||
access_sf_functional_cutting_tool_model,sf_functional_cutting_tool_model,model_sf_functional_cutting_tool_model,base.group_user,1,1,1,1
|
access_sf_functional_cutting_tool_model,sf_functional_cutting_tool_model,model_sf_functional_cutting_tool_model,base.group_user,1,1,1,1
|
||||||
access_sf_fixture_material,sf_fixture_material,model_sf_fixture_material,base.group_user,1,1,1,1
|
access_sf_fixture_material,sf_fixture_material,model_sf_fixture_material,base.group_user,1,1,1,1
|
||||||
@@ -26,6 +25,12 @@ access_sf_functional_fixture,sf_functional_fixture,model_sf_functional_fixture,b
|
|||||||
access_sf_sync_common,sf_sync_common,model_sf_sync_common,base.group_user,1,1,1,1
|
access_sf_sync_common,sf_sync_common,model_sf_sync_common,base.group_user,1,1,1,1
|
||||||
access_sf_international_standards,sf_international_standards,model_sf_international_standards,base.group_user,1,1,1,1
|
access_sf_international_standards,sf_international_standards,model_sf_international_standards,base.group_user,1,1,1,1
|
||||||
access_material_apply,material_apply,model_material_apply,base.group_user,1,1,1,1
|
access_material_apply,material_apply,model_material_apply,base.group_user,1,1,1,1
|
||||||
|
access_sf_cutting_tool_standard_library,sf_cutting_tool_standard_library,model_sf_cutting_tool_standard_library,base.group_user,1,1,1,1
|
||||||
|
access_sf_tool_materials_basic_parameters,sf_tool_materials_basic_parameters,model_sf_tool_materials_basic_parameters,base.group_user,1,1,1,1
|
||||||
|
access_sf_cutting_speed,sf_cutting_speed,model_sf_cutting_speed,base.group_user,1,1,1,1
|
||||||
|
access_sf_feed_per_tooth,sf_feed_per_tooth,model_sf_feed_per_tooth,base.group_user,1,1,1,1
|
||||||
|
access_maintenance_equipment_image,maintenance_equipment_image,model_maintenance_equipment_image,base.group_user,1,1,1,1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
|
@@ -162,3 +162,24 @@ td.o_required_modifier {
|
|||||||
justify-content: flex-start !important;
|
justify-content: flex-start !important;
|
||||||
align-items: center !important;
|
align-items: center !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//用于label外的div
|
||||||
|
.type_label {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button_width button {
|
||||||
|
width:11rem;
|
||||||
|
margin-top: -9px;
|
||||||
|
height: 2.5rem;
|
||||||
|
line-height: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button_width{
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.o_field_widget.o_field_many2one {
|
||||||
|
flex-direction: row !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,234 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<odoo>
|
|
||||||
<data>
|
|
||||||
<!-- action -->
|
|
||||||
<record id="action_sf_cutting_tool" model="ir.actions.act_window">
|
|
||||||
<field name="name">整体式刀具型号</field>
|
|
||||||
<field name="type">ir.actions.act_window</field>
|
|
||||||
<field name="res_model">sf.integral.cutting.tool</field>
|
|
||||||
<!-- <field name="view_type">form</field> -->
|
|
||||||
<field name="view_mode">tree,form</field>
|
|
||||||
</record>
|
|
||||||
<!-- 功能刀具action -->
|
|
||||||
<record id="action_sf_functional_cutting_tool" model="ir.actions.act_window">
|
|
||||||
<field name="name">功能刀具</field>
|
|
||||||
<field name="type">ir.actions.act_window</field>
|
|
||||||
<field name="res_model">sf.functional.cutting.tool</field>
|
|
||||||
<field name="view_mode">tree,form</field>
|
|
||||||
</record>
|
|
||||||
<!-- 刀片action -->
|
|
||||||
<record id="action_sf_cutting_tool_blade" model="ir.actions.act_window">
|
|
||||||
<field name="name">刀片型号</field>
|
|
||||||
<field name="type">ir.actions.act_window</field>
|
|
||||||
<field name="res_model">sf.blade</field>
|
|
||||||
<field name="view_mode">tree,form</field>
|
|
||||||
</record>
|
|
||||||
<!-- 刀杆action -->
|
|
||||||
<record id="action_sf_cutting_tool_rod" model="ir.actions.act_window">
|
|
||||||
<field name="name">刀杆型号</field>
|
|
||||||
<field name="type">ir.actions.act_window</field>
|
|
||||||
<field name="res_model">sf.cutter.bar</field>
|
|
||||||
<field name="view_mode">tree,form</field>
|
|
||||||
</record>
|
|
||||||
<!-- 刀盘action -->
|
|
||||||
<record id="action_sf_cutting_tool_disc" model="ir.actions.act_window">
|
|
||||||
<field name="name">刀盘型号</field>
|
|
||||||
<field name="type">ir.actions.act_window</field>
|
|
||||||
<field name="res_model">sf.cutter.pad</field>
|
|
||||||
<field name="view_mode">tree,form</field>
|
|
||||||
</record>
|
|
||||||
<!-- 刀柄action -->
|
|
||||||
<record id="action_sf_cutting_tool_handle" model="ir.actions.act_window">
|
|
||||||
<field name="name">刀柄型号</field>
|
|
||||||
<field name="type">ir.actions.act_window</field>
|
|
||||||
<field name="res_model">sf.handle</field>
|
|
||||||
<field name="view_mode">tree,form</field>
|
|
||||||
</record>
|
|
||||||
<!-- 夹头action -->
|
|
||||||
<record id="action_sf_cutting_tool_clamp_head" model="ir.actions.act_window">
|
|
||||||
<field name="name">夹头型号</field>
|
|
||||||
<field name="type">ir.actions.act_window</field>
|
|
||||||
<field name="res_model">sf.chuck</field>
|
|
||||||
<field name="view_mode">tree,form</field>
|
|
||||||
</record>
|
|
||||||
<!-- 功能刀具类型action -->
|
|
||||||
<record id="action_sf_functional_cutting_tool_type" model="ir.actions.act_window">
|
|
||||||
<field name="name">功能刀具类型</field>
|
|
||||||
<field name="type">ir.actions.act_window</field>
|
|
||||||
<field name="res_model">sf.functional.cutting.tool.model</field>
|
|
||||||
<field name="view_mode">tree,form</field>
|
|
||||||
</record>
|
|
||||||
<!-- 整体式刀具类型action -->
|
|
||||||
<record id="action_sf_integral_cutting_tool_type" model="ir.actions.act_window">
|
|
||||||
<field name="name">整体式刀具类型</field>
|
|
||||||
<field name="type">ir.actions.act_window</field>
|
|
||||||
<field name="res_model">sf.integral.cutting.tool.model</field>
|
|
||||||
<field name="view_mode">tree,form</field>
|
|
||||||
</record>
|
|
||||||
<!-- 刀片类型action -->
|
|
||||||
<record id="action_sf_cutting_tool_blade_type" model="ir.actions.act_window">
|
|
||||||
<field name="name">刀片类型</field>
|
|
||||||
<field name="type">ir.actions.act_window</field>
|
|
||||||
<field name="res_model">sf.blade.model</field>
|
|
||||||
<field name="view_mode">tree,form</field>
|
|
||||||
</record>
|
|
||||||
<!-- 刀杆类型action -->
|
|
||||||
<record id="action_sf_cutting_tool_rod_type" model="ir.actions.act_window">
|
|
||||||
<field name="name">刀杆类型</field>
|
|
||||||
<field name="type">ir.actions.act_window</field>
|
|
||||||
<field name="res_model">sf.cutter.bar.model</field>
|
|
||||||
<field name="view_mode">tree,form</field>
|
|
||||||
</record>
|
|
||||||
<!-- 刀盘类型action -->
|
|
||||||
<record id="action_sf_cutting_tool_disc_type" model="ir.actions.act_window">
|
|
||||||
<field name="name">刀盘类型</field>
|
|
||||||
<field name="type">ir.actions.act_window</field>
|
|
||||||
<field name="res_model">sf.cutter.pad.model</field>
|
|
||||||
<field name="view_mode">tree,form</field>
|
|
||||||
</record>
|
|
||||||
<!-- 刀柄类型action -->
|
|
||||||
<record id="action_sf_cutting_tool_handle_type" model="ir.actions.act_window">
|
|
||||||
<field name="name">刀柄类型</field>
|
|
||||||
<field name="type">ir.actions.act_window</field>
|
|
||||||
<field name="res_model">sf.handle.model</field>
|
|
||||||
<field name="view_mode">tree,form</field>
|
|
||||||
</record>
|
|
||||||
<!-- 夹头类型action -->
|
|
||||||
<record id="action_sf_cutting_tool_clamp_head_type" model="ir.actions.act_window">
|
|
||||||
<field name="name">夹头类型</field>
|
|
||||||
<field name="type">ir.actions.act_window</field>
|
|
||||||
<field name="res_model">sf.chuck.model</field>
|
|
||||||
<field name="view_mode">tree,form</field>
|
|
||||||
</record>
|
|
||||||
<!-- 刀具物料action -->
|
|
||||||
<record id="action_sf_cutting_tool_material" model="ir.actions.act_window">
|
|
||||||
<field name="name">刀具物料</field>
|
|
||||||
<field name="type">ir.actions.act_window</field>
|
|
||||||
<field name="res_model">sf.cutting.tool.material</field>
|
|
||||||
<field name="view_mode">tree,form</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- 功能刀具 -->
|
|
||||||
<!-- <menuitem-->
|
|
||||||
<!-- id="menu_sf_functional_cutting_tool"-->
|
|
||||||
<!-- parent="menu_sf_base"-->
|
|
||||||
<!-- name="功能刀具"-->
|
|
||||||
<!-- sequence="3"-->
|
|
||||||
<!-- action="action_sf_functional_cutting_tool"-->
|
|
||||||
<!-- />-->
|
|
||||||
<!-- 刀具物料 -->
|
|
||||||
<menuitem
|
|
||||||
id="menu_sf_cutting_tool_material"
|
|
||||||
parent="menu_sf_base"
|
|
||||||
name="刀具物料"
|
|
||||||
sequence="1"
|
|
||||||
action="action_sf_cutting_tool_material"
|
|
||||||
/>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 整体式刀具 -->
|
|
||||||
<menuitem
|
|
||||||
id="menu_sf_integral_cutting_tool"
|
|
||||||
parent="menu_sf_base"
|
|
||||||
name="整体式刀具型号"
|
|
||||||
sequence="9"
|
|
||||||
action="action_sf_cutting_tool"
|
|
||||||
/>
|
|
||||||
<!-- 刀片 -->
|
|
||||||
<menuitem
|
|
||||||
id="menu_sf_cutting_tool_blade"
|
|
||||||
parent="menu_sf_base"
|
|
||||||
name="刀片型号"
|
|
||||||
sequence="12"
|
|
||||||
action="action_sf_cutting_tool_blade"
|
|
||||||
/>
|
|
||||||
<!-- 刀杆 -->
|
|
||||||
<menuitem
|
|
||||||
id="menu_sf_cutting_tool_rod"
|
|
||||||
parent="menu_sf_base"
|
|
||||||
name="刀杆型号"
|
|
||||||
sequence="16"
|
|
||||||
action="action_sf_cutting_tool_rod"
|
|
||||||
/>
|
|
||||||
<!-- 刀盘 -->
|
|
||||||
<menuitem
|
|
||||||
id="menu_sf_cutting_tool_disc"
|
|
||||||
parent="menu_sf_base"
|
|
||||||
name="刀盘型号"
|
|
||||||
sequence="20"
|
|
||||||
action="action_sf_cutting_tool_disc"
|
|
||||||
/>
|
|
||||||
<!-- 刀柄 -->
|
|
||||||
<menuitem
|
|
||||||
id="menu_sf_cutting_tool_handle"
|
|
||||||
parent="menu_sf_base"
|
|
||||||
name="刀柄型号"
|
|
||||||
sequence="28"
|
|
||||||
action="action_sf_cutting_tool_handle"
|
|
||||||
/>
|
|
||||||
<!-- 夹头 -->
|
|
||||||
<menuitem
|
|
||||||
id="menu_sf_cutting_tool_clamp_head"
|
|
||||||
parent="menu_sf_base"
|
|
||||||
name="夹头型号"
|
|
||||||
sequence="36"
|
|
||||||
action="action_sf_cutting_tool_clamp_head"
|
|
||||||
/>
|
|
||||||
<!-- 功能刀具类型 -->
|
|
||||||
<menuitem
|
|
||||||
id="menu_sf_functional_cutting_tool_type"
|
|
||||||
parent="menu_sf_base"
|
|
||||||
name="功能刀具类型"
|
|
||||||
sequence="40"
|
|
||||||
action="action_sf_functional_cutting_tool_type"
|
|
||||||
/>
|
|
||||||
<!-- 整体式刀具类型 -->
|
|
||||||
<menuitem
|
|
||||||
id="menu_sf_integral_cutting_tool_type"
|
|
||||||
parent="menu_sf_base"
|
|
||||||
name="整体式刀具类型"
|
|
||||||
sequence="44"
|
|
||||||
action="action_sf_integral_cutting_tool_type"
|
|
||||||
/>
|
|
||||||
<!-- 刀片类型 -->
|
|
||||||
<menuitem
|
|
||||||
id="menu_sf_cutting_tool_blade_type"
|
|
||||||
parent="menu_sf_base"
|
|
||||||
name="刀片类型"
|
|
||||||
sequence="48"
|
|
||||||
action="action_sf_cutting_tool_blade_type"
|
|
||||||
/>
|
|
||||||
<!-- 刀杆类型 -->
|
|
||||||
<menuitem
|
|
||||||
id="menu_sf_cutting_tool_rod_type"
|
|
||||||
parent="menu_sf_base"
|
|
||||||
name="刀杆类型"
|
|
||||||
sequence="52"
|
|
||||||
action="action_sf_cutting_tool_rod_type"
|
|
||||||
/>
|
|
||||||
<!-- 刀盘类型 -->
|
|
||||||
<menuitem
|
|
||||||
id="menu_sf_cutting_tool_disc_type"
|
|
||||||
parent="menu_sf_base"
|
|
||||||
name="刀盘类型"
|
|
||||||
sequence="56"
|
|
||||||
action="action_sf_cutting_tool_disc_type"
|
|
||||||
/>
|
|
||||||
<!-- 刀柄类型 -->
|
|
||||||
<menuitem
|
|
||||||
id="menu_sf_cutting_tool_handle_type"
|
|
||||||
parent="menu_sf_base"
|
|
||||||
name="刀柄类型"
|
|
||||||
sequence="60"
|
|
||||||
action="action_sf_cutting_tool_handle_type"
|
|
||||||
/>
|
|
||||||
<!-- 夹头类型 -->
|
|
||||||
<menuitem
|
|
||||||
id="menu_sf_cutting_tool_clamp_head_type"
|
|
||||||
parent="menu_sf_base"
|
|
||||||
name="夹头类型"
|
|
||||||
sequence="64"
|
|
||||||
action="action_sf_cutting_tool_clamp_head_type"
|
|
||||||
/>
|
|
||||||
</data>
|
|
||||||
</odoo>
|
|
||||||
@@ -1,849 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<odoo>
|
|
||||||
<data>
|
|
||||||
<!-- 刀具物料tree view -->
|
|
||||||
<record id="view_cutting_tool_material_tree" model="ir.ui.view">
|
|
||||||
<field name="name">sf.cutting.tool.material.tree</field>
|
|
||||||
<field name="model">sf.cutting.tool.material</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<tree string="刀具物料">
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="name" string="名称"/>
|
|
||||||
<field name="remark"/>
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
<!-- 刀具物料form view -->
|
|
||||||
<record id="view_cutting_tool_material_form" model="ir.ui.view">
|
|
||||||
<field name="name">sf.cutting.tool.material.form</field>
|
|
||||||
<field name="model">sf.cutting.tool.material</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form string="刀具物料">
|
|
||||||
<sheet>
|
|
||||||
<group col='1'>
|
|
||||||
<group string='基本信息'>
|
|
||||||
<group>
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="name" string="名称"/>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="remark"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ================================================刀具物料视图================================================ -->
|
|
||||||
<record model="ir.ui.view" id="view_cutting_tool_material_search">
|
|
||||||
<field name="name">sf.cutting.tool.material.search</field>
|
|
||||||
<field name="model">sf.cutting.tool.material</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)]"/>
|
|
||||||
|
|
||||||
</search>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
<!-- 功能刀具tree view -->
|
|
||||||
<record id="view_functional_cutting_tool_tree" model="ir.ui.view">
|
|
||||||
<field name="name">sf.functional.cutting.tool.tree</field>
|
|
||||||
<field name="model">sf.functional.cutting.tool</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<tree string="功能刀具">
|
|
||||||
<field name="code" />
|
|
||||||
<field name="name" />
|
|
||||||
<field name="functional_model_number" />
|
|
||||||
<field name="integral_model_number"/>
|
|
||||||
<field name="blade_model_number" optional="hide"/>
|
|
||||||
<field name="cutterbar_model_number" optional="hide"/>
|
|
||||||
<field name="cutterpad_model_number" optional="hide"/>
|
|
||||||
<field name="handle_model_number" optional="hide"/>
|
|
||||||
<field name="chuck_model_number" optional="hide"/>
|
|
||||||
<field name="diameter" optional="show"/>
|
|
||||||
<field name="tool_grade" optional="show"/>
|
|
||||||
<field name="machining_accuracy" optional="hide"/>
|
|
||||||
<field name="tool_length" optional="show"/>
|
|
||||||
<field name="blade_number" optional="show"/>
|
|
||||||
<field name="integral_blade_length" optional="show"/>
|
|
||||||
<field name="effective_blade_length" optional="show"/>
|
|
||||||
<field name="max_life" optional="show"/>
|
|
||||||
<field name="is_standard" optional="show"/>
|
|
||||||
<field name="applicable_range" optional="show"/>
|
|
||||||
<field name="image" widget='image' optional="show"/>
|
|
||||||
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
<!-- form view -->
|
|
||||||
<record id="view_functional_cutting_tool_form" model="ir.ui.view">
|
|
||||||
<field name="name">sf.functional.cutting.tool.form</field>
|
|
||||||
<field name="model">sf.functional.cutting.tool</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form string="功能刀具">
|
|
||||||
<sheet>
|
|
||||||
<group col='1'>
|
|
||||||
<group string='基本信息'>
|
|
||||||
<group>
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="functional_model_number"/>
|
|
||||||
<field name="integral_model_number"/>
|
|
||||||
<field name="blade_model_number"/>
|
|
||||||
<field name="cutterbar_model_number"/>
|
|
||||||
<field name="cutterpad_model_number"/>
|
|
||||||
<field name="handle_model_number"/>
|
|
||||||
<field name="chuck_model_number"/>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="image" nolabel="1" widget="image"/>
|
|
||||||
</group>
|
|
||||||
|
|
||||||
</group>
|
|
||||||
<group string='参数信息'>
|
|
||||||
<group>
|
|
||||||
<field name="diameter"/>
|
|
||||||
<field name="tool_grade"/>
|
|
||||||
<field name="machining_accuracy"/>
|
|
||||||
<field name="tool_length"/>
|
|
||||||
<field name="blade_number"/>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="integral_blade_length"/>
|
|
||||||
<field name="effective_blade_length"/>
|
|
||||||
<field name="max_life"/>
|
|
||||||
<field name="is_standard"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
<group string='其他信息'>
|
|
||||||
<group>
|
|
||||||
<field name="applicable_range"/>
|
|
||||||
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
<!-- 功能刀具search view -->
|
|
||||||
<record model="ir.ui.view" id="view_sf_functional_cutting_tool_search">
|
|
||||||
<field name="name">sf.functional.cutting.tool.search</field>
|
|
||||||
<field name="model">sf.functional.cutting.tool</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)]"/>
|
|
||||||
</search>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- 整体式刀具tree view -->
|
|
||||||
<record id="view_integral_cutting_tool_tree" model="ir.ui.view">
|
|
||||||
<field name="name">sf.integral.cutting.tool.tree</field>
|
|
||||||
<field name="model">sf.integral.cutting.tool</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<tree string="整体式刀具">
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="integral_model_number"/>
|
|
||||||
<field name="brand"/>
|
|
||||||
<field name="image" widget='image'/>
|
|
||||||
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- form view -->
|
|
||||||
<record id="view_integral_cutting_tool_form" model="ir.ui.view">
|
|
||||||
<field name="name">sf.integral.cutting.tool.form</field>
|
|
||||||
<field name="model">sf.integral.cutting.tool</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form string="整体式刀具">
|
|
||||||
<sheet>
|
|
||||||
<group col='1'>
|
|
||||||
<group string='基本信息'>
|
|
||||||
<group>
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="integral_model_number"/>
|
|
||||||
<field name="brand"/>
|
|
||||||
<field name="cutting_tool_material"/>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="image" nolabel="1" widget="image"/>
|
|
||||||
</group>
|
|
||||||
|
|
||||||
</group>
|
|
||||||
<group string='参数信息'>
|
|
||||||
<group>
|
|
||||||
<field name="total_length"/>
|
|
||||||
<field name="shank_length"/>
|
|
||||||
<field name="blade_length"/>
|
|
||||||
<field name="diameter"/>
|
|
||||||
<field name="blade_number"/>
|
|
||||||
<field name="chuck_model" widget="many2many_tags" options="{'no_create': True, 'no_quick_create': True}"/>
|
|
||||||
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="front_angle"/>
|
|
||||||
<field name="rear_angle"/>
|
|
||||||
<field name="main_included_angle"/>
|
|
||||||
<field name="material_model"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
<group string='其他信息'>
|
|
||||||
<group>
|
|
||||||
<field name="nut"/>
|
|
||||||
<field name="scope"/>
|
|
||||||
|
|
||||||
</group>
|
|
||||||
|
|
||||||
</group>
|
|
||||||
|
|
||||||
</group>
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
<!-- 整体式刀具search view -->
|
|
||||||
<record model="ir.ui.view" id="view_integral_cutting_tool_search">
|
|
||||||
<field name="name">sf.integral.cutting.tool.search</field>
|
|
||||||
<field name="model">sf.integral.cutting.tool</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)]"/>
|
|
||||||
</search>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
<!-- 刀片tree -->
|
|
||||||
<record id="view_blade_tree" model="ir.ui.view">
|
|
||||||
<field name="name">sf.blade.tree</field>
|
|
||||||
<field name="model">sf.blade</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<tree string="刀片">
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="blade_model_number"/>
|
|
||||||
<field name="image" widget='image'/>
|
|
||||||
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
<!-- 刀片form -->
|
|
||||||
<record id="view_blade_form" model="ir.ui.view">
|
|
||||||
<field name="name">sf.blade.form</field>
|
|
||||||
<field name="model">sf.blade</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form string="刀片">
|
|
||||||
<sheet>
|
|
||||||
<group col='1'>
|
|
||||||
<group string='基本信息'>
|
|
||||||
<group>
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="blade_model_number"/>
|
|
||||||
<field name="brand" options="{'no_create': True, 'no_quick_create': True}"/>
|
|
||||||
<field name="cutting_tool_material"/>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="image" nolabel="1" widget="image"/>
|
|
||||||
</group>
|
|
||||||
|
|
||||||
</group>
|
|
||||||
<group string='参数信息'>
|
|
||||||
<group>
|
|
||||||
<field name="length"/>
|
|
||||||
<field name="width"/>
|
|
||||||
<field name="height"/>
|
|
||||||
<field name="top_angle"/>
|
|
||||||
<field name="front_angle"/>
|
|
||||||
<field name="cutter_bar" widget="many2many_tags" options="{'no_create': True, 'no_quick_create': True}"/>
|
|
||||||
<field name="cutter_pad" widget="many2many_tags" options="{'no_create': True, 'no_quick_create': True}"/>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="main_included_angle"/>
|
|
||||||
<field name="r_angle"/>
|
|
||||||
<field name="material_model"/>
|
|
||||||
<field name="hardness"/>
|
|
||||||
<field name="radius"/>
|
|
||||||
<field name="rear_angle"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
<group string='其他信息'>
|
|
||||||
<group>
|
|
||||||
<field name="nut"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
<!-- 刀片search view -->
|
|
||||||
<record model="ir.ui.view" id="view_blade_search">
|
|
||||||
<field name="name">sf.blade.search</field>
|
|
||||||
<field name="model">sf.blade</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)]"/>
|
|
||||||
</search>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
<!-- 刀杆tree -->
|
|
||||||
<record id="view_cutter_bar_tree" model="ir.ui.view">
|
|
||||||
<field name="name">sf.cutter.bar.tree</field>
|
|
||||||
<field name="model">sf.cutter.bar</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<tree string="刀杆">
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="cutter_bar_model_number"/>
|
|
||||||
<field name="image" widget='image'/>
|
|
||||||
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
<!-- 刀杆form -->
|
|
||||||
<record id="view_cutter_bar_form" model="ir.ui.view">
|
|
||||||
<field name="name">sf.cutter.bar.form</field>
|
|
||||||
<field name="model">sf.cutter.bar</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form string="刀杆">
|
|
||||||
<sheet>
|
|
||||||
<group col='1'>
|
|
||||||
<group string='基本信息'>
|
|
||||||
<group>
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="cutter_bar_model_number"/>
|
|
||||||
<field name="brand"/>
|
|
||||||
<field name="cutting_tool_material"/>
|
|
||||||
<field name="blade" widget="many2many_tags" options="{'no_create': True, 'no_quick_create': True}"/>
|
|
||||||
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="image" nolabel="1" widget="image"/>
|
|
||||||
</group>
|
|
||||||
|
|
||||||
</group>
|
|
||||||
<group string='参数信息'>
|
|
||||||
<group>
|
|
||||||
<field name="c_diameter"/>
|
|
||||||
<field name="total_length"/>
|
|
||||||
<field name="material_model"/>
|
|
||||||
<field name="blade_number"/>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="d_diameter"/>
|
|
||||||
<field name="radius"/>
|
|
||||||
<field name="accuracy"/>
|
|
||||||
<field name="hardness"/>
|
|
||||||
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
<group string='其他信息'>
|
|
||||||
<group>
|
|
||||||
<field name="wrench"/>
|
|
||||||
<field name="screw"/>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="scope"/>
|
|
||||||
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
<!-- 刀杆search view -->
|
|
||||||
<record model="ir.ui.view" id="view_cutter_bar_search">
|
|
||||||
<field name="name">sf.cutter.bar.search</field>
|
|
||||||
<field name="model">sf.cutter.bar</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)]"/>
|
|
||||||
</search>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- 刀盘tree -->
|
|
||||||
<record id="view_cutter_pad_tree" model="ir.ui.view">
|
|
||||||
<field name="name">sf.cutter.pad.tree</field>
|
|
||||||
<field name="model">sf.cutter.pad</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<tree string="刀盘">
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="cutter_pad_model_number"/>
|
|
||||||
<field name="image" widget='image'/>
|
|
||||||
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
<!-- 刀盘form -->
|
|
||||||
<record id="view_cutter_pad_form" model="ir.ui.view">
|
|
||||||
<field name="name">sf.cutter.pad.form</field>
|
|
||||||
<field name="model">sf.cutter.pad</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form string="刀盘">
|
|
||||||
<sheet>
|
|
||||||
<group col='1'>
|
|
||||||
<group string='基本信息'>
|
|
||||||
<group>
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="cutter_pad_model_number"/>
|
|
||||||
<field name="brand"/>
|
|
||||||
<field name="cutting_tool_material"/>
|
|
||||||
<field name="blade" widget="many2many_tags" options="{'no_create': True, 'no_quick_create': True}"/>
|
|
||||||
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="image" nolabel="1" widget="image"/>
|
|
||||||
</group>
|
|
||||||
|
|
||||||
</group>
|
|
||||||
<group string='参数信息'>
|
|
||||||
<group>
|
|
||||||
<field name="c_diameter"/>
|
|
||||||
<field name="total_length"/>
|
|
||||||
<field name="material_model"/>
|
|
||||||
<field name="blade_number"/>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="d_diameter"/>
|
|
||||||
<field name="radius"/>
|
|
||||||
<field name="accuracy"/>
|
|
||||||
<field name="hardness"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
<group string='其他信息'>
|
|
||||||
<group>
|
|
||||||
<field name="wrench"/>
|
|
||||||
<field name="screw"/>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="scope"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
<!-- 刀盘search view -->
|
|
||||||
<record model="ir.ui.view" id="view_cutter_pad_search">
|
|
||||||
<field name="name">sf.cutter.pad.search</field>
|
|
||||||
<field name="model">sf.cutter.pad</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)]"/>
|
|
||||||
</search>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- 刀柄tree -->
|
|
||||||
<record id="view_cutter_handle_tree" model="ir.ui.view">
|
|
||||||
<field name="name">sf.cutter.handle.tree</field>
|
|
||||||
<field name="model">sf.handle</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<tree string="刀柄">
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="handle_model_number"/>
|
|
||||||
<field name="image" widget='image'/>
|
|
||||||
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
<!-- 刀柄form -->
|
|
||||||
<record id="view_cutter_handle_form" model="ir.ui.view">
|
|
||||||
<field name="name">sf.cutter.handle.form</field>
|
|
||||||
<field name="model">sf.handle</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form string="刀柄">
|
|
||||||
<sheet>
|
|
||||||
<group col='1'>
|
|
||||||
<group string='基本信息'>
|
|
||||||
<group>
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="handle_model_number"/>
|
|
||||||
<field name="brand"/>
|
|
||||||
<field name="cutting_tool_material"/>
|
|
||||||
<field name="chuck_model" widget="many2many_tags" options="{'no_create': True, 'no_quick_create': True}"/>
|
|
||||||
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="image" nolabel="1" widget="image"/>
|
|
||||||
</group>
|
|
||||||
|
|
||||||
</group>
|
|
||||||
<group string='参数信息'>
|
|
||||||
<group>
|
|
||||||
<field name="length"/>
|
|
||||||
<field name="length1"/>
|
|
||||||
<field name="diameter1"/>
|
|
||||||
<field name="weight"/>
|
|
||||||
<field name="material_model"/>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="body_accuracy"/>
|
|
||||||
<field name="clamping_range"/>
|
|
||||||
<field name="detection_accuracy"/>
|
|
||||||
<field name="detection_hardness"/>
|
|
||||||
<field name="standard_speed"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
<group string='其他信息'>
|
|
||||||
<group>
|
|
||||||
<field name="nut"/>
|
|
||||||
</group>
|
|
||||||
<!-- <group> -->
|
|
||||||
<!-- <field name="scope"/> -->
|
|
||||||
<!-- <field name="blade"/> -->
|
|
||||||
<!-- </group> -->
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
<!-- 刀柄search view -->
|
|
||||||
<record model="ir.ui.view" id="view_handle_search">
|
|
||||||
<field name="name">sf.handle.search</field>
|
|
||||||
<field name="model">sf.handle</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)]"/>
|
|
||||||
</search>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- 夹头tree -->
|
|
||||||
<record id="view_cutter_chuck_tree" model="ir.ui.view">
|
|
||||||
<field name="name">sf.cutter.chuck.tree</field>
|
|
||||||
<field name="model">sf.chuck</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<tree string="夹头">
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="chuck_model_number"/>
|
|
||||||
<field name="image" widget='image'/>
|
|
||||||
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
<!-- 夹头form -->
|
|
||||||
<record id="view_cutter_chuck_form" model="ir.ui.view">
|
|
||||||
<field name="name">sf.cutter.chuck.form</field>
|
|
||||||
<field name="model">sf.chuck</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form string="夹头">
|
|
||||||
<sheet>
|
|
||||||
<group col='1'>
|
|
||||||
<group string='基本信息'>
|
|
||||||
<group>
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="chuck_model_number"/>
|
|
||||||
<field name="brand"/>
|
|
||||||
<field name="cutting_tool_material"/>
|
|
||||||
<field name="handle_model" widget="many2many_tags" options="{'no_create': True, 'no_quick_create': True}"/>
|
|
||||||
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="image" nolabel="1" widget="image"/>
|
|
||||||
</group>
|
|
||||||
|
|
||||||
</group>
|
|
||||||
<group string='参数信息'>
|
|
||||||
<group>
|
|
||||||
<field name="accuracy"/>
|
|
||||||
<field name="diameter"/>
|
|
||||||
<field name="inner_diameter"/>
|
|
||||||
<field name="height"/>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="material_model"/>
|
|
||||||
<field name="clamping_range"/>
|
|
||||||
<field name="feature"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
<group string='其他信息'>
|
|
||||||
<group>
|
|
||||||
<field name="nut"/>
|
|
||||||
</group>
|
|
||||||
<!-- <group> -->
|
|
||||||
<!-- <field name="scope"/> -->
|
|
||||||
<!-- <field name="blade"/> -->
|
|
||||||
<!-- </group> -->
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
<!-- 夹头search view -->
|
|
||||||
<record model="ir.ui.view" id="view_chuck_search">
|
|
||||||
<field name="name">sf.chuck.search</field>
|
|
||||||
<field name="model">sf.chuck</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)]"/>
|
|
||||||
</search>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- 功能刀具类型tree -->
|
|
||||||
<record id="view_cutter_function_tree" model="ir.ui.view">
|
|
||||||
<field name="name">sf.cutter.function.tree</field>
|
|
||||||
<field name="model">sf.functional.cutting.tool.model</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<tree string="功能刀具类型">
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="remark"/>
|
|
||||||
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
<!-- 功能刀具类型form -->
|
|
||||||
<record id="view_cutter_function_form" model="ir.ui.view">
|
|
||||||
<field name="name">sf.cutter.function.form</field>
|
|
||||||
<field name="model">sf.functional.cutting.tool.model</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form string="功能刀具类型">
|
|
||||||
<sheet>
|
|
||||||
<group string="功能刀具类型">
|
|
||||||
<group>
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="name"/>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="remark"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
<!-- 整体式刀具类型tree -->
|
|
||||||
<record id="view_integral_cutting_tool_model_tree" model="ir.ui.view">
|
|
||||||
<field name="name">sf.integral.cutting.tool.model.tree</field>
|
|
||||||
<field name="model">sf.integral.cutting.tool.model</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<tree string="整体式刀具类型">
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="remark"/>
|
|
||||||
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
<!-- 整体式刀具类型form -->
|
|
||||||
<record id="view_integral_cutting_tool_model_form" model="ir.ui.view">
|
|
||||||
<field name="name">sf.integral.cutting.tool.model.form</field>
|
|
||||||
<field name="model">sf.integral.cutting.tool.model</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form string="整体式刀具类型">
|
|
||||||
<sheet>
|
|
||||||
<group string="整体式刀具类型">
|
|
||||||
<group>
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="cutting_tool_material"/>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="remark"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
<!-- 刀片类型tree -->
|
|
||||||
<record id="view_blade_model_tree" model="ir.ui.view">
|
|
||||||
<field name="name">sf.blade.model.tree</field>
|
|
||||||
<field name="model">sf.blade.model</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<tree string="刀片类型">
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="remark"/>
|
|
||||||
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
<!-- 刀片类型form -->
|
|
||||||
<record id="view_blade_model_form" model="ir.ui.view">
|
|
||||||
<field name="name">sf.blade.model.form</field>
|
|
||||||
<field name="model">sf.blade.model</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form string="刀片类型">
|
|
||||||
<sheet>
|
|
||||||
<group string="刀片类型">
|
|
||||||
<group>
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="cutting_tool_material"/>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="remark"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
<!-- 刀杆类型tree -->
|
|
||||||
<record id="view_cutter_bar_model_tree" model="ir.ui.view">
|
|
||||||
<field name="name">sf.cutter.bar.model.tree</field>
|
|
||||||
<field name="model">sf.cutter.bar.model</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<tree string="刀杆类型">
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="remark"/>
|
|
||||||
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
<!-- 刀杆类型form -->
|
|
||||||
<record id="view_cutter_bar_model_form" model="ir.ui.view">
|
|
||||||
<field name="name">sf.cutter.bar.model.form</field>
|
|
||||||
<field name="model">sf.cutter.bar.model</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form string="刀杆类型">
|
|
||||||
<sheet>
|
|
||||||
<group string="刀杆类型">
|
|
||||||
<group>
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="cutting_tool_material"/>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="remark"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
<!-- 刀盘类型tree -->
|
|
||||||
<record id="view_cutter_pad_model_tree" model="ir.ui.view">
|
|
||||||
<field name="name">sf.cutter.pad.model.tree</field>
|
|
||||||
<field name="model">sf.cutter.pad.model</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<tree string="刀盘类型">
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="remark"/>
|
|
||||||
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
<!-- 刀盘类型form -->
|
|
||||||
<record id="view_cutter_pad_model_form" model="ir.ui.view">
|
|
||||||
<field name="name">sf.cutter.pad.model.form</field>
|
|
||||||
<field name="model">sf.cutter.pad.model</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form string="刀盘类型">
|
|
||||||
<sheet>
|
|
||||||
<group string="刀盘类型">
|
|
||||||
<group>
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="cutting_tool_material"/>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="remark"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- 刀柄类型tree -->
|
|
||||||
<record id="view_handle_model_tree" model="ir.ui.view">
|
|
||||||
<field name="name">sf.handle.model.tree</field>
|
|
||||||
<field name="model">sf.handle.model</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<tree string="刀柄类型">
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="remark"/>
|
|
||||||
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
<!-- 刀柄类型form -->
|
|
||||||
<record id="view_handle_model_form" model="ir.ui.view">
|
|
||||||
<field name="name">sf.handle.model.form</field>
|
|
||||||
<field name="model">sf.handle.model</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form string="刀柄类型">
|
|
||||||
<sheet>
|
|
||||||
<group string="刀柄类型">
|
|
||||||
<group>
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="cutting_tool_material"/>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="remark"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
<!-- 夹头类型tree -->
|
|
||||||
<record id="view_chuck_model_tree" model="ir.ui.view">
|
|
||||||
<field name="name">sf.chuck.model.tree</field>
|
|
||||||
<field name="model">sf.chuck.model</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<tree string="夹头类型">
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="remark"/>
|
|
||||||
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
<!-- 夹头类型form -->
|
|
||||||
<record id="view_chuck_model_form" model="ir.ui.view">
|
|
||||||
<field name="name">sf.chuck.model.form</field>
|
|
||||||
<field name="model">sf.chuck.model</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form string="夹头类型">
|
|
||||||
<sheet>
|
|
||||||
<group string="夹头类型">
|
|
||||||
<group>
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="cutting_tool_material"/>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="remark"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
</data>
|
|
||||||
</odoo>
|
|
||||||
134
sf_base/views/tool_basic_param.xml
Normal file
134
sf_base/views/tool_basic_param.xml
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<odoo>
|
||||||
|
<data>
|
||||||
|
<!-- ================================================刀具基础参数================================================ -->
|
||||||
|
<record id="view_sf_tool_materials_basic_parameters_integral_tree" model="ir.ui.view">
|
||||||
|
<field name="name">sf.tool.materials.basic.parameters.tree</field>
|
||||||
|
<field name="model">sf.tool.materials.basic.parameters</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<tree string="基础参数" delete="0" create="0" edit="0" sample="1">
|
||||||
|
<field name="total_length" />
|
||||||
|
<field name="blade_number" />
|
||||||
|
<field name="neck_diameter"/>
|
||||||
|
<field name="neck_length"/>
|
||||||
|
<field name="handle_diameter" />
|
||||||
|
<field name="handle_length" />
|
||||||
|
<field name="blade_tip_diameter"/>
|
||||||
|
<field name="blade_tip_working_size"/>
|
||||||
|
<field name="blade_tip_taper" />
|
||||||
|
<field name="blade_diameter" />
|
||||||
|
<field name="blade_length"/>
|
||||||
|
<field name="blade_helix_angle"/>
|
||||||
|
<field name="blade_width" />
|
||||||
|
<field name="blade_width" />
|
||||||
|
<field name="pitch"/>
|
||||||
|
<field name="cutting_depth"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="view_sf_tool_materials_basic_parameters_blade_tree" model="ir.ui.view">
|
||||||
|
<field name="name">sf.tool.materials.basic.parameters.tree</field>
|
||||||
|
<field name="model">sf.tool.materials.basic.parameters</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<tree string="基础参数" delete="0" create="0">
|
||||||
|
<field name="total_length" />
|
||||||
|
<field name="length" />
|
||||||
|
<field name="thickness"/>
|
||||||
|
<field name="width"/>
|
||||||
|
<field name="cutting_blade_length" />
|
||||||
|
<field name="relief_angle" />
|
||||||
|
<field name="blade_tip_circular_arc_radius"/>
|
||||||
|
<field name="inscribed_circle_diameter"/>
|
||||||
|
<field name="install_aperture_diameter" />
|
||||||
|
<field name="chip_breaker_groove" />
|
||||||
|
<field name="blade_teeth_model"/>
|
||||||
|
<field name="blade_blade_number"/>
|
||||||
|
<field name="main_included_angle" />
|
||||||
|
<field name="top_angle" />
|
||||||
|
<field name="blade_tip_dip_angle"/>
|
||||||
|
<field name="side_cutting_edge_angle"/>
|
||||||
|
<field name="thread_model"/>
|
||||||
|
<field name="thread_num" />
|
||||||
|
<field name="blade_tip_height_tolerance" />
|
||||||
|
<field name="inscribed_circle_tolerance"/>
|
||||||
|
<field name="thickness_tolerance"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="view_sf_tool_materials_basic_parameters_cutter_bar_tree" model="ir.ui.view">
|
||||||
|
<field name="name">sf.tool.materials.basic.parameters.tree</field>
|
||||||
|
<field name="model">sf.tool.materials.basic.parameters</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<tree string="基础参数" delete="0" create="0">
|
||||||
|
<field name="total_length" />
|
||||||
|
<field name="height" />
|
||||||
|
<field name="blade_height"/>
|
||||||
|
<field name="cut_depth_max"/>
|
||||||
|
<field name="cutter_arbor_diameter" />
|
||||||
|
<field name="min_machining_aperture" />
|
||||||
|
<field name="install_blade_tip_num"/>
|
||||||
|
<field name="cutting_blade_model"/>
|
||||||
|
<field name="is_cooling_hole" />
|
||||||
|
<field name="locating_slot_code" />
|
||||||
|
<field name="installing_structure"/>
|
||||||
|
<field name="blade_ids"/>
|
||||||
|
<field name="tool_shim" />
|
||||||
|
<field name="cotter_pin" />
|
||||||
|
<field name="pressing_plate"/>
|
||||||
|
<field name="screw"/>
|
||||||
|
<field name="spanner" />
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
|
||||||
|
<record id="view_sf_tool_materials_basic_parameters_tree" model="ir.ui.view">
|
||||||
|
<field name="name">sf.tool.materials.basic.parameters.tree</field>
|
||||||
|
<field name="model">sf.tool.materials.basic.parameters</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<tree string="基础参数" delete="0" create="0">
|
||||||
|
<field name="total_length" />
|
||||||
|
<field name="blade_number" />
|
||||||
|
<field name="neck_diameter"/>
|
||||||
|
<field name="neck_length"/>
|
||||||
|
<field name="handle_diameter" />
|
||||||
|
<field name="handle_length" />
|
||||||
|
<field name="blade_tip_diameter"/>
|
||||||
|
<field name="blade_tip_working_size"/>
|
||||||
|
<field name="blade_tip_taper" />
|
||||||
|
<field name="blade_diameter" />
|
||||||
|
<field name="blade_length"/>
|
||||||
|
<field name="blade_helix_angle"/>
|
||||||
|
<field name="blade_width" />
|
||||||
|
<field name="blade_width" />
|
||||||
|
<field name="pitch"/>
|
||||||
|
<field name="cutting_depth"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
|
||||||
|
<record model="ir.ui.view" id="view_sf_tool_materials_basic_parameters_search">
|
||||||
|
<field name="name">sf.tool.materials.basic.parameters.search</field>
|
||||||
|
<field name="model">sf.tool.materials.basic.parameters</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<search>
|
||||||
|
<field name="name"/>
|
||||||
|
</search>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="action_sf_tool_materials_basic_parameters" model="ir.actions.act_window">
|
||||||
|
<field name="name">基础参数</field>
|
||||||
|
<field name="res_model">sf.tool.materials.basic.parameters</field>
|
||||||
|
<field name="view_mode">tree</field>
|
||||||
|
|
||||||
|
<!-- <field name="context">{'selection_mode': 'single'}</field>-->
|
||||||
|
<field name="domain">[]</field>
|
||||||
|
<!-- <field name="multi">false</field>-->
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</odoo>
|
||||||
@@ -16,11 +16,11 @@
|
|||||||
<field name="res_model">sf.cutting.tool.type</field>
|
<field name="res_model">sf.cutting.tool.type</field>
|
||||||
<field name="view_mode">tree</field>
|
<field name="view_mode">tree</field>
|
||||||
</record>
|
</record>
|
||||||
<!-- 刀具型号action -->
|
<!-- 刀具标准库action -->
|
||||||
<record id="action_sf_cutting_tool" model="ir.actions.act_window">
|
<record id="action_sf_cutting_tool_standard_library" 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>
|
||||||
<field name="res_model">sf.cutting.tool.model</field>
|
<field name="res_model">sf.cutting_tool.standard.library</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
<!-- 功能刀具action -->
|
<!-- 功能刀具action -->
|
||||||
@@ -61,14 +61,13 @@
|
|||||||
sequence="2"
|
sequence="2"
|
||||||
action="action_sf_cutting_tool_type"
|
action="action_sf_cutting_tool_type"
|
||||||
/>
|
/>
|
||||||
<!-- 刀具型号 -->
|
<menuitem
|
||||||
<!-- <menuitem-->
|
id="menu_sf_cutting_tool_standard_library"
|
||||||
<!-- id="menu_sf_integral_cutting_tool"-->
|
parent="menu_sf_cutting_tool"
|
||||||
<!-- parent="menu_sf_cutting_tool"-->
|
name="刀具标准库"
|
||||||
<!-- name="刀具型号"-->
|
sequence="3"
|
||||||
<!-- sequence="3"-->
|
action="action_sf_cutting_tool_standard_library"
|
||||||
<!-- action="action_sf_cutting_tool"-->
|
/>
|
||||||
<!-- />-->
|
|
||||||
<!-- 功能刀具 -->
|
<!-- 功能刀具 -->
|
||||||
<!-- <menuitem-->
|
<!-- <menuitem-->
|
||||||
<!-- id="menu_sf_functional_cutting_tool"-->
|
<!-- id="menu_sf_functional_cutting_tool"-->
|
||||||
@@ -86,5 +85,12 @@
|
|||||||
action="action_sf_functional_cutting_tool_model_type"
|
action="action_sf_functional_cutting_tool_model_type"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<menuitem
|
||||||
|
id="menu_sf_maintenance_equipment_image"
|
||||||
|
name="能力特征库"
|
||||||
|
parent="menu_sf_cutting_tool"
|
||||||
|
action="action_maintenance_equipment_image"
|
||||||
|
sequence="5"/>
|
||||||
|
|
||||||
</data>
|
</data>
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -14,29 +14,6 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- <record id="view_cutting_tool_material_form" model="ir.ui.view">-->
|
|
||||||
<!-- <field name="name">sf.cutting.tool.material.form</field>-->
|
|
||||||
<!-- <field name="model">sf.cutting.tool.material</field>-->
|
|
||||||
<!-- <field name="arch" type="xml">-->
|
|
||||||
<!-- <form string="刀具物料">-->
|
|
||||||
<!-- <sheet>-->
|
|
||||||
<!-- <group col='1'>-->
|
|
||||||
<!-- <group string='基本信息'>-->
|
|
||||||
<!-- <group>-->
|
|
||||||
<!-- <field name="code"/>-->
|
|
||||||
<!-- <field name="name"/>-->
|
|
||||||
<!-- </group>-->
|
|
||||||
<!-- <group>-->
|
|
||||||
<!-- <field name="remark"/>-->
|
|
||||||
<!-- </group>-->
|
|
||||||
|
|
||||||
<!-- </group>-->
|
|
||||||
<!-- </group>-->
|
|
||||||
<!-- </sheet>-->
|
|
||||||
<!-- </form>-->
|
|
||||||
<!-- </field>-->
|
|
||||||
<!-- </record>-->
|
|
||||||
|
|
||||||
<record model="ir.ui.view" id="view_cutting_tool_material_search">
|
<record model="ir.ui.view" id="view_cutting_tool_material_search">
|
||||||
<field name="name">sf.cutting.tool.material.search</field>
|
<field name="name">sf.cutting.tool.material.search</field>
|
||||||
<field name="model">sf.cutting.tool.material</field>
|
<field name="model">sf.cutting.tool.material</field>
|
||||||
@@ -58,13 +35,6 @@
|
|||||||
<field name="code"/>
|
<field name="code"/>
|
||||||
<field name="name" string="名称"/>
|
<field name="name" string="名称"/>
|
||||||
<field name="mrs_cutting_tool_type_id"/>
|
<field name="mrs_cutting_tool_type_id"/>
|
||||||
<!-- <field name="mrs_cutting_tool_integral_model_ids" optional="hide"/>-->
|
|
||||||
<!-- <field name="mrs_cutting_tool_blade_model_ids" optional="hide"/>-->
|
|
||||||
<!-- <field name="mrs_cutting_tool_cutterbar_model_ids" optional="hide"/>-->
|
|
||||||
<!-- <field name="mrs_cutting_tool_cutterpad_model_ids" optional="hide"/>-->
|
|
||||||
<!-- <field name="mrs_cutting_tool_cutterhandle_model_ids" optional="hide"/>-->
|
|
||||||
<!-- <field name="mrs_cutting_tool_cutterhead_model_ids" optional="hide"/>-->
|
|
||||||
<!-- <field name="image" widget='image'/>-->
|
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
@@ -83,52 +53,9 @@
|
|||||||
<field name="mrs_cutting_tool_type_id"
|
<field name="mrs_cutting_tool_type_id"
|
||||||
options="{'no_create': True, 'no_quick_create': True}"/>
|
options="{'no_create': True, 'no_quick_create': True}"/>
|
||||||
<field name="mrs_cutting_tool_model_id"
|
<field name="mrs_cutting_tool_model_id"
|
||||||
options="{'no_create': True, 'no_quick_create': True}"
|
options="{'no_create': True, 'no_quick_create': True}"/>
|
||||||
attrs="{'invisible': True}"/>
|
|
||||||
<!-- <field name="mrs_cutting_tool_integral_model_ids"-->
|
|
||||||
<!-- options="{'no_create': True, 'no_quick_create': True}"-->
|
|
||||||
<!-- widget="many2many_tags"/>-->
|
|
||||||
<!-- <field name="mrs_cutting_tool_blade_model_ids"-->
|
|
||||||
<!-- options="{'no_create': True, 'no_quick_create': True}"-->
|
|
||||||
<!-- widget="many2many_tags"/>-->
|
|
||||||
<!-- <field name="mrs_cutting_tool_cutterbar_model_ids"-->
|
|
||||||
<!-- options="{'no_create': True, 'no_quick_create': True}"-->
|
|
||||||
<!-- widget="many2many_tags"/>-->
|
|
||||||
<!-- <field name="mrs_cutting_tool_cutterpad_model_ids"-->
|
|
||||||
<!-- options="{'no_create': True, 'no_quick_create': True}"-->
|
|
||||||
<!-- widget="many2many_tags"/>-->
|
|
||||||
<!-- <field name="mrs_cutting_tool_cutterhandle_model_ids"-->
|
|
||||||
<!-- options="{'no_create': True, 'no_quick_create': True}"-->
|
|
||||||
<!-- widget="many2many_tags"/>-->
|
|
||||||
<!-- <field name="mrs_cutting_tool_cutterhead_model_ids"-->
|
|
||||||
<!-- options="{'no_create': True, 'no_quick_create': True}"-->
|
|
||||||
<!-- widget="many2many_tags"/>-->
|
|
||||||
</group>
|
</group>
|
||||||
<!-- <group>-->
|
|
||||||
<!-- <field name="image" nolabel="1" widget="image"/>-->
|
|
||||||
<!-- </group>-->
|
|
||||||
|
|
||||||
</group>
|
</group>
|
||||||
<!-- <group string='参数信息'>-->
|
|
||||||
<!-- <group>-->
|
|
||||||
<!-- <field name="diameter"/>-->
|
|
||||||
<!-- <field name="tool_grade"/>-->
|
|
||||||
<!-- <field name="machining_accuracy"/>-->
|
|
||||||
<!-- <field name="tool_length"/>-->
|
|
||||||
<!-- <field name="blade_number"/>-->
|
|
||||||
<!-- </group>-->
|
|
||||||
<!-- <group>-->
|
|
||||||
<!-- <field name="integral_blade_length"/>-->
|
|
||||||
<!-- <field name="effective_blade_length"/>-->
|
|
||||||
<!-- <field name="max_life"/>-->
|
|
||||||
<!-- <field name="is_standard"/>-->
|
|
||||||
<!-- </group>-->
|
|
||||||
<!-- </group>-->
|
|
||||||
<!-- <group string='其他信息'>-->
|
|
||||||
<!-- <group>-->
|
|
||||||
<!-- <field name="applicable_range"/>-->
|
|
||||||
<!-- </group>-->
|
|
||||||
<!-- </group>-->
|
|
||||||
</group>
|
</group>
|
||||||
</sheet>
|
</sheet>
|
||||||
</form>
|
</form>
|
||||||
@@ -160,25 +87,6 @@
|
|||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
<!-- <record id="view_cutter_function_form" model="ir.ui.view">-->
|
|
||||||
<!-- <field name="name">sf.cutter.function.form</field>-->
|
|
||||||
<!-- <field name="model">sf.functional.cutting.tool.model</field>-->
|
|
||||||
<!-- <field name="arch" type="xml">-->
|
|
||||||
<!-- <form string="功能刀具类型">-->
|
|
||||||
<!-- <sheet>-->
|
|
||||||
<!-- <group string="功能刀具类型">-->
|
|
||||||
<!-- <group>-->
|
|
||||||
<!-- <field name="code"/>-->
|
|
||||||
<!-- <field name="name"/>-->
|
|
||||||
<!-- </group>-->
|
|
||||||
<!-- <group>-->
|
|
||||||
<!-- <field name="remark"/>-->
|
|
||||||
<!-- </group>-->
|
|
||||||
<!-- </group>-->
|
|
||||||
<!-- </sheet>-->
|
|
||||||
<!-- </form>-->
|
|
||||||
<!-- </field>-->
|
|
||||||
<!-- </record>-->
|
|
||||||
|
|
||||||
<!-- 功能刀具类型搜索 -->
|
<!-- 功能刀具类型搜索 -->
|
||||||
<record model="ir.ui.view" id="view_cutter_function_search">
|
<record model="ir.ui.view" id="view_cutter_function_search">
|
||||||
@@ -193,130 +101,323 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- ================================================刀具型号================================================ -->
|
<!-- ================================================刀具标准库================================================ -->
|
||||||
<record id="view_cutting_tool_model_tree" model="ir.ui.view">
|
<record id="view_cutting_tool_standard_library_tree" model="ir.ui.view">
|
||||||
<field name="name">sf.cutting.tool.model.tree</field>
|
<field name="name">sf.cutting_tool.standard.library.tree</field>
|
||||||
<field name="model">sf.cutting.tool.model</field>
|
<field name="model">sf.cutting_tool.standard.library</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree string="刀具型号" edit="0" delete="0" create="1">
|
<tree string="刀具标准库" delete="0" create="0" edit="0">
|
||||||
<field name="code"/>
|
<field name="code" readonly="True"/>
|
||||||
<field name="name" string="名称"/>
|
<field name="name" readonly="True" string="型号名称"/>
|
||||||
<field name="cutting_tool_material_id"/>
|
<field name="cutting_tool_material_id"/>
|
||||||
|
<field name="cutting_tool_type_id"/>
|
||||||
|
<field name="brand_id"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="view_cutting_tool_model_form" model="ir.ui.view">
|
<record id="view_cutting_tool_standard_library_form" model="ir.ui.view">
|
||||||
<field name="name">sf.cutting.tool.model.form</field>
|
<field name="name">sf.cutting_tool.standard.library.form</field>
|
||||||
<field name="model">sf.cutting.tool.model</field>
|
<field name="model">sf.cutting_tool.standard.library</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="刀具型号" edit="0" delete="0" create="1">
|
<form string="刀具标准库" delete="0" create="0" edit="0">
|
||||||
<sheet>
|
<sheet>
|
||||||
|
<field name="image" widget='image' class="oe_avatar"
|
||||||
|
options="{'zoom': true, 'preview_image':'image_128'}"/>
|
||||||
<div class="oe_title">
|
<div class="oe_title">
|
||||||
<h1>
|
<h1>
|
||||||
<field name="name" placeholder="e.g. LED Monitor"/>
|
<field name="code"/>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="code" />
|
<field name="name"/>
|
||||||
<field name="cutting_tool_material_id"
|
<field name="cutting_tool_material_id"/>
|
||||||
options="{'no_create': True, 'no_quick_create': True}"/>
|
<field name="cutting_tool_type"/>
|
||||||
<field name="cutting_tool_type" invisible="1"/>
|
<field name="cutting_tool_type_id"/>
|
||||||
|
<field name="brand_id"/>
|
||||||
|
<label for="integral_run_out_accuracy_min" string="端跳精度"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||||
|
<div class="o_address_format"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}">
|
||||||
|
<label for="integral_run_out_accuracy_min" string="最小"/>
|
||||||
|
<field name="integral_run_out_accuracy_min" class="o_address_zip"
|
||||||
|
options="{'format': false}"/>
|
||||||
|
<span>(mm)&nbsp;</span>
|
||||||
|
<label for="integral_run_out_accuracy_max" string="最大"/>
|
||||||
|
<field name="integral_run_out_accuracy_max" class="o_address_zip"
|
||||||
|
options="{'format': false}"/>
|
||||||
|
<span>(mm)&nbsp;</span>
|
||||||
|
</div>
|
||||||
|
<field name="cutter_bar_ids" widget="many2many_tags"
|
||||||
|
options="{'no_create': True}" search="[]"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||||
|
<field name="cutter_pad_ids" widget="many2many_tags"
|
||||||
|
options="{'no_create': True}" search="[]"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="material_model_id" placeholder="请选择" string="材质"
|
||||||
|
attrs="{'required': [('cutting_tool_type', 'not in', ['刀柄', '夹头'])]}"/>
|
||||||
|
<field name="tool_hardness" string="硬度(hrc)" options="{'format': false}"
|
||||||
|
widget="integer"/>
|
||||||
|
<field name="coating_material"/>
|
||||||
|
<field name="blade_type"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||||
|
<field name="integral_coarse_medium_fine" placeholder="请选择"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))]}"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<group string="适配刀片形状"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', 'in', ('刀柄','夹头','整体式刀具',False))]}">
|
||||||
|
<field name="fit_blade_shape_id" string="" widget="custom_many2many_checkboxes"/>
|
||||||
|
</group>
|
||||||
|
<group string="适合加工方式"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀杆','刀盘','刀片'))]}">
|
||||||
|
<field name="suitable_machining_method_ids" string=""
|
||||||
|
widget="custom_many2many_checkboxes"/>
|
||||||
|
</group>
|
||||||
|
<group string="刀尖特征"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀杆','刀盘','刀片'))]}">
|
||||||
|
<field name="blade_tip_characteristics_id" string=""
|
||||||
|
widget="custom_many2many_checkboxes"/>
|
||||||
|
</group>
|
||||||
|
<group attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀杆','刀盘','刀片'))]}">
|
||||||
|
<group string="柄部类型" attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}">
|
||||||
|
<field name="handle_type_ids" string="" widget="custom_many2many_checkboxes"/>
|
||||||
|
</group>
|
||||||
|
<group string="压紧方式"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}">
|
||||||
|
<field name="compaction_way_ids" string="" widget="custom_many2many_checkboxes"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<group attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀杆','刀盘','刀片'))]}">
|
||||||
|
<group string="走刀方向">
|
||||||
|
<field name="cutting_direction_ids" string="" widget="custom_many2many_checkboxes"/>
|
||||||
|
</group>
|
||||||
|
<group string="适合冷却液">
|
||||||
|
<field name="suitable_coolant_ids" string="" widget="custom_many2many_checkboxes"/>
|
||||||
</group>
|
</group>
|
||||||
<!-- <group>-->
|
|
||||||
<!-- <field name="image" nolabel="1" widget="image"/>-->
|
|
||||||
<!-- </group>-->
|
|
||||||
</group>
|
</group>
|
||||||
<notebook>
|
<notebook>
|
||||||
<page string="参数"
|
<page string="基本参数">
|
||||||
attrs="{'invisible': [('cutting_tool_type', '=', False)]}">
|
<field name="integral_tool_basic_parameters_ids" import_button="true"
|
||||||
<group>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}">
|
||||||
<!--整体式刀具-->
|
<tree editable="bottom" class="center" delete="1">
|
||||||
<group>
|
<field name="cutting_tool_type" invisible="1"/>
|
||||||
<field name="brand_id"/>
|
<field name="name"/>
|
||||||
<field name="cutting_tool_type_id" />
|
<field name="total_length"/>
|
||||||
<field name="material_model_id"/>
|
<field name="blade_diameter" class="diameter"/>
|
||||||
<field name="total_length"
|
<field name="blade_length"/>
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀柄'))]}"/>
|
<field name="blade_number" placeholder="请选择"/>
|
||||||
<field name="shank_length"
|
<field name="neck_length"/>
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
<field name="neck_diameter" class="diameter"/>
|
||||||
<field name="blade_length"
|
<field name="handle_diameter" class="diameter"/>
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
<field name="handle_length"/>
|
||||||
|
<field name="blade_tip_working_size" class="du"/>
|
||||||
|
<field name="blade_tip_diameter" class="diameter"/>
|
||||||
|
<field name="blade_tip_taper" class="du"/>
|
||||||
|
<field name="blade_helix_angle" class="du"/>
|
||||||
|
<field name="pitch"/>
|
||||||
|
<field name="blade_width"/>
|
||||||
|
<field name="blade_depth"/>
|
||||||
|
<field name="cutting_depth"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
|
||||||
<!--刀片-->
|
<field name="blade_basic_parameters_ids"
|
||||||
<label for="tool_length" string="尺寸(mm)"
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}">
|
||||||
attrs='{"invisible": [("cutting_tool_type","not in",("刀片","刀杆","刀盘"))]}'/>
|
<tree editable="bottom" class="center" delete="1">
|
||||||
<div class="test_model"
|
<field name="cutting_tool_type" invisible="1"/>
|
||||||
attrs='{"invisible": [("cutting_tool_type","not in",("刀片","刀杆","刀盘"))]}'>
|
<field name="name"/>
|
||||||
<label for="tool_length" string="长"/>
|
<field name="length"/>
|
||||||
<field name="tool_length" class="o_address_zip"
|
<field name="thickness"/>
|
||||||
options="{'format': false}"/>
|
<field name="width"/>
|
||||||
<label for="tool_width" string="宽"/>
|
<field name="cutting_blade_length"/>
|
||||||
<field name="tool_width" class="o_address_zip"
|
<field name="relief_angle" class="du"/>
|
||||||
options="{'format': false}"/>
|
<field name="blade_tip_circular_arc_radius"/>
|
||||||
<label for="tool_thickness" string="厚"/>
|
<field name="inscribed_circle_diameter" class="diameter"/>
|
||||||
<field name="tool_thickness" class="o_address_zip"
|
<field name="install_aperture_diameter" class="diameter"/>
|
||||||
options="{'format': false}"/>
|
<field name="pitch"/>
|
||||||
</div>
|
<field name="chip_breaker_groove" placeholder="请选择"/>
|
||||||
<field name="diameter"
|
<field name="blade_teeth_model" placeholder="请选择"/>
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片','刀杆','刀盘'))]}"/>
|
<field name="cutting_depth" string="最大切削深度(mm)"/>
|
||||||
<field name="blade_diameter"
|
<field name="blade_blade_number" string="刃数(个)"/>
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}"/>
|
<field name="blade_width" string="刃宽(mm)"/>
|
||||||
<field name="blade_number"
|
<field name="main_included_angle"/>
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片','刀杆','刀盘'))]}"/>
|
<field name="top_angle"/>
|
||||||
<field name="diameter_max"
|
<field name="blade_tip_dip_angle"/>
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
<field name="side_cutting_edge_angle"/>
|
||||||
<field name="flange_length"
|
<field name="thread_model" placeholder="请选择"/>
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
<field name="thread_num"/>
|
||||||
<field name="flange_diameter"
|
<field name="blade_tip_height_tolerance"/>
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
<field name="inscribed_circle_tolerance"/>
|
||||||
<!--夹头-->
|
<field name="thickness_tolerance"/>
|
||||||
<field name="outer_diameter"
|
</tree>
|
||||||
attrs='{"invisible": [("cutting_tool_type","!=","夹头")]}'/>
|
</field>
|
||||||
<field name="inner_diameter"
|
<field name="cutter_bar_basic_parameters_ids"
|
||||||
attrs='{"invisible": [("cutting_tool_type","!=","夹头")]}'/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}">
|
||||||
<field name="tool_height"
|
<tree editable="bottom" class="center" delete="1">
|
||||||
attrs='{"invisible": [("cutting_tool_type","!=","夹头")]}'/>
|
<field name="cutting_tool_type" invisible="1"/>
|
||||||
<field name="tool_weight"
|
<field name="name"/>
|
||||||
attrs='{"invisible": [("cutting_tool_type","not in",("夹头","刀柄"))]}'/>
|
<field name="height"/>
|
||||||
<field name="clamping_diameter"
|
<field name="width"/>
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('夹头','刀柄'))]}"/>
|
<field name="total_length"/>
|
||||||
<field name="cutter_bar_ids" widget="many2many_tags"
|
<field name="blade_height"/>
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片'))]}"/>
|
<field name="blade_width"/>
|
||||||
<field name="cutter_pad_ids" widget="many2many_tags"
|
<field name="blade_length"/>
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片'))]}"/>
|
<field name="blade_diameter" class="diameter"/>
|
||||||
<field name="blade_ids" widget="many2many_tags"
|
<field name="cutter_arbor_diameter" class="diameter"/>
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}"/>
|
<field name="main_included_angle" class="du"/>
|
||||||
<field name="chuck_ids" widget="many2many_tags"
|
<field name="relief_angle" class="du"/>
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀杆','刀盘','刀柄'))]}"/>
|
<field name="cutting_depth" string="最大切削深度(mm)"/>
|
||||||
<field name="handle_ids" widget="many2many_tags"
|
<field name="min_machining_aperture" class="diameter"/>
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('夹头'))]}"/>
|
<field name="install_blade_tip_num"/>
|
||||||
</group>
|
<field name="cutting_blade_model"/>
|
||||||
<group>
|
<field name="is_cooling_hole" />
|
||||||
<field name="jump_accuracy"
|
<field name="locating_slot_code"/>
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
<field name="installing_structure"/>
|
||||||
<field name="front_angle"
|
<field name="blade_ids" widget="many2many_tags" placeholder="请选择"/>
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))]}"/>
|
<field name="tool_shim"/>
|
||||||
<field name="top_angle"
|
<field name="cotter_pin"/>
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))]}"/>
|
<field name="pressing_plate"/>
|
||||||
<field name="rear_angle"
|
<field name="screw"/>
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))]}"/>
|
<field name="spanner"/>
|
||||||
<field name="main_included_angle"
|
</tree>
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))]}"/>
|
</field>
|
||||||
<field name="coating_material"
|
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))]}"/>
|
<field name="cutter_head_basic_parameters_ids"
|
||||||
<field name="accuracy_level"
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀盘')]}">
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'in', ('刀柄'))]}"/>
|
<tree editable="bottom" class="center" delete="1">
|
||||||
<field name="working_hardness"/>
|
<field name="cutting_tool_type" invisible="1"/>
|
||||||
<field name="wrench"
|
<field name="name"/>
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('夹头','刀柄','刀杆','刀盘' ))]}"/>
|
<field name="install_blade_tip_num"/>
|
||||||
<field name="screw"
|
<field name="blade_diameter" class="diameter"/>
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('夹头','刀柄'))]}"/>
|
<field name="cutter_head_diameter" class="diameter"/>
|
||||||
<field name="nut"
|
<field name="interface_diameter" class="diameter"/>
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))]}"/>
|
<field name="total_length"/>
|
||||||
</group>
|
<field name="blade_length"/>
|
||||||
</group>
|
<field name="cutting_depth" string="最大切削深度(mm)"/>
|
||||||
|
<field name="main_included_angle" class="du"/>
|
||||||
|
<field name="installing_structure"/>
|
||||||
|
<field name="blade_ids" widget="many2many_tags" placeholder="请选择"/>
|
||||||
|
<field name="screw"/>
|
||||||
|
<field name="spanner"/>
|
||||||
|
<field name="cutting_blade_model"/>
|
||||||
|
<field name="is_cooling_hole" />
|
||||||
|
<field name="locating_slot_code"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field name="knife_handle_basic_parameters_ids"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}">
|
||||||
|
<tree editable="bottom" class="center" delete="1">
|
||||||
|
<field name="cutting_tool_type" invisible="1"/>
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="total_length"/>
|
||||||
|
<field name="flange_shank_length"/>
|
||||||
|
<field name="handle_external_diameter" class="diameter"/>
|
||||||
|
<field name="handle_inside_diameter" class="diameter"/>
|
||||||
|
<field name="min_clamping_diameter" class="diameter"/>
|
||||||
|
<field name="max_clamping_diameter" class="diameter"/>
|
||||||
|
<field name="clamping_mode"/>
|
||||||
|
<field name="max_load_capacity"/>
|
||||||
|
<field name="taper" class="du"/>
|
||||||
|
<field name="tool_changing_time"/>
|
||||||
|
<field name="standard_rotate_speed"/>
|
||||||
|
<field name="max_rotate_speed"/>
|
||||||
|
<field name="diameter_slip_accuracy"/>
|
||||||
|
<field name="cooling_model"/>
|
||||||
|
<field name="is_rough_machining" />
|
||||||
|
<field name="is_finish_machining" />
|
||||||
|
<field name="is_quick_cutting" />
|
||||||
|
<field name="is_drill_hole" />
|
||||||
|
<field name="is_safe_lock" />
|
||||||
|
<field name="screw"/>
|
||||||
|
<field name="spanner"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
<field name="chuck_basic_parameters_ids"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}">
|
||||||
|
<tree editable="bottom" class="center" delete="1">
|
||||||
|
<field name="cutting_tool_type" invisible="1"/>
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="er_size_model"/>
|
||||||
|
<field name="min_clamping_diameter" class="diameter" required="1"/>
|
||||||
|
<field name="max_clamping_diameter" class="diameter"/>
|
||||||
|
<field name="outer_diameter" class="diameter"/>
|
||||||
|
<field name="inner_diameter" class="diameter"/>
|
||||||
|
<field name="total_length"/>
|
||||||
|
<field name="taper" class="du"/>
|
||||||
|
<field name="run_out_accuracy"/>
|
||||||
|
<field name="top_diameter" class="diameter"/>
|
||||||
|
<field name="weight"/>
|
||||||
|
<field name="clamping_mode"/>
|
||||||
|
<field name="clamping_length"/>
|
||||||
|
<field name="clamping_tolerance"/>
|
||||||
|
<field name="max_load_capacity"/>
|
||||||
|
<field name="handle_ids" widget="many2many_tags" placeholder="请选择"/>
|
||||||
|
<field name="cooling_jacket"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</page>
|
||||||
|
<page string="切削速度Vc"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))]}">
|
||||||
|
<field name="cutting_speed_ids">
|
||||||
|
<tree editable="bottom" class="center" delete="1">
|
||||||
|
<field name="execution_standard_id" placeholder="请选择" required="1"/>
|
||||||
|
<field name="material_code" readonly="1"/>
|
||||||
|
<field name="material_id" placeholder="请选择"
|
||||||
|
attrs="{'readonly': [('execution_standard_id', '=', False)], 'required': [('execution_standard_id', '!=', False)]}"/>
|
||||||
|
<field name="material_grade" readonly="1"/>
|
||||||
|
<field name="tensile_strength" readonly="1"/>
|
||||||
|
<field name="hardness" readonly="1"/>
|
||||||
|
<field name="slope_milling_angle" widget="du"/>
|
||||||
|
<field name="cutting_speed_n1"/>
|
||||||
|
<field name="cutting_speed_n2"/>
|
||||||
|
<field name="cutting_speed_n3"/>
|
||||||
|
<field name="cutting_speed_n4"/>
|
||||||
|
<field name="cutting_speed_n5"/>
|
||||||
|
<field name="rough_machining"/>
|
||||||
|
<field name="precision_machining"/>
|
||||||
|
<field name="application" placeholder="请选择" required="1"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</page>
|
||||||
|
<page string="每齿走刀量fz"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))]}">
|
||||||
|
<field name="feed_per_tooth_ids"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具'))]}">
|
||||||
|
<tree editable="bottom" class="center" create="0" delete="0">
|
||||||
|
<field name="cutting_speed"/>
|
||||||
|
<field name="blade_diameter"/>
|
||||||
|
<field name="feed_per_tooth" required="1"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
<field name="feed_per_tooth_ids_2"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具'))]}">
|
||||||
|
<tree editable="bottom" class="center" create="0" delete="0">
|
||||||
|
<field name="machining_method"/>
|
||||||
|
<field name="materials_type_id"/>
|
||||||
|
<field name="blade_diameter"/>
|
||||||
|
<field name="feed_per_tooth" required="1"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
<field name="feed_per_tooth_ids_3"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片'))]}">
|
||||||
|
<tree editable="bottom" class="center" create="0" delete="0">
|
||||||
|
<field name="cutting_speed"/>
|
||||||
|
<field name="feed_per_tooth" required="1"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
<field name="feed_per_tooth_ids_4"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片'))]}">
|
||||||
|
<tree editable="bottom" class="center" create="0" delete="0">
|
||||||
|
<field name="machining_method"/>
|
||||||
|
<field name="materials_type_id"/>
|
||||||
|
<field name="feed_per_tooth" required="1"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
</page>
|
</page>
|
||||||
</notebook>
|
</notebook>
|
||||||
</sheet>
|
</sheet>
|
||||||
@@ -324,17 +425,16 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- 刀具型号搜索 -->
|
<record id="view_cutting_tool_standard_library_search" model="ir.ui.view">
|
||||||
<record id="view_cutting_tool_model_search" model="ir.ui.view">
|
<field name="name">sf.cutting_tool.standard.library.search</field>
|
||||||
<field name="name">sf.cutting.tool.model.search</field>
|
<field name="model">sf.cutting_tool.standard.library</field>
|
||||||
<field name="model">sf.cutting.tool.model</field>
|
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<search string="刀具型号">
|
<search string="刀具标准库">
|
||||||
<field name="name" string="名称搜索" filter_domain="[('name','ilike',self)]"/>
|
<field name="name" string="名称搜索" filter_domain="[('name','ilike',self)]"/>
|
||||||
<field name="code" string="编码搜索" filter_domain="[('code','ilike',self)]"/>
|
<field name="code" string="编码搜索" filter_domain="[('code','ilike',self)]"/>
|
||||||
<filter name="filter_active" string="已归档" domain="[('active','=',False)]"/>
|
<filter name="filter_active" string="已归档" domain="[('active','=',False)]"/>
|
||||||
<searchpanel class="account_root">
|
<searchpanel class="account_root">
|
||||||
<field name="cutting_tool_material_id" icon="fa-filter"/>
|
<field name="cutting_tool_material_id" icon="fa-filter" enable_counters="1"/>
|
||||||
</searchpanel>
|
</searchpanel>
|
||||||
</search>
|
</search>
|
||||||
</field>
|
</field>
|
||||||
@@ -355,27 +455,6 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- <record id="view_cutting_tool_type_form" model="ir.ui.view">-->
|
|
||||||
<!-- <field name="name">sf.cutting.tool.type.form</field>-->
|
|
||||||
<!-- <field name="model">sf.cutting.tool.type</field>-->
|
|
||||||
<!-- <field name="arch" type="xml">-->
|
|
||||||
<!-- <form string="刀具类型">-->
|
|
||||||
<!-- <sheet>-->
|
|
||||||
<!-- <group string="刀具类型">-->
|
|
||||||
<!-- <group>-->
|
|
||||||
<!-- <field name="code"/>-->
|
|
||||||
<!-- <field name="name"/>-->
|
|
||||||
<!-- <field name="mrs_cutting_tool_material_id" options="{'no_create': True, 'no_quick_create': True}"/>-->
|
|
||||||
<!-- </group>-->
|
|
||||||
<!-- <group>-->
|
|
||||||
<!-- <field name="remark"/>-->
|
|
||||||
<!-- </group>-->
|
|
||||||
<!-- </group>-->
|
|
||||||
<!-- </sheet>-->
|
|
||||||
<!-- </form>-->
|
|
||||||
<!-- </field>-->
|
|
||||||
<!-- </record>-->
|
|
||||||
|
|
||||||
<!-- 刀具类型搜索 -->
|
<!-- 刀具类型搜索 -->
|
||||||
<record id="view_cutting_tool_type_search" model="ir.ui.view">
|
<record id="view_cutting_tool_type_search" model="ir.ui.view">
|
||||||
<field name="name">sf.cutting.tool.type.search</field>
|
<field name="name">sf.cutting.tool.type.search</field>
|
||||||
@@ -391,6 +470,72 @@
|
|||||||
</search>
|
</search>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
|
<!-- ================================================能力特征库================================================ -->
|
||||||
|
<record id="view_maintenance_equipment_image_tree" model="ir.ui.view">
|
||||||
|
<field name="name">maintenance.equipment.image.tree</field>
|
||||||
|
<field name="model">maintenance.equipment.image</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<tree string="能力特征库" editable="bottom" delete="0" create="0">
|
||||||
|
<field name="name" readonly="1"/>
|
||||||
|
<field name="type" readonly="1"/>
|
||||||
|
<field name="image" widget="image" readonly="1"/>
|
||||||
|
<field name="equipment_id"/>
|
||||||
|
<field name="active" invisible="1"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
|
||||||
|
<record model="ir.ui.view" id="view_maintenance_equipment_image_search">
|
||||||
|
<field name="name">maintenance.equipment.image.search</field>
|
||||||
|
<field name="model">maintenance.equipment.image</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<search>
|
||||||
|
<field name="name"/>
|
||||||
|
<searchpanel class="account_root">
|
||||||
|
<field name="type" icon="fa-filter" enable_counters="1"/>
|
||||||
|
</searchpanel>
|
||||||
|
</search>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="action_maintenance_equipment_image" model="ir.actions.act_window">
|
||||||
|
<field name="name">能力特征库</field>
|
||||||
|
<field name="res_model">maintenance.equipment.image</field>
|
||||||
|
<field name="view_mode">tree</field>
|
||||||
|
<field name="domain">[]</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- ================================================刀具基础参数================================================ -->
|
||||||
|
<!-- <record id="view_sf_tool_materials_basic_parameters_tree" model="ir.ui.view">-->
|
||||||
|
<!-- <field name="name">sf.tool.materials.basic.parameters.tree</field>-->
|
||||||
|
<!-- <field name="model">sf.tool.materials.basic.parameters</field>-->
|
||||||
|
<!-- <field name="arch" type="xml">-->
|
||||||
|
<!-- <tree string="基础参数" delete="0" create="0">-->
|
||||||
|
<!-- <field name="total_length" />-->
|
||||||
|
<!-- <field name="blade_number" />-->
|
||||||
|
<!-- <field name="neck_diameter"/>-->
|
||||||
|
<!-- <field name="neck_length"/>-->
|
||||||
|
<!-- <field name="handle_diameter" />-->
|
||||||
|
<!-- <field name="handle_length" />-->
|
||||||
|
<!-- <field name="blade_tip_diameter"/>-->
|
||||||
|
<!-- <field name="blade_tip_working_size"/>-->
|
||||||
|
<!-- <field name="blade_tip_taper" />-->
|
||||||
|
<!-- <field name="blade_diameter" />-->
|
||||||
|
<!-- <field name="blade_length"/>-->
|
||||||
|
<!-- <field name="blade_helix_angle"/>-->
|
||||||
|
<!-- <field name="blade_width" />-->
|
||||||
|
<!-- <field name="blade_width" />-->
|
||||||
|
<!-- <field name="pitch"/>-->
|
||||||
|
<!-- <field name="cutting_depth"/>-->
|
||||||
|
<!-- </tree>-->
|
||||||
|
<!-- </field>-->
|
||||||
|
<!-- </record>-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
# from . import models
|
|
||||||
|
|||||||
@@ -10,11 +10,14 @@
|
|||||||
""",
|
""",
|
||||||
'category': 'sf',
|
'category': 'sf',
|
||||||
'website': 'https://www.sf.jikimo.com',
|
'website': 'https://www.sf.jikimo.com',
|
||||||
'depends': ['mrp', 'base', 'sale', 'sf_manufacturing', 'web_widget_model_viewer', 'mrp_subcontracting', 'purchase_stock',
|
'depends': ['mrp', 'base', 'sf_manufacturing', 'web_widget_model_viewer', 'mrp_subcontracting',
|
||||||
'uom','jikimo_frontend'],
|
'purchase_stock',
|
||||||
|
'uom', 'jikimo_frontend', 'product'],
|
||||||
'data': [
|
'data': [
|
||||||
'data/product_data.xml',
|
'data/product_data.xml',
|
||||||
'data/uom_data.xml',
|
'data/uom_data.xml',
|
||||||
|
'security/ir.model.access.csv',
|
||||||
|
# 'wizard/cutting_tool_specification_wizard.xml',
|
||||||
'views/product_template_view.xml',
|
'views/product_template_view.xml',
|
||||||
'views/product_workorder.xml'
|
'views/product_workorder.xml'
|
||||||
],
|
],
|
||||||
|
|||||||
4
sf_dlm/security/group_security.xml
Normal file
4
sf_dlm/security/group_security.xml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<odoo>
|
||||||
|
<data>
|
||||||
|
</data>
|
||||||
|
</odoo>
|
||||||
11
sf_dlm/security/ir.model.access.csv
Normal file
11
sf_dlm/security/ir.model.access.csv
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,19 +1,19 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<data>
|
<data>
|
||||||
<record model="ir.ui.view" id="view_product_template_only_form_inherit_sf">
|
<!-- <record model="ir.ui.view" id="view_product_template_only_form_inherit_sf">-->
|
||||||
<field name="name">product.template.only.form.inherit.sf</field>
|
<!-- <field name="name">product.template.only.form.inherit.sf</field>-->
|
||||||
<field name="model">product.template</field>
|
<!-- <field name="model">product.template</field>-->
|
||||||
<field name="inherit_id" ref="product.product_template_only_form_view"/>
|
<!-- <field name="inherit_id" ref="product.product_template_only_form_view"/>-->
|
||||||
<field name="arch" type="xml">
|
<!-- <field name="arch" type="xml">-->
|
||||||
<field name="barcode" position="replace">
|
<!-- <field name="barcode" position="replace">-->
|
||||||
<field name='barcode' invisible="1"/>
|
<!-- <field name='barcode' invisible="1"/>-->
|
||||||
</field>
|
<!-- </field>-->
|
||||||
<field name="default_code" position="replace">
|
<!-- <field name="default_code" position="replace">-->
|
||||||
<field name='default_code' invisible="1"/>
|
<!-- <field name='default_code' invisible="1"/>-->
|
||||||
</field>
|
<!-- </field>-->
|
||||||
</field>
|
<!-- </field>-->
|
||||||
</record>
|
<!-- </record>-->
|
||||||
|
|
||||||
<record model="ir.ui.view" id="view_product_template_form_inherit_sf">
|
<record model="ir.ui.view" id="view_product_template_form_inherit_sf">
|
||||||
<field name="name">product.template.form.inherit.sf</field>
|
<field name="name">product.template.form.inherit.sf</field>
|
||||||
@@ -52,15 +52,21 @@
|
|||||||
<field name="cutting_tool_material_id" attrs="{'invisible': [('categ_type', '!=', '刀具')]}"
|
<field name="cutting_tool_material_id" attrs="{'invisible': [('categ_type', '!=', '刀具')]}"
|
||||||
placeholder="请选择"/>
|
placeholder="请选择"/>
|
||||||
<field name="cutting_tool_model_id" placeholder="请选择"
|
<field name="cutting_tool_model_id" placeholder="请选择"
|
||||||
context="{'default_cutting_tool_material_id': cutting_tool_material_id,'default_cutting_tool_type_id': cutting_tool_type_id}"
|
|
||||||
attrs="{'invisible': [('categ_type', '!=', '刀具')]}"
|
attrs="{'invisible': [('categ_type', '!=', '刀具')]}"
|
||||||
domain="[('cutting_tool_material_id','=',cutting_tool_material_id)]"/>
|
domain="[('cutting_tool_material_id','=',cutting_tool_material_id)]"/>
|
||||||
|
<!-- <lable for="specification_id" class="type_label">规格</lable>-->
|
||||||
|
<!-- <div class="button_width">-->
|
||||||
|
<field name="specification_id" placeholder="请选择"
|
||||||
|
attrs="{'invisible': [('categ_type', '!=', '刀具')]}"
|
||||||
|
domain="[('standard_library_id','=',cutting_tool_model_id)]"/>
|
||||||
|
<!-- <button name="choice" type="object" class="oe_highlight">选择</button>-->
|
||||||
|
<!-- </div>-->
|
||||||
<field name="fixture_material_id" attrs="{'invisible': [('categ_type', '!=', '夹具')]}"
|
<field name="fixture_material_id" attrs="{'invisible': [('categ_type', '!=', '夹具')]}"
|
||||||
placeholder="请选择"/>
|
placeholder="请选择"/>
|
||||||
<field name="fixture_model_id" string="型号" placeholder="请选择"
|
<!-- <field name="fixture_model_id" string="型号" placeholder="请选择"-->
|
||||||
context="{'default_fixture_material_id': fixture_material_id,'default_multi_mounting_type_id': fixture_multi_mounting_type_id}"
|
<!-- context="{'default_fixture_material_id': fixture_material_id,'default_multi_mounting_type_id': fixture_multi_mounting_type_id}"-->
|
||||||
attrs="{'invisible': [('categ_type', '!=', '夹具')]}"
|
<!-- attrs="{'invisible': [('categ_type', '!=', '夹具')]}"-->
|
||||||
domain="[('fixture_material_id','=',fixture_material_id)]"/>
|
<!-- domain="[('fixture_material_id','=',fixture_material_id)]"/>-->
|
||||||
</field>
|
</field>
|
||||||
|
|
||||||
<xpath expr="//label[@for='volume']" position="before">
|
<xpath expr="//label[@for='volume']" position="before">
|
||||||
@@ -102,74 +108,169 @@
|
|||||||
</group>
|
</group>
|
||||||
</page>
|
</page>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//page[last()-1]" position="after">
|
<!-- <xpath expr="//page[@name='general_information']" position="after">-->
|
||||||
|
<!-- <page string="刀具物料参数" attrs="{'invisible': [('categ_type', '!=', '刀具')]}">-->
|
||||||
|
<!-- </page>-->
|
||||||
|
<!-- </xpath>-->
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
|
||||||
|
<record model="ir.ui.view" id="view_product_template_only_form_inherit_sf">
|
||||||
|
<field name="name">product.template.only.form.inherit.sf</field>
|
||||||
|
<field name="model">product.template</field>
|
||||||
|
<field name="inherit_id" ref="product.product_template_only_form_view"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<field name="barcode" position="replace">
|
||||||
|
<field name='barcode' invisible="1"/>
|
||||||
|
</field>
|
||||||
|
<field name="default_code" position="replace">
|
||||||
|
<field name='default_code' invisible="1"/>
|
||||||
|
</field>
|
||||||
|
<xpath expr="//page[@name='variants']" position="before">
|
||||||
<page string="刀具物料参数" attrs="{'invisible': [('categ_type', '!=', '刀具')]}">
|
<page string="刀具物料参数" attrs="{'invisible': [('categ_type', '!=', '刀具')]}">
|
||||||
<group>
|
<group>
|
||||||
<group attrs="{'invisible': [('categ_type', '!=', '刀具')]}" col="1">
|
<group attrs="{'invisible': [('categ_type', '!=', '刀具')]}" col="1">
|
||||||
<field name="cutting_tool_type_id" options="{'no_create': True}" placeholder="请选择" />
|
<field name="cutting_tool_type_id" options="{'no_create': True}" placeholder="请选择"/>
|
||||||
<field name="brand_id" options="{'no_create': True}" placeholder="请选择"/>
|
<field name="brand_id" options="{'no_create': True}" placeholder="请选择"/>
|
||||||
<field name="materials_type_id" options="{'no_create': True}"
|
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'in', ('整体式刀具','夹头','刀柄'))]}"
|
|
||||||
placeholder="请选择"/>
|
|
||||||
<field name="cutting_tool_total_length"
|
<field name="cutting_tool_total_length"
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀柄','夹头'))]}"/>
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀杆','刀盘','夹头','刀柄'))]}"/>
|
||||||
|
<field name="tool_hardness" string="硬度(hrc)"/>
|
||||||
|
<label for="cutting_tool_run_out_accuracy_min" string="端跳精度"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||||
|
<div class="o_address_format"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}">
|
||||||
|
<label for="cutting_tool_run_out_accuracy_min" string="最小"/>
|
||||||
|
<field name="cutting_tool_run_out_accuracy_min" class="o_address_zip"
|
||||||
|
options="{'format': false}"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type','!=','整体式刀具')]}"/>
|
||||||
|
<span>(mm)&nbsp;</span>
|
||||||
|
<label for="cutting_tool_run_out_accuracy_max" string="最大"/>
|
||||||
|
<field name="cutting_tool_run_out_accuracy_max" class="o_address_zip"
|
||||||
|
options="{'format': false}"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type','!=','整体式刀具')]}"/>
|
||||||
|
<span>(mm)&nbsp;</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<field name="tool_width"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}"/>
|
||||||
|
<field name="tool_height"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}"/>
|
||||||
<field name="cutting_tool_flange_length"
|
<field name="cutting_tool_flange_length"
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||||
|
<field name="cutting_tool_shank_outer_diameter"
|
||||||
<field name="materials_type_id" options="{'no_create': True}" string="刀具材质"
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"
|
<field name="cutting_tool_shank_inner_diameter"
|
||||||
placeholder="请选择"/>
|
|
||||||
<field name="tool_hardness" string="刀具硬度(hrc)"
|
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
|
||||||
<field name="materials_type_id" options="{'no_create': True}" string="夹头材质"
|
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"
|
|
||||||
placeholder="请选择"/>
|
|
||||||
<field name="tool_hardness" string="夹头硬度(hrc)"
|
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>
|
|
||||||
<field name="materials_type_id" options="{'no_create': True}" string="刀柄材质"
|
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"
|
|
||||||
placeholder="请选择"/>
|
|
||||||
<field name="tool_hardness" string="刀柄硬度(hrc)"
|
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||||
|
|
||||||
<field name="cutting_tool_blade_length"
|
<!-- <field name="materials_type_id" options="{'no_create': True}" string="刀具材质"-->
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
<!-- attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"-->
|
||||||
|
<!-- placeholder="请选择"/>-->
|
||||||
|
<!-- <field name="tool_hardness" string="刀具硬度(hrc)"-->
|
||||||
|
<!-- attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>-->
|
||||||
|
<!-- <field name="materials_type_id" options="{'no_create': True}" string="夹头材质"-->
|
||||||
|
<!-- attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"-->
|
||||||
|
<!-- placeholder="请选择"/>-->
|
||||||
|
<!-- <field name="tool_hardness" string="夹头硬度(hrc)"-->
|
||||||
|
<!-- attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>-->
|
||||||
|
<!-- <field name="materials_type_id" options="{'no_create': True}" string="刀柄材质"-->
|
||||||
|
<!-- attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"-->
|
||||||
|
<!-- placeholder="请选择"/>-->
|
||||||
|
<!-- <field name="tool_hardness" string="刀柄硬度(hrc)"-->
|
||||||
|
<!-- attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>-->
|
||||||
|
|
||||||
<field name="cutting_tool_blade_diameter" string="刃部直径(mm)" class="diameter"
|
<field name="cutting_tool_blade_diameter" string="刃部直径(mm)" class="diameter"
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||||
<field name="cutting_tool_blade_type"
|
<field name="cutting_tool_blade_length"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||||
|
<field name="cutting_tool_blade_width"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||||
|
<field name="cutting_tool_blade_depth"
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||||
<field name="cutting_tool_blade_helix_angle"
|
<field name="cutting_tool_blade_helix_angle"
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||||
<field name="cutting_tool_blade_number" placeholder="请选择"
|
<field name="cutting_tool_blade_number" placeholder="请选择"
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||||
|
<field name="cutting_tool_blade_tip_working_size"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||||
|
<field name="cutting_tool_blade_tip_diameter" string="刀尖直径(mm)" class="diameter"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||||
|
<field name="cutting_tool_blade_tip_taper" string="刀尖锥度(°)"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||||
<!--刀片-->
|
<!--刀片-->
|
||||||
<label for="tool_length" string="尺寸(mm)"
|
<label for="tool_length" string="尺寸(mm)"
|
||||||
attrs='{"invisible": [("cutting_tool_type","not in",("刀片","刀杆","刀盘"))]}'/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||||
<div class="test_model"
|
<div class="test_model"
|
||||||
attrs='{"invisible": [("cutting_tool_type","not in",("刀片","刀杆","刀盘"))]}'>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}">
|
||||||
<label for="tool_length" string="长"/>
|
<label for="tool_length" string="长"/>
|
||||||
<field name="tool_length" class="o_address_zip"
|
<field name="tool_length" class="o_address_zip"
|
||||||
options="{'format': false}"/>
|
options="{'format': false}"/>
|
||||||
<label for="tool_width" string="宽"/>
|
|
||||||
<field name="tool_width" class="o_address_zip"
|
|
||||||
options="{'format': false}"/>
|
|
||||||
<label for="tool_thickness" string="厚"/>
|
<label for="tool_thickness" string="厚"/>
|
||||||
<field name="tool_thickness" class="o_address_zip"
|
<field name="tool_thickness" class="o_address_zip"
|
||||||
options="{'format': false}"/>
|
options="{'format': false}"/>
|
||||||
|
<label for="tool_width" string="宽"/>
|
||||||
|
<field name="tool_width" class="o_address_zip"
|
||||||
|
options="{'format': false}"/>
|
||||||
</div>
|
</div>
|
||||||
<field name="cutting_tool_diameter" class="diameter"
|
<field name="cutting_tool_cut_blade_length"
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片','刀杆','刀盘'))]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||||
<field name="cutting_tool_blade_diameter" class="diameter" string="刃径"
|
<field name="cutting_tool_blade_tip_circular_arc_radius"
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||||
<field name="cutting_tool_blade_number"
|
<field name="cutting_tool_blade_tip_height_tolerance"
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片','刀杆','刀盘'))]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||||
<!--夹头-->
|
<field name="cutting_tool_inscribed_circle_diameter"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||||
|
<field name="cutting_tool_inscribed_circle_tolerance"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||||
|
<field name="cutting_tool_install_aperture_diameter"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||||
|
<field name="cutting_tool_chip_breaker_groove"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||||
|
<field name="cutting_tool_cut_depth_max"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||||
|
<field name="cutting_tool_blade_blade_number" string="刃数"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||||
|
<field name="cutting_tool_blade_width" string="刃宽"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||||
|
<!--刀杆-->
|
||||||
|
|
||||||
<field name="cutting_tool_clamping_way"
|
<label for="cutting_tool_knife_head_length" string="刀头尺寸(mm)"
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}"/>
|
||||||
|
<div class="test_model"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}">
|
||||||
|
<label for="cutting_tool_knife_head_length" string="长"/>
|
||||||
|
<field name="cutting_tool_knife_head_length" class="o_address_zip"
|
||||||
|
options="{'format': false}"/>
|
||||||
|
<label for="cutting_tool_knife_head_width" string="宽"/>
|
||||||
|
<field name="cutting_tool_knife_head_width" class="o_address_zip"
|
||||||
|
options="{'format': false}"/>
|
||||||
|
<label for="cutting_tool_knife_head_height" string="高"/>
|
||||||
|
<field name="cutting_tool_knife_head_height" class="o_address_zip"
|
||||||
|
options="{'format': false}"/>
|
||||||
|
</div>
|
||||||
|
<field name="cutting_tool_blade_diameter" string="刃部直径(mm)" class="diameter"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}"/>
|
||||||
|
|
||||||
|
<field name="cutting_tool_blade_length"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀盘')]}"/>
|
||||||
|
|
||||||
|
<field name="cutting_tool_cutter_arbor_diameter"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}"/>
|
||||||
|
<field name="cutting_tool_cut_blade_length" string="切削刃长度(mm)"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}"/>
|
||||||
|
<field name="cutting_tool_cut_depth_max"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}"/>
|
||||||
|
<field name="cutting_tool_min_machining_aperture"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}"/>
|
||||||
|
<field name="cutting_tool_install_blade_tip_num"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}"/>
|
||||||
|
<!--刀盘-->
|
||||||
|
<field name="cutting_tool_cutter_head_diameter"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀盘')]}"/>
|
||||||
|
<field name="cutting_tool_interface_diameter"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀盘')]}"/>
|
||||||
|
|
||||||
|
<!--夹头-->
|
||||||
<field name="cutting_tool_clamping_length"
|
<field name="cutting_tool_clamping_length"
|
||||||
attrs='{"invisible": [("cutting_tool_type","!=","夹头")]}'/>
|
attrs='{"invisible": [("cutting_tool_type","!=","夹头")]}'/>
|
||||||
<field name="cutting_tool_clamping_tolerance"
|
<field name="cutting_tool_clamping_tolerance"
|
||||||
@@ -189,12 +290,15 @@
|
|||||||
attrs="{'required': [('cutting_tool_type','not in',('夹头','刀柄'))]}"/>
|
attrs="{'required': [('cutting_tool_type','not in',('夹头','刀柄'))]}"/>
|
||||||
<span>(mm)&nbsp;</span>
|
<span>(mm)&nbsp;</span>
|
||||||
</div>
|
</div>
|
||||||
<field name="cutting_tool_head_diameter" class="diameter"
|
<field name="cutting_tool_clamping_way"
|
||||||
|
attrs="{'required': [('cutting_tool_type','not in',('夹头','刀柄'))]}"/>
|
||||||
|
<field name="cutting_tool_top_diameter" class="diameter"
|
||||||
attrs='{"invisible": [("cutting_tool_type","!=","夹头")]}'/>
|
attrs='{"invisible": [("cutting_tool_type","!=","夹头")]}'/>
|
||||||
<field name="cutting_tool_outer_diameter" class="diameter"
|
<field name="cutting_tool_outer_diameter" class="diameter"
|
||||||
attrs='{"invisible": [("cutting_tool_type","!=","夹头")]}'/>
|
attrs='{"invisible": [("cutting_tool_type","!=","夹头")]}'/>
|
||||||
<field name="cutting_tool_inner_diameter" class="diameter"
|
<field name="cutting_tool_inner_diameter" class="diameter"
|
||||||
attrs='{"invisible": [("cutting_tool_type","!=","夹头")]}'/>
|
attrs='{"invisible": [("cutting_tool_type","!=","夹头")]}'/>
|
||||||
|
<!--夹头-->
|
||||||
|
|
||||||
<field name="cutting_tool_standard_speed"
|
<field name="cutting_tool_standard_speed"
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||||
@@ -204,84 +308,63 @@
|
|||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||||
<field name="cutting_tool_cooling_type"
|
<field name="cutting_tool_cooling_type"
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||||
<field name="cutting_tool_dynamic_balance_class"
|
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
|
||||||
</group>
|
</group>
|
||||||
<group attrs="{'invisible': [('categ_type', '!=', '刀具')]}">
|
<group attrs="{'invisible': [('categ_type', '!=', '刀具')]}">
|
||||||
<!--整体式刀具-->
|
<field name="materials_type_id" options="{'no_create': True}" placeholder="请选择"
|
||||||
<field name="cutting_tool_shank_length"
|
string="材质"/>
|
||||||
|
<field name="coating_material"/>
|
||||||
|
<field name="cutting_tool_blade_type"
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||||
|
<field name="cutting_tool_coarse_medium_fine" string="粗/中/精" placeholder="请选择"
|
||||||
|
attrs="{'required': [('cutting_tool_type','=','整体式刀具')],'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))]}"/>
|
||||||
|
<!--整体式刀具-->
|
||||||
<field name="cutting_tool_shank_diameter" string="柄部直径(mm)" class="diameter"
|
<field name="cutting_tool_shank_diameter" string="柄部直径(mm)" class="diameter"
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||||
<field name="cutting_tool_neck_length" string="颈部长度(mm)"
|
<field name="cutting_tool_shank_length"
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||||
<field name="cutting_tool_neck_diameter" string="颈部直径(mm)" class="diameter"
|
<field name="cutting_tool_neck_diameter" string="颈部直径(mm)" class="diameter"
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||||
<field name="cutting_tool_blade_tip_diameter" string="刀尖直径(mm)" class="diameter"
|
<field name="cutting_tool_neck_length" string="颈部长度(mm)"
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||||
<field name="cutting_tool_blade_tip_taper" string="刀尖锥度(°)"
|
<field name="cutting_tool_cut_depth"
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||||
|
<field name="cutting_tool_pitch"
|
||||||
<label for="cutting_tool_run_out_accuracy_min" string="端跳精度"
|
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||||
<div class="o_address_format"
|
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}">
|
|
||||||
<label for="cutting_tool_run_out_accuracy_min" string="最小"/>
|
|
||||||
<field name="cutting_tool_run_out_accuracy_min" class="o_address_zip"
|
|
||||||
options="{'format': false}"
|
|
||||||
attrs="{'invisible': [('cutting_tool_type','!=','整体式刀具')]}"/>
|
|
||||||
<span>(mm)&nbsp;</span>
|
|
||||||
<label for="cutting_tool_run_out_accuracy_max" string="最大"/>
|
|
||||||
<field name="cutting_tool_run_out_accuracy_max" class="o_address_zip"
|
|
||||||
options="{'format': false}"
|
|
||||||
attrs="{'invisible': [('cutting_tool_type','!=','整体式刀具')]}"/>
|
|
||||||
<span>(mm)&nbsp;</span>
|
|
||||||
</div>
|
|
||||||
<field name="cutting_tool_coarse_medium_fine" string="粗/中/精" placeholder="请选择"
|
|
||||||
attrs="{'required': [('cutting_tool_type','=','整体式刀具')],'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
|
||||||
|
|
||||||
<field name="tool_weight"
|
<field name="tool_weight"
|
||||||
attrs='{"invisible": [("cutting_tool_type","not in",("夹头","刀柄"))]}'/>
|
attrs='{"invisible": [("cutting_tool_type","not in",("夹头","刀柄"))]}'/>
|
||||||
<field name="cutting_tool_taper"
|
<field name="cutting_tool_taper"
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('夹头','刀柄'))]}"/>
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('夹头','刀柄'))]}"/>
|
||||||
|
|
||||||
<label for="cutting_tool_detection_accuracy_min" string="检测精度"
|
|
||||||
attrs='{"invisible": [("cutting_tool_type","not in",("刀柄"))]}'/>
|
|
||||||
<div class="o_address_format"
|
|
||||||
attrs='{"invisible": [("cutting_tool_type","not in",("刀柄"))]}'>
|
|
||||||
<label for="cutting_tool_detection_accuracy_min" string="最小"/>
|
|
||||||
<field name="cutting_tool_detection_accuracy_min" class="o_address_zip"
|
|
||||||
options="{'format': false}"
|
|
||||||
attrs="{'required': [('cutting_tool_type','=','刀柄')]}"/>
|
|
||||||
<span>(mm)&nbsp;</span>
|
|
||||||
<label for="cutting_tool_detection_accuracy_max" string="最大"/>
|
|
||||||
<field name="cutting_tool_detection_accuracy_max" class="o_address_zip"
|
|
||||||
options="{'format': false}"
|
|
||||||
attrs="{'required': [('cutting_tool_type','=','刀柄')]}"/>
|
|
||||||
<span>(mm)&nbsp;</span>
|
|
||||||
</div>
|
|
||||||
<field name="cutting_tool_body_accuracy"
|
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
|
||||||
<field name="cutting_tool_jump_accuracy"
|
<field name="cutting_tool_jump_accuracy"
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||||
<field name="cutting_tool_front_angle"
|
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片'))]}"/>
|
|
||||||
<field name="cutting_tool_top_angle"
|
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片'))]}"/>
|
|
||||||
<field name="cutting_tool_rear_angle"
|
<field name="cutting_tool_rear_angle"
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片'))]}"/>
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片'))]}"/>
|
||||||
<field name="cutting_tool_main_included_angle"
|
<field name="cutting_tool_main_included_angle"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片','刀杆'))]}"/>
|
||||||
|
<!-- <field name="cutting_tool_front_angle"-->
|
||||||
|
<!-- attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片'))]}"/>-->
|
||||||
|
<field name="cutting_tool_top_angle"
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片'))]}"/>
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片'))]}"/>
|
||||||
<field name="coating_material"
|
<field name="cutting_tool_blade_tip_dip_angle"
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片','刀柄'))]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||||
<field name="cutting_tool_accuracy_level"
|
<field name="cutting_tool_side_cutting_edge_angle"
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'in', ('刀柄', '整体式刀具','夹头'))]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||||
<field name="cutting_tool_working_hardness"
|
<field name="cutting_tool_pitch"
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'in', ('整体式刀具','夹头','刀柄'))]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||||
|
<field name="cutting_tool_bladed_teeth_model"
|
||||||
<!-- <field name="tool_height" attrs='{"invisible": [("cutting_tool_type","!=","夹头")]}'/>-->
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||||
|
<field name="cutting_tool_thickness_tolerance"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||||
|
<field name="cutting_tool_thread_model"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||||
|
<field name="cutting_tool_thread_num"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||||
|
<field name="cutting_tool_cutter_bar_ids" widget="many2many_tags"
|
||||||
|
options="{'no_create': True}"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||||
|
<field name="cutting_tool_cutter_pad_ids" widget="many2many_tags"
|
||||||
|
options="{'no_create': True}"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}"/>
|
||||||
|
<!--刀柄-->
|
||||||
<field name="cutting_tool_is_rough_finish"
|
<field name="cutting_tool_is_rough_finish"
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||||
<field name="cutting_tool_is_finish"
|
<field name="cutting_tool_is_finish"
|
||||||
@@ -296,7 +379,7 @@
|
|||||||
|
|
||||||
<field name="cutting_tool_jump_accuracy" string="跳动精度(mm)"
|
<field name="cutting_tool_jump_accuracy" string="跳动精度(mm)"
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>
|
||||||
<field name="coating_material"
|
<field name="cutting_tool_max_load_capacity"
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>
|
||||||
<field name="cutting_tool_er_size_model"
|
<field name="cutting_tool_er_size_model"
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>
|
||||||
@@ -305,50 +388,59 @@
|
|||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>
|
||||||
<field name="cooling_suit_type_ids"
|
<field name="cooling_suit_type_ids"
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}"/>
|
||||||
|
<!-- 刀杆 -->
|
||||||
<field name="cutting_tool_wrench"
|
<field name="cutting_tool_rear_angle"
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘' ))]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}"/>
|
||||||
<!-- <field name="cutting_tool_screw"-->
|
<field name="cutting_tool_installing_structure"
|
||||||
<!-- attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀柄'))]}"/>-->
|
|
||||||
<field name="cutting_tool_nut"
|
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片'))]}"/>
|
|
||||||
|
|
||||||
<field name="cutting_tool_cutter_bar_ids" widget="many2many_tags"
|
|
||||||
options="{'no_create': True}"
|
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片'))]}"/>
|
|
||||||
<field name="cutting_tool_cutter_pad_ids" widget="many2many_tags"
|
|
||||||
options="{'no_create': True}"
|
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片'))]}"/>
|
|
||||||
<field name="cutting_tool_blade_ids" widget="many2many_tags"
|
|
||||||
options="{'no_create': True}"
|
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}"/>
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}"/>
|
||||||
|
<field name="cutting_tool_is_cooling_hole"
|
||||||
<field name="cutting_tool_chuck_ids" widget="many2many_tags"
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}"/>
|
||||||
options="{'no_create': True}"
|
<field name="cutting_tool_locating_slot_code"
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘','刀柄'))]}"/>
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}"/>
|
||||||
<field name="apply_lock_nut_model"
|
<field name="cutting_tool_blade_ids" widget="many2many_tags"
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}"/>
|
||||||
<field name="apply_lock_wrench_model"
|
<field name="cutting_tool_tool_shim"
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}"/>
|
||||||
|
<field name="cutting_tool_cotter_pin"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}"/>
|
||||||
|
<field name="cutting_tool_pressing_plate"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}"/>
|
||||||
|
<field name="cutting_tool_screw"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀柄'))]}"/>
|
||||||
|
<field name="cutting_tool_wrench"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀柄'))]}"/>
|
||||||
|
<!-- 刀盘 -->
|
||||||
|
<field name="cutting_tool_blade_ids" widget="many2many_tags"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀盘')]}"/>
|
||||||
|
<field name="cutting_tool_blade_ids" widget="many2many_tags"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀盘')]}"/>
|
||||||
|
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<group col="1" attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}">
|
<group string="适配刀片形状"
|
||||||
<group string="适合加工方式">
|
attrs="{'invisible': [('cutting_tool_type', 'in', ('刀柄','夹头','整体式刀具',False))]}">
|
||||||
|
<field name="fit_blade_shape_id" string="" widget="custom_many2many_checkboxes"/>
|
||||||
|
</group>
|
||||||
|
<group string="适合加工方式"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀杆','刀盘','刀片'))]}">
|
||||||
<field name="suitable_machining_method_ids" string=""
|
<field name="suitable_machining_method_ids" string=""
|
||||||
widget="custom_many2many_checkboxes"/>
|
widget="custom_many2many_checkboxes"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group string="刀尖特征"
|
||||||
<group string="刀尖特征">
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀杆','刀盘','刀片'))]}">
|
||||||
<field name="blade_tip_characteristics_ids" string=""
|
<field name="blade_tip_characteristics_id" string=""
|
||||||
widget="custom_many2many_checkboxes"/>
|
widget="custom_many2many_checkboxes"/>
|
||||||
</group>
|
</group>
|
||||||
<group string="柄部类型">
|
<group attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀杆','刀盘','刀片'))]}">
|
||||||
|
<group string="柄部类型" attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}">
|
||||||
<field name="handle_type_ids" string="" widget="custom_many2many_checkboxes"/>
|
<field name="handle_type_ids" string="" widget="custom_many2many_checkboxes"/>
|
||||||
</group>
|
</group>
|
||||||
|
<group string="压紧方式"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}">
|
||||||
|
<field name="compaction_way_ids" string="" widget="custom_many2many_checkboxes"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
</group>
|
||||||
|
<group attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀杆','刀盘','刀片'))]}">
|
||||||
<group string="走刀方向">
|
<group string="走刀方向">
|
||||||
<field name="cutting_direction_ids" string="" widget="custom_many2many_checkboxes"/>
|
<field name="cutting_direction_ids" string="" widget="custom_many2many_checkboxes"/>
|
||||||
</group>
|
</group>
|
||||||
@@ -357,13 +449,14 @@
|
|||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<notebook>
|
<notebook>
|
||||||
<page string="切削速度Vc">
|
<page string="切削速度Vc"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))]}">
|
||||||
<field name="cutting_speed_ids" string="" widget="one2many">
|
<field name="cutting_speed_ids" string="" widget="one2many">
|
||||||
<tree editable="bottom">
|
<tree editable="bottom">
|
||||||
<!-- <field name="order"/>-->
|
<!-- <field name="order"/>-->
|
||||||
<field name="execution_standard_id"/>
|
<field name="execution_standard_id"/>
|
||||||
<field name="material_code"/>
|
<field name="material_code"/>
|
||||||
<field name="material_name"/>
|
<field name="material_id"/>
|
||||||
<field name="material_grade"/>
|
<field name="material_grade"/>
|
||||||
<field name="tensile_strength"/>
|
<field name="tensile_strength"/>
|
||||||
<field name="hardness"/>
|
<field name="hardness"/>
|
||||||
@@ -378,7 +471,8 @@
|
|||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</page>
|
</page>
|
||||||
<page string="每齿走刀量fz">
|
<page string="每齿走刀量fz"
|
||||||
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))]}">
|
||||||
<field name="feed_per_tooth_ids" string="" widget="one2many">
|
<field name="feed_per_tooth_ids" string="" widget="one2many">
|
||||||
<tree editable="bottom">
|
<tree editable="bottom">
|
||||||
<field name="cutting_speed"
|
<field name="cutting_speed"
|
||||||
@@ -389,13 +483,10 @@
|
|||||||
attrs="{'readonly': [('cutting_speed','!=',False)]}"/>
|
attrs="{'readonly': [('cutting_speed','!=',False)]}"/>
|
||||||
<field name="blade_diameter"/>
|
<field name="blade_diameter"/>
|
||||||
<field name="feed_per_tooth"/>
|
<field name="feed_per_tooth"/>
|
||||||
<field name="unit"/>
|
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</page>
|
</page>
|
||||||
</notebook>
|
</notebook>
|
||||||
|
|
||||||
</group>
|
|
||||||
</page>
|
</page>
|
||||||
<page string="夹具物料参数" attrs="{'invisible': [('categ_type', '!=', '夹具')]}">
|
<page string="夹具物料参数" attrs="{'invisible': [('categ_type', '!=', '夹具')]}">
|
||||||
<group attrs='{"invisible": [("fixture_material_type","not in",("气动夹具","转接板(锁板)夹具","磁吸夹具","虎钳夹具","零点卡盘","零点托盘"))]}'>
|
<group attrs='{"invisible": [("fixture_material_type","not in",("气动夹具","转接板(锁板)夹具","磁吸夹具","虎钳夹具","零点卡盘","零点托盘"))]}'>
|
||||||
|
|||||||
@@ -48,8 +48,8 @@ class SfEquipmentSaintenanceStandards(models.Model):
|
|||||||
string='适用设备',
|
string='适用设备',
|
||||||
domain="[('category_id', '=', maintenance_equipment_category_id)]"
|
domain="[('category_id', '=', maintenance_equipment_category_id)]"
|
||||||
)
|
)
|
||||||
|
maintenance_standards_ids = fields.One2many('maintenance.standards', 'equipment_maintenance_standards_id',
|
||||||
maintenance_standards_ids = fields.One2many('maintenance.standards', 'equipment_maintenance_standards_id', string='维保项目')
|
string='维保项目', widget='one2many_list')
|
||||||
eq_maintenance_ids = fields.One2many('maintenance.equipment', 'eq_maintenance_id', string='保养设备')
|
eq_maintenance_ids = fields.One2many('maintenance.equipment', 'eq_maintenance_id', string='保养设备')
|
||||||
overhaul_ids = fields.One2many('maintenance.equipment', 'overhaul_id', string='检修设备')
|
overhaul_ids = fields.One2many('maintenance.equipment', 'overhaul_id', string='检修设备')
|
||||||
|
|
||||||
@@ -81,6 +81,7 @@ class SfSaintenanceStandards(models.Model):
|
|||||||
[('电气类', '电气类'), ('机械类', '机械类'), ('程序类', '程序类'), ('系统类', '系统类')], string='类别')
|
[('电气类', '电气类'), ('机械类', '机械类'), ('程序类', '程序类'), ('系统类', '系统类')], string='类别')
|
||||||
equipment_maintenance_standards_id = fields.Many2one('equipment.maintenance.standards', string='设备维保标准')
|
equipment_maintenance_standards_id = fields.Many2one('equipment.maintenance.standards', string='设备维保标准')
|
||||||
images = fields.One2many('maintenance.standard.image', 'standard_id', string='反馈图片')
|
images = fields.One2many('maintenance.standard.image', 'standard_id', string='反馈图片')
|
||||||
|
maintenance_request_ids = fields.Many2many('maintenance.request', string='维保计划')
|
||||||
Period = fields.Integer('周期/频次(天)')
|
Period = fields.Integer('周期/频次(天)')
|
||||||
remark = fields.Char('备注说明')
|
remark = fields.Char('备注说明')
|
||||||
|
|
||||||
|
|||||||
@@ -237,9 +237,9 @@ class SfMaintenanceEquipment(models.Model):
|
|||||||
item.brand_id = item.type_id.brand_id.id
|
item.brand_id = item.type_id.brand_id.id
|
||||||
|
|
||||||
# AGV小车设备参数
|
# AGV小车设备参数
|
||||||
AGV_L = fields.Char('设备尺寸(长)')
|
AGV_L = fields.Char('AGV尺寸(长)')
|
||||||
AGV_W = fields.Char('设备尺寸(宽)')
|
AGV_W = fields.Char('AGV尺寸(宽)')
|
||||||
AGV_H = fields.Char('设备尺寸(高)')
|
AGV_H = fields.Char('AGV尺寸(高)')
|
||||||
AGV_goods_L = fields.Char('载货尺寸(长)')
|
AGV_goods_L = fields.Char('载货尺寸(长)')
|
||||||
AGV_goods_W = fields.Char('载货尺寸(宽)')
|
AGV_goods_W = fields.Char('载货尺寸(宽)')
|
||||||
AGV_goods_H = fields.Char('载货尺寸(高)')
|
AGV_goods_H = fields.Char('载货尺寸(高)')
|
||||||
@@ -276,9 +276,9 @@ class SfMaintenanceEquipment(models.Model):
|
|||||||
detect_L = fields.Char('设备尺寸(长)')
|
detect_L = fields.Char('设备尺寸(长)')
|
||||||
detect_W = fields.Char('设备尺寸(宽)')
|
detect_W = fields.Char('设备尺寸(宽)')
|
||||||
detect_H = fields.Char('设备尺寸(高)')
|
detect_H = fields.Char('设备尺寸(高)')
|
||||||
detect_x_axis = fields.Char('X轴')
|
detect_x_axis = fields.Char('检测X轴')
|
||||||
detect_y_axis = fields.Char('Y轴')
|
detect_y_axis = fields.Char('检测Y轴')
|
||||||
detect_z_axis = fields.Char('Z轴')
|
detect_z_axis = fields.Char('检测Z轴')
|
||||||
detect_precision = fields.Char('测量精度')
|
detect_precision = fields.Char('测量精度')
|
||||||
detect_measurement_mode = fields.Selection([('光栅尺', '光栅尺'), ('容栅', '容栅'), ('磁栅', '磁栅'), ('激光干涉仪', '激光干涉仪')], string='测量方式')
|
detect_measurement_mode = fields.Selection([('光栅尺', '光栅尺'), ('容栅', '容栅'), ('磁栅', '磁栅'), ('激光干涉仪', '激光干涉仪')], string='测量方式')
|
||||||
detect_resolution = fields.Char('分辨率')
|
detect_resolution = fields.Char('分辨率')
|
||||||
@@ -295,8 +295,8 @@ class SfMaintenanceEquipment(models.Model):
|
|||||||
detect_object_field_of_view_max = fields.Char('物方视场(最大)')
|
detect_object_field_of_view_max = fields.Char('物方视场(最大)')
|
||||||
detect_object_field_of_view_min = fields.Char('物方视场(最小)')
|
detect_object_field_of_view_min = fields.Char('物方视场(最小)')
|
||||||
detect_power_requirements = fields.Char('电源要求')
|
detect_power_requirements = fields.Char('电源要求')
|
||||||
detect_operating_temperature = fields.Char('环境温度')
|
detect_operating_temperature = fields.Char('检测设备环境温度')
|
||||||
detect_operating_humidity = fields.Char('环境湿度')
|
detect_operating_humidity = fields.Char('检测设备环境湿度')
|
||||||
|
|
||||||
# 机器人设备参数
|
# 机器人设备参数
|
||||||
robot_gripping_of_workpieces_L = fields.Char('可抓取工件(长)')
|
robot_gripping_of_workpieces_L = fields.Char('可抓取工件(长)')
|
||||||
@@ -313,8 +313,8 @@ class SfMaintenanceEquipment(models.Model):
|
|||||||
robot_track_dimensions_H = fields.Char('轨道尺寸(高)')
|
robot_track_dimensions_H = fields.Char('轨道尺寸(高)')
|
||||||
robot_drive_mode = fields.Char('驱动方式')
|
robot_drive_mode = fields.Char('驱动方式')
|
||||||
robot_installation_method = fields.Selection([('置地式', '置地式'), ('壁挂式', '壁挂式'), ('倒挂式', '倒挂式')], string='安装方式')
|
robot_installation_method = fields.Selection([('置地式', '置地式'), ('壁挂式', '壁挂式'), ('倒挂式', '倒挂式')], string='安装方式')
|
||||||
robot_operating_temperature = fields.Char('环境温度')
|
robot_operating_temperature = fields.Char('机器人环境温度')
|
||||||
robot_operating_humidity = fields.Char('环境湿度')
|
robot_operating_humidity = fields.Char('机器人环境湿度')
|
||||||
|
|
||||||
# 其他参数(所有设备)
|
# 其他参数(所有设备)
|
||||||
date_of_purchase = fields.Date('采购日期')
|
date_of_purchase = fields.Date('采购日期')
|
||||||
@@ -582,50 +582,6 @@ class SfMaintenanceEquipment(models.Model):
|
|||||||
image_id = fields.Many2many('maintenance.equipment.image', 'equipment_id', string='加工能力', domain="[('type', '=', '加工能力')]")
|
image_id = fields.Many2many('maintenance.equipment.image', 'equipment_id', string='加工能力', domain="[('type', '=', '加工能力')]")
|
||||||
|
|
||||||
|
|
||||||
class MaintenanceStandardImage(models.Model):
|
|
||||||
_name = 'maintenance.equipment.image'
|
|
||||||
_description = '能力特征库'
|
|
||||||
|
|
||||||
active = fields.Boolean('有效', default=True)
|
|
||||||
name = fields.Char('名称')
|
|
||||||
image = fields.Binary(string='图文')
|
|
||||||
type = fields.Selection(
|
|
||||||
[('加工能力', '加工能力'), ('刀尖特征', '刀尖特征'), ('柄部类型', '柄部类型'), ('走刀方向', '走刀方向'),
|
|
||||||
('冷却液', '冷却液'), ('压紧方式', '压紧方式'), ('刀片形状', '刀片形状')],
|
|
||||||
string='特征')
|
|
||||||
equipment_id = fields.Many2many('maintenance.equipment', 'image_id', string='设备')
|
|
||||||
|
|
||||||
@api.model
|
|
||||||
def name_search(self, name='', args=None, operator='ilike', limit=100):
|
|
||||||
# 调用父类的name_search方法,获取原始的结果列表
|
|
||||||
res = super().name_search(name, args, operator, limit)
|
|
||||||
# 定义一个空字典用来存储id和name的映射关系
|
|
||||||
name_dict = {}
|
|
||||||
# 遍历结果列表,将id和name存入字典中
|
|
||||||
for item in res:
|
|
||||||
id = item[0]
|
|
||||||
name = item[1]
|
|
||||||
name_dict[id] = name
|
|
||||||
# 根据id列表搜索符合条件的记录
|
|
||||||
records = self.browse(name_dict.keys())
|
|
||||||
# 定义一个新的结果列表用来存储修改后的结果
|
|
||||||
new_res = []
|
|
||||||
# 遍历每条记录
|
|
||||||
for record in records:
|
|
||||||
# 获取记录的id,name和image属性
|
|
||||||
id = record.id
|
|
||||||
name = name_dict[id]
|
|
||||||
image = record.image
|
|
||||||
# 如果image不为空,将其转换为data URI scheme
|
|
||||||
if image:
|
|
||||||
data_uri = f"data:image/png;base64,{image.decode('utf-8')}"
|
|
||||||
else:
|
|
||||||
data_uri = ""
|
|
||||||
# 将这三个属性组成一个数组,并添加到结果列表中 result.append([id, name, data_uri]) # 返回结果列表 return result
|
|
||||||
new_res.append([id, name, data_uri])
|
|
||||||
# 返回新的结果列表
|
|
||||||
return new_res
|
|
||||||
|
|
||||||
class SfRobotAxisNum(models.Model):
|
class SfRobotAxisNum(models.Model):
|
||||||
_name = 'sf.robot.axis.num'
|
_name = 'sf.robot.axis.num'
|
||||||
_description = '机器人轴参数'
|
_description = '机器人轴参数'
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ class SfMaintenanceEquipmentCategory(models.Model):
|
|||||||
if not record.equipment_maintenance_id:
|
if not record.equipment_maintenance_id:
|
||||||
record.equipment_maintenance_id = False
|
record.equipment_maintenance_id = False
|
||||||
|
|
||||||
maintenance_standards = fields.Many2many('maintenance.standards', string='维保标准')
|
maintenance_standards = fields.Many2many('maintenance.standards', string='维保项目')
|
||||||
|
|
||||||
@api.constrains('equipment_maintenance_id')
|
@api.constrains('equipment_maintenance_id')
|
||||||
def _check_equipment_maintenance_id(self):
|
def _check_equipment_maintenance_id(self):
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ access_sf_maintenance_logs,sf_maintenance_logs,model_sf_maintenance_logs,base.gr
|
|||||||
access_maintenance_equipment,maintenance_equipment,model_maintenance_equipment,base.group_user,1,1,1,1
|
access_maintenance_equipment,maintenance_equipment,model_maintenance_equipment,base.group_user,1,1,1,1
|
||||||
access_maintenance_standards,maintenance_standards,model_maintenance_standards,base.group_user,1,1,1,1
|
access_maintenance_standards,maintenance_standards,model_maintenance_standards,base.group_user,1,1,1,1
|
||||||
access_maintenance_standard_image,maintenance_standard_image,model_maintenance_standard_image,base.group_user,1,1,1,1
|
access_maintenance_standard_image,maintenance_standard_image,model_maintenance_standard_image,base.group_user,1,1,1,1
|
||||||
access_maintenance_equipment_image,maintenance_equipment_image,model_maintenance_equipment_image,base.group_user,1,1,1,1
|
|
||||||
access_sf_robot_axis_num,sf_robot_axis_num,model_sf_robot_axis_num,base.group_user,1,1,1,1
|
access_sf_robot_axis_num,sf_robot_axis_num,model_sf_robot_axis_num,base.group_user,1,1,1,1
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
|
@@ -1,5 +1,63 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
|
<!-- 维保项目表单视图-->
|
||||||
|
|
||||||
|
<record id="view_maintenance_standards_form" model="ir.ui.view">
|
||||||
|
<field name="name">maintenance.standards.form</field>
|
||||||
|
<field name="model">maintenance.standards</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form string="设备维保项目">
|
||||||
|
<sheet>
|
||||||
|
<group>
|
||||||
|
<group>
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="maintenance_standards"/>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="remark"/>
|
||||||
|
<field name="maintenance_request_ids" invisible="1"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<notebook>
|
||||||
|
<page string="上传图片" autofocus="autofocus">
|
||||||
|
<field name="images" mode="kanban">
|
||||||
|
<kanban quick_create="1" create="1">
|
||||||
|
<field name="image"/>
|
||||||
|
<templates>
|
||||||
|
<t t-name="kanban-box">
|
||||||
|
<div class="oe_kanban_global_click">
|
||||||
|
<!-- 在这里定义每个卡片的内容 -->
|
||||||
|
<span>
|
||||||
|
<image>
|
||||||
|
<field name="image" preview_image="image_128" widget="image"/>
|
||||||
|
</image>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</t>
|
||||||
|
</templates>
|
||||||
|
</kanban>
|
||||||
|
<form>
|
||||||
|
<sheet>
|
||||||
|
<field name="image" preview_image="image_128" widget="image"/>
|
||||||
|
<field name="standard_id"/>
|
||||||
|
</sheet>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</page>
|
||||||
|
|
||||||
|
</notebook>
|
||||||
|
</sheet>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="action_view_maintenance_standards_tree" model="ir.actions.act_window">
|
||||||
|
<field name="name">Maintenance Standards</field>
|
||||||
|
<field name="res_model">maintenance.standards</field>
|
||||||
|
<field name="view_mode">tree,form</field>
|
||||||
|
<field name="view_id" ref="view_maintenance_standards_form"/>
|
||||||
|
</record>
|
||||||
<!-- equiment.request : actions -->
|
<!-- equiment.request : actions -->
|
||||||
|
|
||||||
<record model="ir.ui.view" id="sf_hr_equipment_request_view_form">
|
<record model="ir.ui.view" id="sf_hr_equipment_request_view_form">
|
||||||
@@ -21,17 +79,16 @@
|
|||||||
<sheet>
|
<sheet>
|
||||||
|
|
||||||
<notebook>
|
<notebook>
|
||||||
<page string="维保标准" attrs="{'invisible': [('equipment_maintenance_id', '=', False)]}">
|
<page string="维保标准" attrs="{'invisible': [('equipment_maintenance_id', '=', False)]}" context="{'default_standard_id': 'id'}">
|
||||||
<field name="maintenance_standards" widget="ony2many">
|
<field name="maintenance_standards" widget="one2many_list">
|
||||||
<tree>
|
<tree multi_edit="" editable="">
|
||||||
<field name="sequence"/>
|
<field name="name" />
|
||||||
<field name="name"/>
|
|
||||||
<field name="maintenance_standards"/>
|
<field name="maintenance_standards"/>
|
||||||
<field name="images"/>
|
<field name="images" force_save="1" required="1">
|
||||||
|
</field>
|
||||||
<field name="remark"/>
|
<field name="remark"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
|
|
||||||
</page>
|
</page>
|
||||||
</notebook>
|
</notebook>
|
||||||
|
|
||||||
@@ -71,40 +128,5 @@
|
|||||||
<field name="active" eval="False"/>
|
<field name="active" eval="False"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- 维保项目表单视图-->
|
|
||||||
|
|
||||||
<record id="view_maintenance_standards_form" model="ir.ui.view">
|
|
||||||
<field name="name">maintenance.standards.form</field>
|
|
||||||
<field name="model">maintenance.standards</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form string="设备维保项目">
|
|
||||||
<sheet>
|
|
||||||
<group>
|
|
||||||
<group>
|
|
||||||
<field name="sequence"/>
|
|
||||||
<field name="name"/>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="maintenance_standards"/>
|
|
||||||
<field name="remark"/>
|
|
||||||
</group>
|
|
||||||
|
|
||||||
|
|
||||||
</group>
|
|
||||||
<notebook>
|
|
||||||
<page string="上传图片">
|
|
||||||
<field name="images" widget="one2many">
|
|
||||||
<tree editable="bottom">
|
|
||||||
<field name="image" widget="image" options="{'size': [100, 100], 'click enlarge': True}"/>
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</page>
|
|
||||||
</notebook>
|
|
||||||
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
@@ -1136,6 +1136,7 @@
|
|||||||
<!-- groups="maintenance.group_equipment_manager,base.group_user"-->
|
<!-- groups="maintenance.group_equipment_manager,base.group_user"-->
|
||||||
<!-- sequence="1"/-->
|
<!-- sequence="1"/-->
|
||||||
<!-- 设备图文展示-->
|
<!-- 设备图文展示-->
|
||||||
|
|
||||||
<record id="view_maintenance_equipment_image_tree" model="ir.ui.view">
|
<record id="view_maintenance_equipment_image_tree" model="ir.ui.view">
|
||||||
<field name="name">maintenance.equipment.image.tree</field>
|
<field name="name">maintenance.equipment.image.tree</field>
|
||||||
<field name="model">maintenance.equipment.image</field>
|
<field name="model">maintenance.equipment.image</field>
|
||||||
@@ -1188,4 +1189,5 @@
|
|||||||
sequence="0"/>
|
sequence="0"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
@@ -1 +1,3 @@
|
|||||||
from . import models
|
from . import models
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,6 @@
|
|||||||
'views/production_line_view.xml',
|
'views/production_line_view.xml',
|
||||||
'views/mrp_workcenter_views.xml',
|
'views/mrp_workcenter_views.xml',
|
||||||
'views/mrp_workorder_view.xml',
|
'views/mrp_workorder_view.xml',
|
||||||
'views/tool_other_features_view.xml',
|
|
||||||
'views/model_type_view.xml',
|
'views/model_type_view.xml',
|
||||||
'views/sf_maintenance_equipment.xml',
|
'views/sf_maintenance_equipment.xml',
|
||||||
# 'views/kanban_change.xml'
|
# 'views/kanban_change.xml'
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ from . import mrp_routing_workcenter
|
|||||||
from . import stock
|
from . import stock
|
||||||
from . import res_user
|
from . import res_user
|
||||||
from . import production_line_base
|
from . import production_line_base
|
||||||
from . import tool_other_features
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
from odoo import models, fields, api
|
from odoo import models, fields, api, _
|
||||||
from odoo.exceptions import ValidationError
|
from odoo.exceptions import ValidationError
|
||||||
from odoo.modules import get_resource_path
|
from odoo.modules import get_resource_path
|
||||||
|
from odoo.addons.sf_base.commons.common import Common
|
||||||
from OCC.Extend.DataExchange import read_step_file
|
from OCC.Extend.DataExchange import read_step_file
|
||||||
from OCC.Extend.DataExchange import write_stl_file
|
from OCC.Extend.DataExchange import write_stl_file
|
||||||
import logging
|
import logging
|
||||||
import base64
|
import base64
|
||||||
import hashlib
|
import hashlib
|
||||||
import os
|
import os
|
||||||
|
import requests
|
||||||
|
import json
|
||||||
|
|
||||||
|
|
||||||
class ResProductMo(models.Model):
|
class ResProductMo(models.Model):
|
||||||
@@ -44,7 +47,6 @@ class ResProductMo(models.Model):
|
|||||||
width = fields.Float('宽(mm)', digits=(16, 3))
|
width = fields.Float('宽(mm)', digits=(16, 3))
|
||||||
height = fields.Float('高(mm)', digits=(16, 3))
|
height = fields.Float('高(mm)', digits=(16, 3))
|
||||||
single_manufacturing = fields.Boolean(string="单个制造")
|
single_manufacturing = fields.Boolean(string="单个制造")
|
||||||
|
|
||||||
model_code = fields.Char('模型编码')
|
model_code = fields.Char('模型编码')
|
||||||
is_bfm = fields.Boolean('业务平台是否自动创建', default=False)
|
is_bfm = fields.Boolean('业务平台是否自动创建', default=False)
|
||||||
upload_model_file = fields.Many2many('ir.attachment', 'upload_model_file_attachment_ref', string='上传模型文件')
|
upload_model_file = fields.Many2many('ir.attachment', 'upload_model_file_attachment_ref', string='上传模型文件')
|
||||||
@@ -60,16 +62,18 @@ class ResProductMo(models.Model):
|
|||||||
cutting_tool_material_id = fields.Many2one('sf.cutting.tool.material', string='刀具物料')
|
cutting_tool_material_id = fields.Many2one('sf.cutting.tool.material', string='刀具物料')
|
||||||
cutting_tool_type = fields.Char(string="刀具物料类型", related='cutting_tool_material_id.name', store=True)
|
cutting_tool_type = fields.Char(string="刀具物料类型", related='cutting_tool_material_id.name', store=True)
|
||||||
|
|
||||||
cutting_tool_model_id = fields.Many2one('sf.cutting.tool.model', string='型号',
|
cutting_tool_model_id = fields.Many2one('sf.cutting_tool.standard.library', string='型号')
|
||||||
)
|
specification_id = fields.Many2one('sf.tool.materials.basic.parameters', string='规格')
|
||||||
|
|
||||||
cutting_tool_type_id = fields.Many2one('sf.cutting.tool.type', string='类型',
|
cutting_tool_type_id = fields.Many2one('sf.cutting.tool.type', string='类型',
|
||||||
domain="[('cutting_tool_material_id.name', '=', cutting_tool_type)]")
|
domain="[('cutting_tool_material_id.name', '=', cutting_tool_type)]")
|
||||||
|
|
||||||
brand_id = fields.Many2one('sf.machine.brand', '品牌')
|
brand_id = fields.Many2one('sf.machine.brand', '品牌')
|
||||||
|
|
||||||
tool_length = fields.Float('长度(mm)')
|
tool_length = fields.Float('长度(mm)')
|
||||||
tool_width = fields.Float('宽度(mm)')
|
tool_width = fields.Float('宽度(mm)')
|
||||||
tool_height = fields.Float('高度(mm)')
|
tool_height = fields.Float('高度(mm)')
|
||||||
tool_thickness = fields.Integer('厚度(mm)')
|
tool_thickness = fields.Float('厚度(mm)')
|
||||||
tool_weight = fields.Float('重量(kg)')
|
tool_weight = fields.Float('重量(kg)')
|
||||||
tool_hardness = fields.Integer('硬度(hrc)')
|
tool_hardness = fields.Integer('硬度(hrc)')
|
||||||
|
|
||||||
@@ -77,7 +81,7 @@ class ResProductMo(models.Model):
|
|||||||
# 整体式刀具特有字段
|
# 整体式刀具特有字段
|
||||||
cutting_tool_total_length = fields.Float('总长度(mm)', digits=(6, 1))
|
cutting_tool_total_length = fields.Float('总长度(mm)', digits=(6, 1))
|
||||||
cutting_tool_shank_length = fields.Float('柄部长度(mm)', digits=(6, 1))
|
cutting_tool_shank_length = fields.Float('柄部长度(mm)', digits=(6, 1))
|
||||||
cutting_tool_blade_length = fields.Float('刃部长度(mm)', digits=(6, 1))
|
cutting_tool_blade_length = fields.Char('刃部长度(mm)')
|
||||||
cutting_tool_blade_number = fields.Selection(
|
cutting_tool_blade_number = fields.Selection(
|
||||||
[('2', '2'), ('3', '3'), ('4', '4'), ('5', '5'), ('6', '6'), ('7', '7'), ('8', '8')], '刃数(个)')
|
[('2', '2'), ('3', '3'), ('4', '4'), ('5', '5'), ('6', '6'), ('7', '7'), ('8', '8')], '刃数(个)')
|
||||||
# 整体式刀具新增字段
|
# 整体式刀具新增字段
|
||||||
@@ -88,13 +92,21 @@ class ResProductMo(models.Model):
|
|||||||
cutting_tool_blade_tip_taper = fields.Integer('刀尖锥度(°)')
|
cutting_tool_blade_tip_taper = fields.Integer('刀尖锥度(°)')
|
||||||
cutting_tool_blade_helix_angle = fields.Integer('刃部螺旋角(°)')
|
cutting_tool_blade_helix_angle = fields.Integer('刃部螺旋角(°)')
|
||||||
cutting_tool_blade_type = fields.Char('刃部类型')
|
cutting_tool_blade_type = fields.Char('刃部类型')
|
||||||
|
cutting_tool_pitch = fields.Char('牙距(mm)', size=20)
|
||||||
|
cutting_tool_blade_width = fields.Char('刃部宽度(mm)', size=20)
|
||||||
|
cutting_tool_blade_depth = fields.Char('刃部深度(mm)', size=20)
|
||||||
|
cutting_tool_cut_depth = fields.Char('切削深度(mm)', size=20)
|
||||||
|
cutting_tool_cut_depth_max = fields.Char('最大切削深度(mm)', size=20)
|
||||||
cutting_tool_coarse_medium_fine = fields.Selection([('粗', '粗'), ('中', '中'), ('精', '精')], '粗/中/精')
|
cutting_tool_coarse_medium_fine = fields.Selection([('粗', '粗'), ('中', '中'), ('精', '精')], '粗/中/精')
|
||||||
cutting_tool_run_out_accuracy_max = fields.Float('端跳精度max', digits=(6, 1))
|
cutting_tool_run_out_accuracy_max = fields.Float('端跳精度max', digits=(6, 1))
|
||||||
cutting_tool_run_out_accuracy_min = fields.Float('端跳精度min', digits=(6, 1))
|
cutting_tool_run_out_accuracy_min = fields.Float('端跳精度min', digits=(6, 1))
|
||||||
|
cutting_tool_blade_tip_working_size = fields.Char('刀尖处理尺寸(R半径mm/倒角)', size=20)
|
||||||
|
fit_blade_shape_id = fields.Many2many('maintenance.equipment.image', 'rel_fit_blade_shape_product_template',
|
||||||
|
'适配刀片形状', domain=[('type', '=', '刀片形状')])
|
||||||
suitable_machining_method_ids = fields.Many2many('maintenance.equipment.image',
|
suitable_machining_method_ids = fields.Many2many('maintenance.equipment.image',
|
||||||
'rel_machining_product_template', '适合加工方式',
|
'rel_machining_product_template', '适合加工方式',
|
||||||
domain=[('type', '=', '加工能力')])
|
domain=[('type', '=', '加工能力')])
|
||||||
blade_tip_characteristics_ids = fields.Many2many('maintenance.equipment.image',
|
blade_tip_characteristics_id = fields.Many2many('maintenance.equipment.image',
|
||||||
'rel_blade_tip_product_template', '刀尖特征',
|
'rel_blade_tip_product_template', '刀尖特征',
|
||||||
domain=[('type', '=', '刀尖特征')])
|
domain=[('type', '=', '刀尖特征')])
|
||||||
handle_type_ids = fields.Many2many('maintenance.equipment.image', 'rel_handle_product_template', '柄部类型',
|
handle_type_ids = fields.Many2many('maintenance.equipment.image', 'rel_handle_product_template', '柄部类型',
|
||||||
@@ -103,6 +115,215 @@ class ResProductMo(models.Model):
|
|||||||
'走刀方向', domain=[('type', '=', '走刀方向')])
|
'走刀方向', domain=[('type', '=', '走刀方向')])
|
||||||
suitable_coolant_ids = fields.Many2many('maintenance.equipment.image', 'rel_coolant_product_template',
|
suitable_coolant_ids = fields.Many2many('maintenance.equipment.image', 'rel_coolant_product_template',
|
||||||
'适合冷却液', domain=[('type', '=', '冷却液')])
|
'适合冷却液', domain=[('type', '=', '冷却液')])
|
||||||
|
compaction_way_ids = fields.Many2many('maintenance.equipment.image', 'rel_compaction_product_template',
|
||||||
|
'压紧方式', domain=[('type', '=', '压紧方式')]) \
|
||||||
|
|
||||||
|
@api.onchange('cutting_tool_material_id')
|
||||||
|
def _onchange_cutting_tool_material_id(self):
|
||||||
|
for item in self:
|
||||||
|
if item.cutting_tool_material_id.id != item.cutting_tool_model_id.cutting_tool_material_id.id:
|
||||||
|
item.cutting_tool_model_id = False
|
||||||
|
item.specification_id = False
|
||||||
|
item.cutting_tool_type_id = False
|
||||||
|
item.brand_id = False
|
||||||
|
item.tool_hardness = False
|
||||||
|
item.cutting_tool_run_out_accuracy_max = False
|
||||||
|
item.cutting_tool_run_out_accuracy_min = False
|
||||||
|
item.materials_type_id = False
|
||||||
|
item.cutting_tool_blade_type = False
|
||||||
|
item.cutting_tool_total_length = False
|
||||||
|
item.cutting_tool_clamping_way = False
|
||||||
|
item.cutting_tool_blade_diameter = False
|
||||||
|
item.cutting_tool_shank_length = False
|
||||||
|
item.cutting_tool_blade_length = False
|
||||||
|
item.cutting_tool_blade_number = False
|
||||||
|
item.cutting_tool_neck_length = False
|
||||||
|
item.cutting_tool_neck_diameter = False
|
||||||
|
item.cutting_tool_shank_diameter = False
|
||||||
|
item.cutting_tool_blade_tip_diameter = False
|
||||||
|
item.cutting_tool_blade_tip_taper = False
|
||||||
|
item.cutting_tool_blade_helix_angle = False
|
||||||
|
item.cutting_tool_blade_type = False
|
||||||
|
item.cutting_tool_pitch = False
|
||||||
|
item.cutting_tool_blade_width = False
|
||||||
|
item.cutting_tool_blade_depth = False
|
||||||
|
item.cutting_tool_cut_depth = False
|
||||||
|
item.cutting_tool_coarse_medium_fine = False
|
||||||
|
item.cutting_tool_run_out_accuracy_max = False
|
||||||
|
item.cutting_tool_run_out_accuracy_min = False
|
||||||
|
item.cutting_tool_blade_tip_working_size = False
|
||||||
|
item.fit_blade_shape_id = False
|
||||||
|
item.suitable_machining_method_ids = False
|
||||||
|
item.blade_tip_characteristics_id = False
|
||||||
|
item.handle_type_ids = False
|
||||||
|
item.cutting_direction_ids = False
|
||||||
|
item.suitable_coolant_ids = False
|
||||||
|
item.compaction_way_ids = False
|
||||||
|
item.cutting_speed_ids = False
|
||||||
|
item.feed_per_tooth_ids = False
|
||||||
|
|
||||||
|
# def choice(self):
|
||||||
|
# if self.cutting_tool_type == '整体式刀具':
|
||||||
|
# tree_view = self.env.ref('sf_base.view_sf_tool_materials_basic_parameters_integral_tree')
|
||||||
|
# elif self.cutting_tool_type == '刀片':
|
||||||
|
# tree_view = self.env.ref('sf_base.view_sf_tool_materials_basic_parameters_blade_tree')
|
||||||
|
# elif self.cutting_tool_type == '刀杆':
|
||||||
|
# tree_view = self.env.ref('sf_base.view_sf_tool_materials_basic_parameters_cutter_bar_tree')
|
||||||
|
# elif self.cutting_tool_type == '刀盘':
|
||||||
|
# tree_view = self.env.ref('sf_base.view_sf_tool_materials_basic_parameters_tree')
|
||||||
|
# elif self.cutting_tool_type == '刀柄':
|
||||||
|
# tree_view = self.env.ref('sf_base.view_sf_tool_materials_basic_parameters_tree')
|
||||||
|
# else :
|
||||||
|
# tree_view = self.env.ref('sf_base.view_sf_tool_materials_basic_parameters_tree')
|
||||||
|
# return {
|
||||||
|
# 'name': _('规格'),
|
||||||
|
# 'view_mode': 'list',
|
||||||
|
# 'view_id': tree_view.id,
|
||||||
|
# 'type': 'ir.actions.act_window',
|
||||||
|
# 'res_model': 'sf.tool.materials.basic.parameters',
|
||||||
|
# 'target': 'new',
|
||||||
|
# 'domain': [('cutting_tool_type', '=', self.cutting_tool_type),
|
||||||
|
# ('standard_library_id', '=', self.cutting_tool_model_id.id)],
|
||||||
|
# }
|
||||||
|
|
||||||
|
@api.onchange('specification_id')
|
||||||
|
def _onchange_specification(self):
|
||||||
|
if self.specification_id:
|
||||||
|
self.cutting_tool_type_id = self.cutting_tool_model_id.cutting_tool_type_id.id
|
||||||
|
self.brand_id = self.cutting_tool_model_id.brand_id.id
|
||||||
|
self.tool_hardness = self.cutting_tool_model_id.tool_hardness
|
||||||
|
self.cutting_tool_blade_type = self.cutting_tool_model_id.blade_type
|
||||||
|
self.cutting_tool_coarse_medium_fine = self.cutting_tool_model_id.integral_coarse_medium_fine
|
||||||
|
self.materials_type_id = self.cutting_tool_model_id.material_model_id.id
|
||||||
|
self.coating_material = self.cutting_tool_model_id.coating_material
|
||||||
|
if self.cutting_tool_type == '整体式刀具':
|
||||||
|
self.cutting_tool_total_length = self.specification_id.total_length
|
||||||
|
self.cutting_tool_run_out_accuracy_max = self.cutting_tool_model_id.integral_run_out_accuracy_max
|
||||||
|
self.cutting_tool_run_out_accuracy_min = self.cutting_tool_model_id.integral_run_out_accuracy_min
|
||||||
|
self.cutting_tool_blade_diameter = self.specification_id.blade_diameter
|
||||||
|
self.cutting_tool_blade_length = self.specification_id.blade_length
|
||||||
|
self.cutting_tool_blade_number = self.specification_id.blade_number
|
||||||
|
self.cutting_tool_blade_type = self.cutting_tool_model_id.blade_type
|
||||||
|
self.cutting_tool_shank_diameter = self.specification_id.handle_diameter
|
||||||
|
self.cutting_tool_blade_tip_diameter = self.specification_id.blade_tip_diameter
|
||||||
|
self.cutting_tool_blade_tip_taper = self.specification_id.blade_tip_taper
|
||||||
|
self.cutting_tool_blade_helix_angle = self.specification_id.blade_helix_angle
|
||||||
|
self.cutting_tool_pitch = self.specification_id.pitch
|
||||||
|
self.cutting_tool_blade_width = self.specification_id.blade_width
|
||||||
|
self.cutting_tool_blade_depth = self.specification_id.blade_depth
|
||||||
|
self.cutting_tool_cut_depth = self.specification_id.cutting_depth
|
||||||
|
self.cutting_speed_ids = self.cutting_tool_model_id.cutting_speed_ids
|
||||||
|
self.feed_per_tooth_ids = [(0, 0, {'product_template_id': product_template.id,
|
||||||
|
'cutting_speed': product_template.cutting_speed,
|
||||||
|
'machining_method': product_template.machining_method,
|
||||||
|
'blade_diameter': product_template.blade_diameter,
|
||||||
|
'materials_type_id': product_template.materials_type_id.id}) for
|
||||||
|
product_template in
|
||||||
|
self.cutting_tool_model_id.feed_per_tooth_ids.filtered(
|
||||||
|
lambda r: r.blade_diameter == self.specification_id.blade_diameter)]
|
||||||
|
elif self.cutting_tool_type == '夹头':
|
||||||
|
self.cutting_tool_clamping_length = self.specification_id.clamping_length
|
||||||
|
self.cutting_tool_clamping_tolerance = self.specification_id.clamping_tolerance
|
||||||
|
self.cutting_tool_clamping_diameter_min = self.specification_id.min_clamping_diameter
|
||||||
|
self.cutting_tool_clamping_diameter_min = self.specification_id.max_clamping_diameter
|
||||||
|
self.cutting_tool_clamping_way = self.specification_id.clamping_mode
|
||||||
|
self.cutting_tool_top_diameter = self.specification_id.top_diameter
|
||||||
|
self.cutting_tool_outer_diameter = self.specification_id.outer_diameter
|
||||||
|
self.cutting_tool_inner_diameter = self.specification_id.inner_diameter
|
||||||
|
self.tool_weight = self.specification_id.weight
|
||||||
|
self.cutting_tool_jump_accuracy = self.specification_id.run_out_accuracy
|
||||||
|
self.cutting_tool_max_load_capacity = self.specification_id.max_load_capacity
|
||||||
|
self.cutting_tool_er_size_model = self.specification_id.er_size_model
|
||||||
|
self.cutting_tool_handle_ids = self.cutting_tool_model_id.handle_ids
|
||||||
|
self.cooling_suit_type_ids = self.specification_id.cooling_jacket
|
||||||
|
elif self.cutting_tool_type == '刀片':
|
||||||
|
self.cutting_tool_total_length = self.specification_id.total_length
|
||||||
|
self.tool_length = self.specification_id.length
|
||||||
|
self.tool_thickness = self.specification_id.thickness
|
||||||
|
self.tool_width = self.specification_id.width
|
||||||
|
self.cutting_tool_cut_blade_length = self.specification_id.cutting_blade_length
|
||||||
|
self.cutting_tool_blade_tip_circular_arc_radius = self.specification_id.blade_tip_circular_arc_radius
|
||||||
|
self.cutting_tool_blade_tip_height_tolerance = self.specification_id.blade_tip_height_tolerance
|
||||||
|
self.cutting_tool_inscribed_circle_diameter = self.specification_id.inscribed_circle_diameter
|
||||||
|
self.cutting_tool_inscribed_circle_tolerance = self.specification_id.inscribed_circle_tolerance
|
||||||
|
self.cutting_tool_install_aperture_diameter = self.specification_id.install_aperture_diameter
|
||||||
|
self.cutting_tool_chip_breaker_groove = self.specification_id.chip_breaker_groove
|
||||||
|
# self.cutting_tool_cut_depth_max = self.specification_id.blade_blade_number
|
||||||
|
self.cutting_tool_blade_blade_number = self.specification_id.blade_blade_number
|
||||||
|
self.cutting_tool_blade_width = self.specification_id.blade_width
|
||||||
|
self.cutting_tool_rear_angle = self.specification_id.relief_angle
|
||||||
|
self.cutting_tool_main_included_angle = self.specification_id.main_included_angle
|
||||||
|
self.cutting_tool_top_angle = self.specification_id.top_angle
|
||||||
|
self.cutting_tool_blade_tip_dip_angle = self.specification_id.blade_tip_dip_angle
|
||||||
|
self.cutting_tool_side_cutting_edge_angle = self.specification_id.side_cutting_edge_angle
|
||||||
|
self.cutting_tool_pitch = self.specification_id.pitch
|
||||||
|
self.cutting_tool_bladed_teeth_model = self.specification_id.blade_teeth_model
|
||||||
|
self.cutting_tool_thickness_tolerance = self.specification_id.thickness_tolerance
|
||||||
|
self.cutting_tool_thread_model = self.specification_id.thread_model
|
||||||
|
self.cutting_tool_thread_num = self.specification_id.thread_num
|
||||||
|
self.cutting_tool_cutter_bar_ids = self.cutting_tool_model_id.cutter_bar_ids.ids
|
||||||
|
self.cutting_tool_cutter_pad_ids = self.cutting_tool_model_id.cutter_pad_ids.ids
|
||||||
|
self.cutting_speed_ids = self.cutting_tool_model_id.cutting_speed_ids
|
||||||
|
self.feed_per_tooth_ids = self.cutting_tool_model_id.feed_per_tooth_ids
|
||||||
|
elif self.cutting_tool_type in ('刀盘', '刀杆'):
|
||||||
|
self.cutting_tool_total_length = self.specification_id.total_length
|
||||||
|
self.tool_length = self.specification_id.length
|
||||||
|
self.tool_thickness = self.specification_id.thickness
|
||||||
|
self.tool_width = self.specification_id.width
|
||||||
|
self.cutting_tool_cut_blade_length = self.specification_id.cutting_blade_length
|
||||||
|
self.cutting_tool_blade_tip_circular_arc_radius = self.specification_id.blade_tip_circular_arc_radius
|
||||||
|
self.cutting_tool_blade_tip_height_tolerance = self.specification_id.blade_tip_height_tolerance
|
||||||
|
self.cutting_tool_inscribed_circle_diameter = self.specification_id.inscribed_circle_diameter
|
||||||
|
self.cutting_tool_inscribed_circle_tolerance = self.specification_id.inscribed_circle_tolerance
|
||||||
|
self.cutting_tool_install_aperture_diameter = self.specification_id.install_aperture_diameter
|
||||||
|
self.cutting_tool_chip_breaker_groove = self.specification_id.chip_breaker_groove
|
||||||
|
# self.cutting_tool_cut_depth_max = self.specification_id.blade_blade_number
|
||||||
|
self.cutting_tool_blade_blade_number = self.specification_id.blade_blade_number
|
||||||
|
self.cutting_tool_blade_width = self.specification_id.blade_width
|
||||||
|
self.cutting_tool_rear_angle = self.specification_id.relief_angle
|
||||||
|
self.cutting_tool_main_included_angle = self.specification_id.main_included_angle
|
||||||
|
self.cutting_tool_top_angle = self.specification_id.top_angle
|
||||||
|
self.cutting_tool_blade_tip_dip_angle = self.specification_id.blade_tip_dip_angle
|
||||||
|
if self.cutting_tool_type == '刀盘':
|
||||||
|
self.cutting_tool_blade_length = self.specification_id.blade_length
|
||||||
|
self.cutting_tool_cutter_head_diameter = self.specification_id.cutter_head_diameter
|
||||||
|
self.cutting_tool_interface_diameter = self.specification_id.interface_diameter
|
||||||
|
else:
|
||||||
|
self.cutting_tool_knife_head_height = self.specification_id.knife_head_height
|
||||||
|
self.cutting_tool_knife_head_width = self.specification_id.knife_head_width
|
||||||
|
self.cutting_tool_knife_head_length = self.specification_id.knife_head_length
|
||||||
|
elif self.cutting_tool_type == '刀柄':
|
||||||
|
self.cutting_tool_total_length = self.specification_id.total_length
|
||||||
|
self.cutting_tool_standard_speed = self.specification_id.standard_rotate_speed
|
||||||
|
self.cutting_tool_speed_max = self.specification_id.speed_max
|
||||||
|
self.cutting_tool_change_time = self.specification_id.change_time
|
||||||
|
self.cutting_tool_total_length = self.specification_id.total_length
|
||||||
|
self.cutting_tool_clamping_diameter_max = self.specification_id.max_clamping_diameter
|
||||||
|
self.cutting_tool_clamping_diameter_min = self.specification_id.min_clamping_diameter
|
||||||
|
self.cutting_tool_flange_length = self.specification_id.flange_shank_length
|
||||||
|
self.cutting_tool_shank_outer_diameter = self.specification_id.handle_external_diameter
|
||||||
|
self.cutting_tool_shank_inner_diameter = self.specification_id.handle_inside_diameter
|
||||||
|
self.suitable_machining_method_ids = [(6, 0,
|
||||||
|
[])] if not self.cutting_tool_model_id.suitable_machining_method_ids else [
|
||||||
|
(6, 0, self.cutting_tool_model_id.suitable_machining_method_ids.ids)]
|
||||||
|
self.blade_tip_characteristics_id = [(6, 0,
|
||||||
|
[])] if not self.cutting_tool_model_id.blade_tip_characteristics_id else [
|
||||||
|
(6, 0, self.cutting_tool_model_id.blade_tip_characteristics_id.ids)]
|
||||||
|
|
||||||
|
self.handle_type_ids = [(6, 0,
|
||||||
|
[])] if not self.cutting_tool_model_id.handle_type_ids else [
|
||||||
|
(6, 0, self.cutting_tool_model_id.handle_type_ids.ids)]
|
||||||
|
|
||||||
|
self.cutting_direction_ids = [(6, 0,
|
||||||
|
[])] if not self.cutting_tool_model_id.cutting_direction_ids else [
|
||||||
|
(6, 0, self.cutting_tool_model_id.cutting_direction_ids.ids)]
|
||||||
|
|
||||||
|
self.suitable_coolant_ids = [(6, 0,
|
||||||
|
[])] if not self.cutting_tool_model_id.suitable_coolant_ids else [
|
||||||
|
(6, 0, self.cutting_tool_model_id.suitable_coolant_ids.ids)]
|
||||||
|
self.compaction_way_ids = [(6, 0,
|
||||||
|
[])] if not self.cutting_tool_model_id.compaction_way_ids else [
|
||||||
|
(6, 0, self.cutting_tool_model_id.compaction_way_ids.ids)]
|
||||||
|
|
||||||
|
|
||||||
# @api.constrains('suitable_machining_method_ids')
|
# @api.constrains('suitable_machining_method_ids')
|
||||||
@@ -193,52 +414,91 @@ class ResProductMo(models.Model):
|
|||||||
cutting_tool_rear_angle = fields.Integer('后角(°)')
|
cutting_tool_rear_angle = fields.Integer('后角(°)')
|
||||||
cutting_tool_main_included_angle = fields.Integer('主偏角(°)')
|
cutting_tool_main_included_angle = fields.Integer('主偏角(°)')
|
||||||
# cutting_tool_material_model_id = fields.Many2one('sf.materials.model', '材料型号')
|
# cutting_tool_material_model_id = fields.Many2one('sf.materials.model', '材料型号')
|
||||||
cutting_tool_nut = fields.Float('配对螺母(mm)')
|
|
||||||
# 适用夹头型号可以多选
|
# 适用夹头型号可以多选
|
||||||
cutting_tool_chuck_ids = fields.Many2many(
|
cutting_tool_chuck_ids = fields.Many2many(
|
||||||
'sf.cutting.tool.model',
|
'sf.cutting_tool.standard.library',
|
||||||
relation='product_cutting_tool_model_handle_chuck_rel',
|
relation='product_cutting_tool_library_handle_chuck_rel',
|
||||||
column1='model_id_1',
|
column1='model_id_1',
|
||||||
column2='model_id_2',
|
column2='model_id_2',
|
||||||
domain="[('cutting_tool_type', '=', '夹头')]",
|
domain="[('cutting_tool_type', '=', '夹头')]",
|
||||||
string='适用夹头型号')
|
string='适用夹头型号')
|
||||||
# 刀片参数
|
# 刀片参数
|
||||||
|
cutting_tool_cut_blade_length = fields.Char('切削刃长(mm)', size=20)
|
||||||
|
cutting_tool_blade_tip_circular_arc_radius = fields.Char('刀尖圆弧半径(mm)', size=20)
|
||||||
cutting_tool_top_angle = fields.Integer('顶角(°)')
|
cutting_tool_top_angle = fields.Integer('顶角(°)')
|
||||||
cutting_tool_jump_accuracy = fields.Float('径跳精度(mm)')
|
cutting_tool_inscribed_circle_diameter = fields.Char('内接圆直径(mm)', size=20)
|
||||||
|
cutting_tool_install_aperture_diameter = fields.Char('安装孔直径(mm)', size=20)
|
||||||
|
cutting_tool_chip_breaker_groove = fields.Selection([('无', '无'), ('单面', '单面'), ('双面', '双面')],
|
||||||
|
string='有无断屑槽')
|
||||||
|
cutting_tool_bladed_teeth_model = fields.Selection(
|
||||||
|
[('无', '无'), ('V牙型', 'V牙型'), ('米制全牙型', '米制全牙型'), ('美制全牙型', '美制全牙型'),
|
||||||
|
('惠氏全牙型', '惠氏全牙型'), ('BSPT全牙型', 'BSPT全牙型'), ('NPT全牙型', 'NPT全牙型'),
|
||||||
|
('UNJ全牙型', 'UNJ全牙型'), ('DIN405圆牙型', 'DIN405圆牙型'), ('ACME梯形', 'ACME梯形'),
|
||||||
|
('石油管螺纹刀片', '石油管螺纹刀片'), ('矮牙ACME梯形', '矮牙ACME梯形'),
|
||||||
|
('Trapeze30° 103', 'Trapeze30° 103')], string='刀片牙型', default='无')
|
||||||
|
cutting_tool_blade_blade_number = fields.Selection(
|
||||||
|
[('0', '0'), ('1', '1'), ('2', '2'), ('3', '3'), ('4', '4'), ('5', '5'), ('6', '6'),
|
||||||
|
('7', '7'), ('8', '8'), ('9', '9'), ('10', '10')],
|
||||||
|
string='刀片的刃数(个)')
|
||||||
|
|
||||||
|
cutting_tool_blade_tip_dip_angle = fields.Integer('刀尖倾角(°)')
|
||||||
|
cutting_tool_side_cutting_edge_angle = fields.Integer('侧切削角(°)')
|
||||||
|
cutting_tool_thread_model = fields.Selection([('无', '无'), ('外螺纹', '外螺纹'), ('内螺纹', '内螺纹')],
|
||||||
|
string='螺纹类型')
|
||||||
|
cutting_tool_thread_num = fields.Char('每英寸螺纹数(tpi)', size=20)
|
||||||
|
cutting_tool_blade_tip_height_tolerance = fields.Char('刀尖高度公差(mm)', size=20)
|
||||||
|
cutting_tool_inscribed_circle_tolerance = fields.Char('内接圆公差(mm)', size=20)
|
||||||
|
cutting_tool_thickness_tolerance = fields.Char('厚度公差(mm)', size=20)
|
||||||
|
|
||||||
|
cutting_tool_jump_accuracy = fields.Char('径跳精度(mm)')
|
||||||
cutting_tool_working_hardness = fields.Char('加工硬度(hrc)')
|
cutting_tool_working_hardness = fields.Char('加工硬度(hrc)')
|
||||||
cutting_tool_cutter_bar_ids = fields.Many2many(
|
cutting_tool_cutter_bar_ids = fields.Many2many(
|
||||||
'sf.cutting.tool.model',
|
'sf.cutting_tool.standard.library',
|
||||||
relation='product_cutting_tool_model_blade_cutter_bar_rel',
|
relation='product_cutting_tool_library_cutter_bar_rel',
|
||||||
column1='model_id_1',
|
column1='model_id_1',
|
||||||
column2='model_id_2',
|
column2='model_id_2',
|
||||||
domain="[('cutting_tool_type', '=', '刀杆')]",
|
domain="[('cutting_tool_type', '=', '刀杆')]",
|
||||||
string='适用刀杆型号'
|
string='适用刀杆型号'
|
||||||
)
|
)
|
||||||
cutting_tool_cutter_pad_ids = fields.Many2many(
|
cutting_tool_cutter_pad_ids = fields.Many2many(
|
||||||
'sf.cutting.tool.model',
|
'sf.cutting_tool.standard.library',
|
||||||
relation='product_cutting_tool_model_blade_cutter_pad_rel',
|
relation='product_cutting_tool_library_cutter_pad_rel',
|
||||||
column1='model_id_1',
|
column1='model_id_1',
|
||||||
column2='model_id_2',
|
column2='model_id_2',
|
||||||
domain="[('cutting_tool_type', '=', '刀盘')]",
|
domain="[('cutting_tool_type', '=', '刀盘')]",
|
||||||
string='适用刀盘型号' # 使用空列表作为默认值
|
string='适用刀盘型号' # 使用空列表作为默认值
|
||||||
)
|
)
|
||||||
# 刀杆/参数
|
# 刀杆/参数
|
||||||
|
cutting_tool_knife_head_height = fields.Float('刀头高度(mm)')
|
||||||
|
cutting_tool_knife_head_width = fields.Float('刀头宽度(mm)')
|
||||||
|
cutting_tool_knife_head_length = fields.Float('刀头长度(mm)')
|
||||||
cutting_tool_blade_diameter = fields.Float('刃径/刃部直径(mm)')
|
cutting_tool_blade_diameter = fields.Float('刃径/刃部直径(mm)')
|
||||||
|
cutting_tool_cutter_arbor_diameter = fields.Char('刀杆直径(mm)', size=20)
|
||||||
|
cutting_tool_min_machining_aperture = fields.Char('最小加工孔径(mm)', size=20)
|
||||||
|
cutting_tool_install_blade_tip_num = fields.Char('可装刀片数/齿数(个)', size=20)
|
||||||
|
cutting_tool_installing_structure = fields.Char('安装结构', size=20)
|
||||||
cutting_tool_blade_ids = fields.Many2many(
|
cutting_tool_blade_ids = fields.Many2many(
|
||||||
'sf.cutting.tool.model',
|
'sf.cutting_tool.standard.library',
|
||||||
relation='product_cutting_tool_model_pad_blade_rel',
|
relation='product_cutting_tool_library_pad_blade_rel',
|
||||||
column1='model_id_1',
|
column1='model_id_1',
|
||||||
column2='model_id_2',
|
column2='model_id_2',
|
||||||
domain="[('cutting_tool_type', '=', '刀片')]",
|
domain="[('cutting_tool_type', '=', '刀片')]",
|
||||||
string='适用刀片型号' # 使用空列表作为默认值
|
string='适用刀片型号' # 使用空列表作为默认值
|
||||||
)
|
)
|
||||||
cutting_tool_wrench = fields.Float('配对扳手(mm)')
|
cutting_tool_tool_shim = fields.Char('适配刀垫型号', size=50)
|
||||||
# cutting_tool_screw = fields.Float('配备螺丝(mm)')
|
cutting_tool_cotter_pin = fields.Char('适配销钉型号', size=50)
|
||||||
cutting_tool_accuracy_level = fields.Char('精度等级')
|
cutting_tool_pressing_plate = fields.Char('适配压板型号', size=50)
|
||||||
|
cutting_tool_screw = fields.Char('适配螺钉型号', size=50)
|
||||||
|
cutting_tool_wrench = fields.Char('适配扳手型号')
|
||||||
|
cutting_tool_is_cooling_hole = fields.Boolean('有无冷却孔', default=False)
|
||||||
|
cutting_tool_locating_slot_code = fields.Char('定位槽代号', size=20)
|
||||||
|
# 刀盘参数
|
||||||
|
cutting_tool_cutter_head_diameter = fields.Char('刀盘直径(mm)', size=20)
|
||||||
|
cutting_tool_interface_diameter = fields.Char('接口直径(mm)', size=20)
|
||||||
|
|
||||||
# 刀柄参数
|
# 刀柄参数
|
||||||
cutting_tool_head_diameter = fields.Float('头部直径')
|
cutting_tool_shank_outer_diameter = fields.Float('柄部外径(mm)')
|
||||||
cutting_tool_diameter_max = fields.Float('最大直径(mm)')
|
cutting_tool_shank_inner_diameter = fields.Float('柄部内径(mm)')
|
||||||
cutting_tool_clamping_diameter = fields.Float('夹持直径(mm)')
|
|
||||||
cutting_tool_clamping_length = fields.Float('夹持长度(mm)')
|
cutting_tool_clamping_length = fields.Float('夹持长度(mm)')
|
||||||
cutting_tool_clamping_tolerance = fields.Float('夹持公差(mm)')
|
cutting_tool_clamping_tolerance = fields.Float('夹持公差(mm)')
|
||||||
cutting_tool_clamping_diameter_max = fields.Float('最大夹持直径')
|
cutting_tool_clamping_diameter_max = fields.Float('最大夹持直径')
|
||||||
@@ -248,34 +508,30 @@ class ResProductMo(models.Model):
|
|||||||
cutting_tool_is_rough_finish = fields.Boolean('可粗加工', default=False)
|
cutting_tool_is_rough_finish = fields.Boolean('可粗加工', default=False)
|
||||||
cutting_tool_is_finish = fields.Boolean('可精加工', default=False)
|
cutting_tool_is_finish = fields.Boolean('可精加工', default=False)
|
||||||
cutting_tool_is_drill_hole = fields.Boolean('可钻孔', default=False)
|
cutting_tool_is_drill_hole = fields.Boolean('可钻孔', default=False)
|
||||||
cutting_tool_is_safety_lock = fields.Boolean('安全锁', default=False)
|
cutting_tool_is_safety_lock = fields.Boolean('有无安全锁', default=False)
|
||||||
cutting_tool_is_high_speed_cutting = fields.Boolean('可高速切削', default=False)
|
cutting_tool_is_high_speed_cutting = fields.Boolean('可高速切削', default=False)
|
||||||
cutting_tool_dynamic_balance_class = fields.Char('动平衡等级')
|
|
||||||
cutting_tool_change_time = fields.Integer('换刀时间(s)')
|
cutting_tool_change_time = fields.Integer('换刀时间(s)')
|
||||||
cutting_tool_clamping_way = fields.Char('夹持方式')
|
cutting_tool_clamping_way = fields.Char('夹持方式')
|
||||||
cutting_tool_standard_speed = fields.Integer('标准转速(n/min)')
|
cutting_tool_standard_speed = fields.Char('标准转速(n/min)')
|
||||||
cutting_tool_speed_max = fields.Integer('最大转速(n/min)')
|
cutting_tool_speed_max = fields.Integer('最大转速(n/min)')
|
||||||
cutting_tool_cooling_type = fields.Char('冷却类型')
|
cutting_tool_cooling_type = fields.Char('冷却类型')
|
||||||
cutting_tool_body_accuracy = fields.Float('本体精度(mm)')
|
|
||||||
apply_lock_nut_model = fields.Char('适用锁紧螺母型号')
|
|
||||||
apply_lock_wrench_model = fields.Char('适用锁紧扳手型号')
|
|
||||||
cutting_tool_detection_accuracy_max = fields.Float('最大检测精度(mm)')
|
|
||||||
cutting_tool_detection_accuracy_min = fields.Float('最小检测精度(mm)')
|
|
||||||
# 夹头参数
|
# 夹头参数
|
||||||
cutting_tool_taper = fields.Integer('锥度(°)')
|
cutting_tool_taper = fields.Integer('锥度(°)')
|
||||||
|
cutting_tool_top_diameter = fields.Float('顶部直径')
|
||||||
cutting_tool_outer_diameter = fields.Float('外径(mm)')
|
cutting_tool_outer_diameter = fields.Float('外径(mm)')
|
||||||
cutting_tool_inner_diameter = fields.Float('内径(mm)')
|
cutting_tool_inner_diameter = fields.Float('内径(mm)')
|
||||||
cooling_suit_type_ids = fields.Char('适用冷却套型号')
|
cooling_suit_type_ids = fields.Char('适用冷却套型号')
|
||||||
# cooling_suit_type_ids = fields.Many2many('冷却类型')
|
cutting_tool_max_load_capacity = fields.Char('最大负载能力(kg)')
|
||||||
cutting_tool_er_size_model = fields.Char('ER尺寸型号')
|
cutting_tool_er_size_model = fields.Char('ER尺寸型号')
|
||||||
cutting_tool_handle_ids = fields.Many2many(
|
cutting_tool_handle_ids = fields.Many2many(
|
||||||
'sf.cutting.tool.model',
|
'sf.cutting_tool.standard.library',
|
||||||
relation='product_cutting_tool_model_chuck_handle_rel',
|
relation='product_cutting_tool_library_chuck_handle_rel',
|
||||||
column1='model_id_1',
|
column1='model_id_1',
|
||||||
column2='model_id_2',
|
column2='model_id_2',
|
||||||
domain="[('cutting_tool_type', '=', '刀柄')]",
|
domain="[('cutting_tool_type', '=', '刀柄')]",
|
||||||
string='适用刀柄型号'
|
string='适用刀柄型号'
|
||||||
)
|
)
|
||||||
|
|
||||||
# 夹具参数
|
# 夹具参数
|
||||||
fixture_material_id = fields.Many2one('sf.fixture.material', string="夹具物料")
|
fixture_material_id = fields.Many2one('sf.fixture.material', string="夹具物料")
|
||||||
fixture_model_id = fields.Many2one('sf.fixture.model', string="夹具型号")
|
fixture_model_id = fields.Many2one('sf.fixture.model', string="夹具型号")
|
||||||
@@ -404,12 +660,6 @@ class ResProductMo(models.Model):
|
|||||||
self.detailed_type = 'product'
|
self.detailed_type = 'product'
|
||||||
self.sale_ok = False
|
self.sale_ok = False
|
||||||
|
|
||||||
@api.onchange('cutting_tool_material_id')
|
|
||||||
def _onchange_cutting_tool_material_id(self):
|
|
||||||
for item in self:
|
|
||||||
if item.cutting_tool_material_id.id != item.cutting_tool_model_id.cutting_tool_material_id.id:
|
|
||||||
item.cutting_tool_model_id = False
|
|
||||||
|
|
||||||
@api.onchange('fixture_material_id')
|
@api.onchange('fixture_material_id')
|
||||||
def _onchange_fixture_material_id(self):
|
def _onchange_fixture_material_id(self):
|
||||||
for item in self:
|
for item in self:
|
||||||
@@ -446,119 +696,6 @@ class ResProductMo(models.Model):
|
|||||||
item.fixture_apply_machine_tool_type_ids = self._get_ids(
|
item.fixture_apply_machine_tool_type_ids = self._get_ids(
|
||||||
item.fixture_model_id.apply_machine_tool_type_ids)
|
item.fixture_model_id.apply_machine_tool_type_ids)
|
||||||
|
|
||||||
# @api.onchange('cutting_tool_model_id')
|
|
||||||
# def _onchange_cutting_tool_model_id(self):
|
|
||||||
# for item in self:
|
|
||||||
# if self.cutting_tool_type is not False:
|
|
||||||
# item.brand_id = item.cutting_tool_model_id.brand_id.id
|
|
||||||
# item.cutting_tool_type_id = item.cutting_tool_model_id.cutting_tool_type_id.id
|
|
||||||
# item.tool_length = item.cutting_tool_model_id.tool_length
|
|
||||||
# item.tool_width = item.cutting_tool_model_id.tool_width
|
|
||||||
# item.tool_height = item.cutting_tool_model_id.tool_height
|
|
||||||
# item.tool_thickness = item.cutting_tool_model_id.tool_thickness
|
|
||||||
# item.tool_weight = item.cutting_tool_model_id.tool_weight
|
|
||||||
# item.coating_material = item.cutting_tool_model_id.coating_material
|
|
||||||
# item.cutting_tool_total_length = item.cutting_tool_model_id.total_length
|
|
||||||
# item.cutting_tool_shank_length = item.cutting_tool_model_id.shank_length
|
|
||||||
# item.cutting_tool_neck_length = item.cutting_tool_model_id.cutting_tool_neck_length
|
|
||||||
# item.cutting_tool_shank_diameter = item.cutting_tool_model_id.cutting_tool_shank_diameter
|
|
||||||
# item.cutting_tool_blade_diameter = item.cutting_tool_model_id.cutting_tool_blade_diameter
|
|
||||||
# item.cutting_tool_neck_diameter = item.cutting_tool_model_id.cutting_tool_neck_diameter
|
|
||||||
# item.cutting_tool_blade_tip_diameter = item.cutting_tool_model_id.cutting_tool_blade_tip_diameter
|
|
||||||
# item.cutting_tool_blade_tip_taper = item.cutting_tool_model_id.cutting_tool_blade_tip_taper
|
|
||||||
# item.cutting_tool_blade_helix_angle = item.cutting_tool_model_id.cutting_tool_blade_helix_angle
|
|
||||||
# item.cutting_tool_blade_type = item.cutting_tool_model_id.cutting_tool_blade_type
|
|
||||||
# item.cutting_tool_coarse_medium_fine = item.cutting_tool_model_id.cutting_tool_coarse_medium_fine
|
|
||||||
# item.tool_hardness = item.cutting_tool_model_id.tool_hardness
|
|
||||||
# item.cutting_tool_run_out_accuracy_max = item.cutting_tool_model_id.cutting_tool_run_out_accuracy_max
|
|
||||||
# item.cutting_tool_run_out_accuracy_min = item.cutting_tool_model_id.cutting_tool_run_out_accuracy_min
|
|
||||||
# item.suitable_machining_method_ids = self._get_ids(
|
|
||||||
# item.cutting_tool_model_id.suitable_machining_method_ids)
|
|
||||||
# item.blade_tip_characteristics_ids = self._get_ids(
|
|
||||||
# item.cutting_tool_model_id.blade_tip_characteristics_ids)
|
|
||||||
# item.handle_type_ids = self._get_ids(item.cutting_tool_model_id.handle_type_ids)
|
|
||||||
# item.cutting_direction_ids = self._get_ids(item.cutting_tool_model_id.cutting_direction_ids)
|
|
||||||
# item.suitable_coolant_ids = self._get_ids(item.cutting_tool_model_id.suitable_coolant_ids)
|
|
||||||
# item.cutting_tool_diameter = item.cutting_tool_model_id.diameter
|
|
||||||
# item.cutting_tool_blade_number = item.cutting_tool_model_id.blade_number
|
|
||||||
# item.cutting_tool_front_angle = item.cutting_tool_model_id.front_angle
|
|
||||||
# item.cutting_tool_rear_angle = item.cutting_tool_model_id.rear_angle
|
|
||||||
# item.cutting_tool_main_included_angle = item.cutting_tool_model_id.main_included_angle
|
|
||||||
# item.materials_type_id = item.cutting_tool_model_id.material_model_id.id
|
|
||||||
# item.cutting_tool_nut = item.cutting_tool_model_id.nut
|
|
||||||
# item.cutting_tool_top_angle = item.cutting_tool_model_id.top_angle
|
|
||||||
# item.cutting_tool_jump_accuracy = item.cutting_tool_model_id.jump_accuracy
|
|
||||||
# item.cutting_tool_working_hardness = item.cutting_tool_model_id.working_hardness
|
|
||||||
# item.cutting_tool_blade_diameter = item.cutting_tool_model_id.blade_diameter
|
|
||||||
# item.cutting_tool_wrench = item.cutting_tool_model_id.wrench
|
|
||||||
# # item.cutting_tool_screw = item.cutting_tool_model_id.screw
|
|
||||||
# item.cutting_tool_accuracy_level = item.cutting_tool_model_id.accuracy_level
|
|
||||||
# item.cutting_tool_diameter_max = item.cutting_tool_model_id.diameter_max
|
|
||||||
# item.cutting_tool_clamping_diameter = item.cutting_tool_model_id.clamping_diameter
|
|
||||||
# item.cutting_tool_flange_length = item.cutting_tool_model_id.flange_length
|
|
||||||
# item.cutting_tool_flange_diameter = item.cutting_tool_model_id.flange_diameter
|
|
||||||
# item.cutting_tool_outer_diameter = item.cutting_tool_model_id.outer_diameter
|
|
||||||
# item.cutting_tool_inner_diameter = item.cutting_tool_model_id.inner_diameter
|
|
||||||
# item.cutting_tool_chuck_ids = self._get_ids(item.cutting_tool_model_id.chuck_ids)
|
|
||||||
# item.cutting_tool_cutter_bar_ids = self._get_ids(item.cutting_tool_model_id.cutter_bar_ids)
|
|
||||||
# item.cutting_tool_cutter_pad_ids = self._get_ids(item.cutting_tool_model_id.cutter_pad_ids)
|
|
||||||
# item.cutting_tool_blade_ids = self._get_ids(item.cutting_tool_model_id.blade_ids)
|
|
||||||
# item.cutting_tool_handle_ids = self._get_ids(item.cutting_tool_model_id.handle_ids)
|
|
||||||
# else:
|
|
||||||
# item.brand_id = False
|
|
||||||
# item.cutting_tool_type_id = False
|
|
||||||
# item.brand_id = False
|
|
||||||
# item.tool_length = False
|
|
||||||
# item.tool_width = False
|
|
||||||
# item.tool_height = False
|
|
||||||
# item.tool_thickness = False
|
|
||||||
# item.tool_weight = False
|
|
||||||
# item.coating_material = False
|
|
||||||
# item.cutting_tool_total_length = False
|
|
||||||
# item.cutting_tool_shank_length = False
|
|
||||||
# item.cutting_tool_blade_length = False
|
|
||||||
# item.cutting_tool_neck_length = False
|
|
||||||
# item.cutting_tool_shank_diameter = False
|
|
||||||
# item.cutting_tool_blade_diameter = False
|
|
||||||
# item.cutting_tool_neck_diameter = False
|
|
||||||
# item.cutting_tool_blade_tip_diameter = False
|
|
||||||
# item.cutting_tool_blade_tip_taper = False
|
|
||||||
# item.cutting_tool_blade_helix_angle = False
|
|
||||||
# item.cutting_tool_blade_type = False
|
|
||||||
# item.cutting_tool_coarse_medium_fine = False
|
|
||||||
# item.tool_hardness = False
|
|
||||||
# item.cutting_tool_run_out_accuracy_max = False
|
|
||||||
# item.cutting_tool_run_out_accuracy_min = False
|
|
||||||
# item.suitable_machining_method_ids = False
|
|
||||||
# item.blade_tip_characteristics_ids = False
|
|
||||||
# item.handle_type_ids = False
|
|
||||||
# item.cutting_direction_ids = False
|
|
||||||
# item.suitable_coolant_ids = False
|
|
||||||
# item.cutting_tool_diameter = False
|
|
||||||
# item.cutting_tool_blade_number = False
|
|
||||||
# item.cutting_tool_front_angle = False
|
|
||||||
# item.cutting_tool_rear_angle = False
|
|
||||||
# item.cutting_tool_main_included_angle = False
|
|
||||||
# item.materials_type_id = False
|
|
||||||
# item.cutting_tool_nut = False
|
|
||||||
# item.cutting_tool_top_angle = False
|
|
||||||
# item.cutting_tool_jump_accuracy = False
|
|
||||||
# item.cutting_tool_working_hardness = False
|
|
||||||
# item.cutting_tool_blade_diameter = False
|
|
||||||
# item.cutting_tool_wrench = False
|
|
||||||
# # item.cutting_tool_screw = False
|
|
||||||
# item.cutting_tool_accuracy_level = False
|
|
||||||
# item.cutting_tool_diameter_max = False
|
|
||||||
# item.cutting_tool_clamping_diameter = False
|
|
||||||
# item.cutting_tool_flange_length = False
|
|
||||||
# item.cutting_tool_flange_diameter = False
|
|
||||||
# item.cutting_tool_outer_diameter = False
|
|
||||||
# item.cutting_tool_inner_diameter = False
|
|
||||||
# item.cutting_tool_chuck_ids = False
|
|
||||||
# item.cutting_tool_cutter_bar_ids = False
|
|
||||||
# item.cutting_tool_cutter_pad_ids = False
|
|
||||||
# item.cutting_tool_blade_ids = False
|
|
||||||
# item.cutting_tool_handle_ids = False
|
|
||||||
|
|
||||||
def _get_volume_uom_id_from_ir_config_parameter(self):
|
def _get_volume_uom_id_from_ir_config_parameter(self):
|
||||||
product_length_in_feet_param = self.env['ir.config_parameter'].sudo().get_param('product.volume_in_cubic_feet')
|
product_length_in_feet_param = self.env['ir.config_parameter'].sudo().get_param('product.volume_in_cubic_feet')
|
||||||
@@ -736,9 +873,9 @@ class ResProductMo(models.Model):
|
|||||||
|
|
||||||
# 将attach的datas内容转为glb文件
|
# 将attach的datas内容转为glb文件
|
||||||
def transition_glb_file(self, report_path, code):
|
def transition_glb_file(self, report_path, code):
|
||||||
shapes = read_step_file(report_path)
|
# shapes = read_step_file(report_path)
|
||||||
output_file = os.path.join('/tmp', str(code) + '.stl')
|
output_file = os.path.join('/tmp', str(code) + '.stl')
|
||||||
write_stl_file(shapes, output_file, 'binary', 0.03, 0.5)
|
# write_stl_file(shapes, output_file, 'binary', 0.03, 0.5)
|
||||||
# 转化为glb
|
# 转化为glb
|
||||||
output_glb_file = os.path.join('/tmp', str(code) + '.glb')
|
output_glb_file = os.path.join('/tmp', str(code) + '.glb')
|
||||||
util_path = get_resource_path('sf_dlm', 'static/util')
|
util_path = get_resource_path('sf_dlm', 'static/util')
|
||||||
@@ -783,6 +920,7 @@ class ResMrpBomMo(models.Model):
|
|||||||
# 坯料BOM组件:选取当前坯料原材料,
|
# 坯料BOM组件:选取当前坯料原材料,
|
||||||
# 然后根据当前的坯料的体积得出需要的原材料重量(立方米m³) *材料密度 * 1000 = 所需原材料重量KG(公斤)
|
# 然后根据当前的坯料的体积得出需要的原材料重量(立方米m³) *材料密度 * 1000 = 所需原材料重量KG(公斤)
|
||||||
# 坯料所需原材料公式:当前的坯料的体积(立方米m³) *材料密度 * 1000 = 所需原材料重量KG(公斤)
|
# 坯料所需原材料公式:当前的坯料的体积(立方米m³) *材料密度 * 1000 = 所需原材料重量KG(公斤)
|
||||||
|
|
||||||
def bom_create_line(self, embryo):
|
def bom_create_line(self, embryo):
|
||||||
# 选取当前坯料原材料
|
# 选取当前坯料原材料
|
||||||
raw_bom_line = self.get_raw_bom(embryo)
|
raw_bom_line = self.get_raw_bom(embryo)
|
||||||
@@ -801,7 +939,6 @@ class ResMrpBomMo(models.Model):
|
|||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
# 查询材料型号默认排第一的供应商
|
# 查询材料型号默认排第一的供应商
|
||||||
|
|
||||||
def get_supplier(self, materials_type):
|
def get_supplier(self, materials_type):
|
||||||
@@ -862,7 +999,8 @@ class SfMaintenanceEquipmentTool(models.Model):
|
|||||||
_description = '机床刀位'
|
_description = '机床刀位'
|
||||||
|
|
||||||
equipment_id = fields.Many2one('maintenance.equipment', string='设备')
|
equipment_id = fields.Many2one('maintenance.equipment', string='设备')
|
||||||
product_template_id = fields.Many2one('product.template', string='功能刀具名称', domain="[('categ_type', '=', '刀具')]")
|
product_template_id = fields.Many2one('product.template', string='功能刀具名称',
|
||||||
|
domain="[('categ_type', '=', '刀具')]")
|
||||||
image_1920 = fields.Binary('图片', related='product_template_id.image_1920')
|
image_1920 = fields.Binary('图片', related='product_template_id.image_1920')
|
||||||
categ_type = fields.Char(string='功能刀具类型')
|
categ_type = fields.Char(string='功能刀具类型')
|
||||||
diameter = fields.Char('直径')
|
diameter = fields.Char('直径')
|
||||||
@@ -874,4 +1012,3 @@ class SfMaintenanceEquipmentTool(models.Model):
|
|||||||
alarm_value = fields.Char('报警值')
|
alarm_value = fields.Char('报警值')
|
||||||
used_value = fields.Char('已使用值')
|
used_value = fields.Char('已使用值')
|
||||||
code = fields.Char('机床刀位号')
|
code = fields.Char('机床刀位号')
|
||||||
|
|
||||||
|
|||||||
@@ -1,249 +0,0 @@
|
|||||||
from odoo import fields, models, api
|
|
||||||
|
|
||||||
|
|
||||||
class SuitableMachiningMethod(models.Model):
|
|
||||||
_name = 'sf.suitable.machining.method'
|
|
||||||
_description = '适合加工方式'
|
|
||||||
|
|
||||||
name = fields.Char('名称')
|
|
||||||
image = fields.Image('图片')
|
|
||||||
|
|
||||||
@api.model
|
|
||||||
def name_search(self, name='', args=None, operator='ilike', limit=100):
|
|
||||||
# 调用父类的name_search方法,获取原始的结果列表
|
|
||||||
res = super().name_search(name, args, operator, limit)
|
|
||||||
# 定义一个空字典用来存储id和name的映射关系
|
|
||||||
name_dict = {}
|
|
||||||
# 遍历结果列表,将id和name存入字典中
|
|
||||||
for item in res:
|
|
||||||
id = item[0]
|
|
||||||
name = item[1]
|
|
||||||
name_dict[id] = name
|
|
||||||
# 根据id列表搜索符合条件的记录
|
|
||||||
records = self.browse(name_dict.keys())
|
|
||||||
# 定义一个新的结果列表用来存储修改后的结果
|
|
||||||
new_res = []
|
|
||||||
# 遍历每条记录
|
|
||||||
for record in records:
|
|
||||||
# 获取记录的id,name和image属性
|
|
||||||
id = record.id
|
|
||||||
name = name_dict[id]
|
|
||||||
image = record.image
|
|
||||||
# 如果image不为空,将其转换为data URI scheme
|
|
||||||
if image:
|
|
||||||
data_uri = f"data:image/png;base64,{image.decode('utf-8')}"
|
|
||||||
else:
|
|
||||||
data_uri = ""
|
|
||||||
# 将这三个属性组成一个数组,并添加到结果列表中 result.append([id, name, data_uri]) # 返回结果列表 return result
|
|
||||||
new_res.append([id, name, data_uri])
|
|
||||||
# 返回新的结果列表
|
|
||||||
return new_res
|
|
||||||
|
|
||||||
|
|
||||||
class BladeTipCharacteristics(models.Model):
|
|
||||||
_name = 'sf.blade.tip.characteristics'
|
|
||||||
_description = '刀尖特征'
|
|
||||||
|
|
||||||
name = fields.Char('名称')
|
|
||||||
image = fields.Image('图片')
|
|
||||||
|
|
||||||
@api.model
|
|
||||||
def name_search(self, name='', args=None, operator='ilike', limit=100):
|
|
||||||
# 调用父类的name_search方法,获取原始的结果列表
|
|
||||||
res = super().name_search(name, args, operator, limit)
|
|
||||||
# 定义一个空字典用来存储id和name的映射关系
|
|
||||||
name_dict = {}
|
|
||||||
# 遍历结果列表,将id和name存入字典中
|
|
||||||
for item in res:
|
|
||||||
id = item[0]
|
|
||||||
name = item[1]
|
|
||||||
name_dict[id] = name
|
|
||||||
# 根据id列表搜索符合条件的记录
|
|
||||||
records = self.browse(name_dict.keys())
|
|
||||||
# 定义一个新的结果列表用来存储修改后的结果
|
|
||||||
new_res = []
|
|
||||||
# 遍历每条记录
|
|
||||||
for record in records:
|
|
||||||
# 获取记录的id,name和image属性
|
|
||||||
id = record.id
|
|
||||||
name = name_dict[id]
|
|
||||||
image = record.image
|
|
||||||
# 如果image不为空,将其转换为data URI scheme
|
|
||||||
if image:
|
|
||||||
data_uri = f"data:image/png;base64,{image.decode('utf-8')}"
|
|
||||||
else:
|
|
||||||
data_uri = ""
|
|
||||||
# 将这三个属性组成一个数组,并添加到结果列表中 result.append([id, name, data_uri]) # 返回结果列表 return result
|
|
||||||
new_res.append([id, name, data_uri])
|
|
||||||
# 返回新的结果列表
|
|
||||||
return new_res
|
|
||||||
|
|
||||||
|
|
||||||
class HandleType(models.Model):
|
|
||||||
_name = 'sf.handle.type'
|
|
||||||
_description = '柄部类型'
|
|
||||||
|
|
||||||
name = fields.Char('名称')
|
|
||||||
image = fields.Image('图片')
|
|
||||||
|
|
||||||
@api.model
|
|
||||||
def name_search(self, name='', args=None, operator='ilike', limit=100):
|
|
||||||
# 调用父类的name_search方法,获取原始的结果列表
|
|
||||||
res = super().name_search(name, args, operator, limit)
|
|
||||||
# 定义一个空字典用来存储id和name的映射关系
|
|
||||||
name_dict = {}
|
|
||||||
# 遍历结果列表,将id和name存入字典中
|
|
||||||
for item in res:
|
|
||||||
id = item[0]
|
|
||||||
name = item[1]
|
|
||||||
name_dict[id] = name
|
|
||||||
# 根据id列表搜索符合条件的记录
|
|
||||||
records = self.browse(name_dict.keys())
|
|
||||||
# 定义一个新的结果列表用来存储修改后的结果
|
|
||||||
new_res = []
|
|
||||||
# 遍历每条记录
|
|
||||||
for record in records:
|
|
||||||
# 获取记录的id,name和image属性
|
|
||||||
id = record.id
|
|
||||||
name = name_dict[id]
|
|
||||||
image = record.image
|
|
||||||
# 如果image不为空,将其转换为data URI scheme
|
|
||||||
if image:
|
|
||||||
data_uri = f"data:image/png;base64,{image.decode('utf-8')}"
|
|
||||||
else:
|
|
||||||
data_uri = ""
|
|
||||||
# 将这三个属性组成一个数组,并添加到结果列表中 result.append([id, name, data_uri]) # 返回结果列表 return result
|
|
||||||
new_res.append([id, name, data_uri])
|
|
||||||
# 返回新的结果列表
|
|
||||||
return new_res
|
|
||||||
|
|
||||||
|
|
||||||
class CuttingDirection(models.Model):
|
|
||||||
_name = 'sf.cutting.direction'
|
|
||||||
_description = '走刀方向'
|
|
||||||
|
|
||||||
name = fields.Char('名称')
|
|
||||||
image = fields.Image('图片')
|
|
||||||
|
|
||||||
@api.model
|
|
||||||
def name_search(self, name='', args=None, operator='ilike', limit=100):
|
|
||||||
# 调用父类的name_search方法,获取原始的结果列表
|
|
||||||
res = super().name_search(name, args, operator, limit)
|
|
||||||
# 定义一个空字典用来存储id和name的映射关系
|
|
||||||
name_dict = {}
|
|
||||||
# 遍历结果列表,将id和name存入字典中
|
|
||||||
for item in res:
|
|
||||||
id = item[0]
|
|
||||||
name = item[1]
|
|
||||||
name_dict[id] = name
|
|
||||||
# 根据id列表搜索符合条件的记录
|
|
||||||
records = self.browse(name_dict.keys())
|
|
||||||
# 定义一个新的结果列表用来存储修改后的结果
|
|
||||||
new_res = []
|
|
||||||
# 遍历每条记录
|
|
||||||
for record in records:
|
|
||||||
# 获取记录的id,name和image属性
|
|
||||||
id = record.id
|
|
||||||
name = name_dict[id]
|
|
||||||
image = record.image
|
|
||||||
# 如果image不为空,将其转换为data URI scheme
|
|
||||||
if image:
|
|
||||||
data_uri = f"data:image/png;base64,{image.decode('utf-8')}"
|
|
||||||
else:
|
|
||||||
data_uri = ""
|
|
||||||
# 将这三个属性组成一个数组,并添加到结果列表中 result.append([id, name, data_uri]) # 返回结果列表 return result
|
|
||||||
new_res.append([id, name, data_uri])
|
|
||||||
# 返回新的结果列表
|
|
||||||
return new_res
|
|
||||||
|
|
||||||
|
|
||||||
class SuitableCoolant(models.Model):
|
|
||||||
_name = 'sf.suitable.coolant'
|
|
||||||
_description = '适合冷却液'
|
|
||||||
|
|
||||||
name = fields.Char('名称')
|
|
||||||
image = fields.Image('图片')
|
|
||||||
|
|
||||||
@api.model
|
|
||||||
def name_search(self, name='', args=None, operator='ilike', limit=100):
|
|
||||||
# 调用父类的name_search方法,获取原始的结果列表
|
|
||||||
res = super().name_search(name, args, operator, limit)
|
|
||||||
# 定义一个空字典用来存储id和name的映射关系
|
|
||||||
name_dict = {}
|
|
||||||
# 遍历结果列表,将id和name存入字典中
|
|
||||||
for item in res:
|
|
||||||
id = item[0]
|
|
||||||
name = item[1]
|
|
||||||
name_dict[id] = name
|
|
||||||
# 根据id列表搜索符合条件的记录
|
|
||||||
records = self.browse(name_dict.keys())
|
|
||||||
# 定义一个新的结果列表用来存储修改后的结果
|
|
||||||
new_res = []
|
|
||||||
# 遍历每条记录
|
|
||||||
for record in records:
|
|
||||||
# 获取记录的id,name和image属性
|
|
||||||
id = record.id
|
|
||||||
name = name_dict[id]
|
|
||||||
image = record.image
|
|
||||||
# 如果image不为空,将其转换为data URI scheme
|
|
||||||
if image:
|
|
||||||
data_uri = f"data:image/png;base64,{image.decode('utf-8')}"
|
|
||||||
else:
|
|
||||||
data_uri = ""
|
|
||||||
# 将这三个属性组成一个数组,并添加到结果列表中 result.append([id, name, data_uri]) # 返回结果列表 return result
|
|
||||||
new_res.append([id, name, data_uri])
|
|
||||||
# 返回新的结果列表
|
|
||||||
return new_res
|
|
||||||
|
|
||||||
|
|
||||||
class CuttingSpeed(models.Model):
|
|
||||||
_name = 'sf.cutting.speed'
|
|
||||||
_description = '切削速度Vc'
|
|
||||||
|
|
||||||
# def _get_order(self):
|
|
||||||
# last_tool = self.search([], order='id desc', limit=1)
|
|
||||||
# if last_tool:
|
|
||||||
# last_order = int(last_tool.order)
|
|
||||||
# new_order = last_order + 1
|
|
||||||
# else:
|
|
||||||
# new_order = '1'
|
|
||||||
# return new_order
|
|
||||||
#
|
|
||||||
# order = fields.Char('序', default=_get_order, readonly=True)
|
|
||||||
|
|
||||||
product_template_id = fields.Many2one('product.template', string='产品')
|
|
||||||
|
|
||||||
execution_standard_id = fields.Char('执行标准')
|
|
||||||
material_code = fields.Char('材料代号')
|
|
||||||
material_name = fields.Char('材料名称')
|
|
||||||
material_grade = fields.Char('材料牌号')
|
|
||||||
tensile_strength = fields.Float('拉伸强度 (N/mm²)')
|
|
||||||
hardness = fields.Float('硬度(HRC)')
|
|
||||||
|
|
||||||
cutting_speed_n1 = fields.Char('径向切宽 ae=100%D1 ap=1*D1 切削速度Vc')
|
|
||||||
cutting_speed_n2 = fields.Char('径向切宽 ae=50%D1 ap=1.5*D1 切削速度Vc')
|
|
||||||
cutting_speed_n3 = fields.Char('径向切宽 ae=25%D1 ap=L1max 切削速度Vc')
|
|
||||||
cutting_speed_n4 = fields.Char('径向切宽 ae=15%D1 ap=L1max 切削速度Vc')
|
|
||||||
cutting_speed_n5 = fields.Char('径向切宽 ae=5%D1 ap=L1max 切削速度Vc')
|
|
||||||
rough_machining = fields.Char('粗加工 Vc(m/min)')
|
|
||||||
precision_machining = fields.Char('精加工 Vc(m/min)')
|
|
||||||
application = fields.Selection([('主应用', '主应用'), ('次应用', '次应用')], '主/次应用')
|
|
||||||
|
|
||||||
|
|
||||||
class FeedPerTooth(models.Model):
|
|
||||||
_name = 'sf.feed.per.tooth'
|
|
||||||
_description = '每齿走刀量fz'
|
|
||||||
|
|
||||||
product_template_id = fields.Many2one('product.template', string='产品')
|
|
||||||
|
|
||||||
cutting_speed = fields.Char('径向切宽 ae(mm)')
|
|
||||||
machining_method = fields.Selection([('直铣', '直铣'), ('坡铣', '坡铣')], string='加工方式')
|
|
||||||
materials_type_id = fields.Many2one('sf.materials.model', string='材料型号')
|
|
||||||
blade_diameter = fields.Float('刃部直径D1(mm)', readonly=True, related='product_template_id.cutting_tool_blade_diameter')
|
|
||||||
feed_per_tooth = fields.Char('每齿走刀量 (mm/z)')
|
|
||||||
unit = fields.Char('单位', default='fz')
|
|
||||||
|
|
||||||
# @api.depends('product_template_id')
|
|
||||||
# def _compute_product_template_id(self):
|
|
||||||
# if self.product_template_id is not None:
|
|
||||||
# self.blade_diameter = self.product_template_id.cutting_tool_blade_diameter
|
|
||||||
@@ -4,16 +4,9 @@ access_sf_model_type,sf_model_type,model_sf_model_type,base.group_user,1,1,1,1
|
|||||||
access_sf_product_model_type_routing_sort,sf_product_model_type_routing_sort,model_sf_product_model_type_routing_sort,base.group_user,1,1,1,1
|
access_sf_product_model_type_routing_sort,sf_product_model_type_routing_sort,model_sf_product_model_type_routing_sort,base.group_user,1,1,1,1
|
||||||
access_sf_embryo_model_type_routing_sort,sf_embryo_model_type_routing_sort,model_sf_embryo_model_type_routing_sort,base.group_user,1,1,1,1
|
access_sf_embryo_model_type_routing_sort,sf_embryo_model_type_routing_sort,model_sf_embryo_model_type_routing_sort,base.group_user,1,1,1,1
|
||||||
access_sf_surface_technics_model_type_routing_sort,sf_surface_technics_model_type_routing_sort,model_sf_surface_technics_model_type_routing_sort,base.group_user,1,1,1,1
|
access_sf_surface_technics_model_type_routing_sort,sf_surface_technics_model_type_routing_sort,model_sf_surface_technics_model_type_routing_sort,base.group_user,1,1,1,1
|
||||||
|
|
||||||
access_sf_production_line,sf.production.line,model_sf_production_line,base.group_user,1,1,1,1
|
access_sf_production_line,sf.production.line,model_sf_production_line,base.group_user,1,1,1,1
|
||||||
|
|
||||||
access_sf_suitable_machining_method,sf_suitable_machining_method,model_sf_suitable_machining_method,base.group_user,1,1,1,1
|
|
||||||
access_sf_blade_tip_characteristics,sf_blade_tip_characteristics,model_sf_blade_tip_characteristics,base.group_user,1,1,1,1
|
|
||||||
access_sf_handle_type,sf_handle_type,model_sf_handle_type,base.group_user,1,1,1,1
|
|
||||||
access_sf_cutting_direction,sf_cutting_direction,model_sf_cutting_direction,base.group_user,1,1,1,1
|
|
||||||
access_sf_suitable_coolant,sf_suitable_coolant,model_sf_suitable_coolant,base.group_user,1,1,1,1
|
|
||||||
access_sf_cutting_speed,sf_cutting_speed,model_sf_cutting_speed,base.group_user,1,1,1,1
|
|
||||||
access_sf_feed_per_tooth,sf_feed_per_tooth,model_sf_feed_per_tooth,base.group_user,1,1,1,1
|
|
||||||
access_maintenance_equipment_tool,maintenance_equipment_tool,model_maintenance_equipment_tool,base.group_user,1,1,1,1
|
access_maintenance_equipment_tool,maintenance_equipment_tool,model_maintenance_equipment_tool,base.group_user,1,1,1,1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
|
@@ -1,231 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<odoo>
|
|
||||||
<!-- ======================================== 适合加工方式========================================-->
|
|
||||||
<record model="ir.ui.view" id="sf_suitable_machining_method_tree">
|
|
||||||
<field name="name">适合加工方式</field>
|
|
||||||
<field name="model">sf.suitable.machining.method</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<tree>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="image" widget="image"/>
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record model="ir.ui.view" id="sf_suitable_machining_method_form">
|
|
||||||
<field name="name">适合加工方式</field>
|
|
||||||
<field name="model">sf.suitable.machining.method</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form>
|
|
||||||
<sheet>
|
|
||||||
<group>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="image" widget="image"/>
|
|
||||||
</group>
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="sf_suitable_machining_method_act" model="ir.actions.act_window">
|
|
||||||
<field name="name">适合加工方式</field>
|
|
||||||
<field name="type">ir.actions.act_window</field>
|
|
||||||
<field name="res_model">sf.suitable.machining.method</field>
|
|
||||||
<field name="view_mode">tree,form</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ======================================== 刀尖特征========================================-->
|
|
||||||
<record model="ir.ui.view" id="sf_blade_tip_characteristics_tree">
|
|
||||||
<field name="name">刀尖特征</field>
|
|
||||||
<field name="model">sf.blade.tip.characteristics</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<tree>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="image" widget="image"/>
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record model="ir.ui.view" id="sf_blade_tip_characteristics_form">
|
|
||||||
<field name="name">刀尖特征</field>
|
|
||||||
<field name="model">sf.blade.tip.characteristics</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form>
|
|
||||||
<sheet>
|
|
||||||
<group>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="image" widget="image"/>
|
|
||||||
</group>
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="sf_blade_tip_characteristics_act" model="ir.actions.act_window">
|
|
||||||
<field name="name">刀尖特征</field>
|
|
||||||
<field name="type">ir.actions.act_window</field>
|
|
||||||
<field name="res_model">sf.blade.tip.characteristics</field>
|
|
||||||
<field name="view_mode">tree,form</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ======================================== 柄部类型========================================-->
|
|
||||||
<record model="ir.ui.view" id="sf_handle_type_tree">
|
|
||||||
<field name="name">柄部类型</field>
|
|
||||||
<field name="model">sf.handle.type</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<tree>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="image" widget="image"/>
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record model="ir.ui.view" id="sf_handle_type_forme">
|
|
||||||
<field name="name">柄部类型</field>
|
|
||||||
<field name="model">sf.handle.type</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form>
|
|
||||||
<sheet>
|
|
||||||
<group>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="image" widget="image"/>
|
|
||||||
</group>
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="sf_handle_type_act" model="ir.actions.act_window">
|
|
||||||
<field name="name">柄部类型</field>
|
|
||||||
<field name="type">ir.actions.act_window</field>
|
|
||||||
<field name="res_model">sf.handle.type</field>
|
|
||||||
<field name="view_mode">tree,form</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ======================================== 走刀方向========================================-->
|
|
||||||
<record model="ir.ui.view" id="sf_cutting_direction_tree">
|
|
||||||
<field name="name">走刀方向</field>
|
|
||||||
<field name="model">sf.cutting.direction</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<tree>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="image" widget="image"/>
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record model="ir.ui.view" id="sf_cutting_direction_form">
|
|
||||||
<field name="name">走刀方向</field>
|
|
||||||
<field name="model">sf.cutting.direction</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form>
|
|
||||||
<sheet>
|
|
||||||
<group>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="image" widget="image"/>
|
|
||||||
</group>
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="sf_cutting_direction_act" model="ir.actions.act_window">
|
|
||||||
<field name="name">走刀方向</field>
|
|
||||||
<field name="type">ir.actions.act_window</field>
|
|
||||||
<field name="res_model">sf.cutting.direction</field>
|
|
||||||
<field name="view_mode">tree,form</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ======================================== 适合冷却液========================================-->
|
|
||||||
<record model="ir.ui.view" id="sf_suitable_coolant_tree">
|
|
||||||
<field name="name">适合冷却液</field>
|
|
||||||
<field name="model">sf.suitable.coolant</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<tree>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="image" widget="image"/>
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record model="ir.ui.view" id="sf_suitable_coolant_form">
|
|
||||||
<field name="name">适合冷却液</field>
|
|
||||||
<field name="model">sf.suitable.coolant</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form>
|
|
||||||
<sheet>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="image" widget="image"/>
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="sf_suitable_coolant_act" model="ir.actions.act_window">
|
|
||||||
<field name="name">适合冷却液</field>
|
|
||||||
<field name="type">ir.actions.act_window</field>
|
|
||||||
<field name="res_model">sf.suitable.coolant</field>
|
|
||||||
<field name="view_mode">tree,form</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ======================================== 切削速度Vc========================================-->
|
|
||||||
<record id="sf_cutting_speed_tree" model="ir.ui.view">
|
|
||||||
<field name="name">切削速度Vc</field>
|
|
||||||
<field name="model">sf.cutting.speed</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<tree string="切削速度Vc" create="1">
|
|
||||||
<!-- <field name="order"/>-->
|
|
||||||
<field name="execution_standard_id"/>
|
|
||||||
<field name="material_code"/>
|
|
||||||
<field name="material_name"/>
|
|
||||||
<field name="material_grade"/>
|
|
||||||
<field name="tensile_strength"/>
|
|
||||||
<field name="hardness"/>
|
|
||||||
<field name="cutting_speed_n1"/>
|
|
||||||
<field name="cutting_speed_n2"/>
|
|
||||||
<field name="cutting_speed_n3"/>
|
|
||||||
<field name="cutting_speed_n4"/>
|
|
||||||
<field name="cutting_speed_n5"/>
|
|
||||||
<field name="rough_machining"/>
|
|
||||||
<field name="precision_machining"/>
|
|
||||||
<field name="application"/>
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="sf_cutting_speed_act" model="ir.actions.act_window">
|
|
||||||
<field name="name">切削速度Vc</field>
|
|
||||||
<field name="type">ir.actions.act_window</field>
|
|
||||||
<field name="res_model">sf.cutting.speed</field>
|
|
||||||
<field name="view_mode">tree</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ======================================== 每齿走刀量fz========================================-->
|
|
||||||
<record model="ir.ui.view" id="sf_feed_per_tooth_tree">
|
|
||||||
<field name="name">每齿走刀量fz</field>
|
|
||||||
<field name="model">sf.feed.per.tooth</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<tree>
|
|
||||||
<field name="cutting_speed" attrs="{'readonly': [('materials_type_id','!=',False)]}"/>
|
|
||||||
<field name="machining_method" attrs="{'readonly': [('cutting_speed','!=',False)]}"/>
|
|
||||||
<field name="materials_type_id" attrs="{'readonly': [('cutting_speed','!=',False)]}"/>
|
|
||||||
<field name="blade_diameter"/>
|
|
||||||
<field name="feed_per_tooth"/>
|
|
||||||
<field name="unit"/>
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="sf_feed_per_tooth_act" model="ir.actions.act_window">
|
|
||||||
<field name="name">每齿走刀量fz</field>
|
|
||||||
<field name="type">ir.actions.act_window</field>
|
|
||||||
<field name="res_model">sf.feed.per.tooth</field>
|
|
||||||
<field name="view_mode">tree</field>
|
|
||||||
</record>
|
|
||||||
</odoo>
|
|
||||||
@@ -13,6 +13,7 @@
|
|||||||
'depends': ['sf_base', 'base_setup'],
|
'depends': ['sf_base', 'base_setup'],
|
||||||
'data': [
|
'data': [
|
||||||
'data/ir_cron_data.xml',
|
'data/ir_cron_data.xml',
|
||||||
|
'security/ir.model.access.csv',
|
||||||
'views/res_config_settings_views.xml'
|
'views/res_config_settings_views.xml'
|
||||||
],
|
],
|
||||||
'demo': [
|
'demo': [
|
||||||
|
|||||||
@@ -21,53 +21,50 @@ class ResConfigSettings(models.TransientModel):
|
|||||||
|
|
||||||
def sf_all_sync(self):
|
def sf_all_sync(self):
|
||||||
try:
|
try:
|
||||||
|
self.env['sf.production.materials'].sync_all_production_materials()
|
||||||
|
_logger.info("同步资源库材料完成")
|
||||||
|
self.env['sf.materials.model'].sync_all_materials_model()
|
||||||
|
_logger.info("同步资源库材料型号完成")
|
||||||
self.env['sf.international.standards'].sync_all_mrs_international_standards()
|
self.env['sf.international.standards'].sync_all_mrs_international_standards()
|
||||||
_logger.info("同步资源库国际标准完成")
|
_logger.info("同步资源库国际标准完成")
|
||||||
self.env['material.apply'].sync_all_material_apply()
|
self.env['material.apply'].sync_all_material_apply()
|
||||||
_logger.info("同步资源库材料应用完成")
|
_logger.info("同步资源库材料应用完成")
|
||||||
self.env['sf.production.materials'].sync_all_production_materials()
|
|
||||||
_logger.info("同步资源库材料")
|
|
||||||
self.env['sf.materials.model'].sync_all_materials_model()
|
|
||||||
_logger.info("同步资源库材料型号")
|
|
||||||
self.env['sf.production.process.category'].sync_all_production_process_category()
|
self.env['sf.production.process.category'].sync_all_production_process_category()
|
||||||
_logger.info("同步资源库表面工艺类别")
|
_logger.info("同步资源库表面工艺类别完成")
|
||||||
self.env['sf.production.process'].sync_all_production_process()
|
self.env['sf.production.process'].sync_all_production_process()
|
||||||
_logger.info("同步资源库表面工艺")
|
_logger.info("同步资源库表面工艺完成")
|
||||||
# self.env['sf.processing.technology'].sync_all_processing_technology()
|
# self.env['sf.processing.technology'].sync_all_processing_technology()
|
||||||
# _logger.info("同步资源库加工工艺")
|
# _logger.info("同步资源库加工工艺")
|
||||||
self.env['sf.machine.brand.tags'].sync_all_machine_brand_tags()
|
self.env['sf.machine.brand.tags'].sync_all_machine_brand_tags()
|
||||||
_logger.info("同步资源库品牌类别")
|
_logger.info("同步资源库品牌类别完成")
|
||||||
self.env['sf.machine.brand'].sync_all_machine_brand()
|
self.env['sf.machine.brand'].sync_all_machine_brand()
|
||||||
_logger.info("同步资源库品牌")
|
_logger.info("同步资源库品牌完成")
|
||||||
self.env['sf.machine.control_system'].sync_all_machine_control_system()
|
self.env['sf.machine.control_system'].sync_all_machine_control_system()
|
||||||
_logger.info("同步资源库控制系统")
|
_logger.info("同步资源库控制系统完成")
|
||||||
self.env['sf.machine_tool.category'].sync_all_machine_tool_category()
|
self.env['sf.machine_tool.category'].sync_all_machine_tool_category()
|
||||||
_logger.info("同步资源库机床类型")
|
_logger.info("同步资源库机床类型完成")
|
||||||
self.env['sf.production.process.parameter'].sync_all_production_process_parameter()
|
self.env['sf.production.process.parameter'].sync_all_production_process_parameter()
|
||||||
_logger.info("同步刀具物料")
|
_logger.info("同步刀具物料完成")
|
||||||
self.env['sf.cutting.tool.material'].sync_all_cutting_tool_material()
|
self.env['sf.cutting.tool.material'].sync_all_cutting_tool_material()
|
||||||
_logger.info("同步刀具类型")
|
_logger.info("同步刀具类型完成")
|
||||||
self.env['sf.cutting.tool.type'].sync_all_tool_type()
|
self.env['sf.cutting.tool.type'].sync_all_tool_type()
|
||||||
_logger.info("同步所有刀具类型完成")
|
_logger.info("同步功能刀具类型完成")
|
||||||
# _logger.info("同步所有刀具型号...")
|
|
||||||
# self.env['sf.cutting.tool.model'].sync_all_tool_model()
|
|
||||||
_logger.info("同步所有刀具型号完成")
|
|
||||||
self.env['sf.functional.cutting.tool.model'].sync_all_functional_cutting_tool_model()
|
self.env['sf.functional.cutting.tool.model'].sync_all_functional_cutting_tool_model()
|
||||||
_logger.info("同步夹具物料")
|
_logger.info("同步夹具物料完成")
|
||||||
self.env['sf.fixture.material'].sync_all_fixture_material()
|
self.env['sf.fixture.material'].sync_all_fixture_material()
|
||||||
_logger.info("同步联装类型")
|
_logger.info("同步联装类型完成")
|
||||||
self.env['sf.multi_mounting.type'].sync_all_multi_mounting_type()
|
self.env['sf.multi_mounting.type'].sync_all_multi_mounting_type()
|
||||||
_logger.info("同步夹具型号")
|
_logger.info("同步夹具型号完成")
|
||||||
self.env['sf.fixture.model'].sync_all_fixture_model()
|
self.env['sf.fixture.model'].sync_all_fixture_model()
|
||||||
_logger.info("同步功能夹具类型")
|
_logger.info("同步夹具型号类型完成")
|
||||||
# self.env['sf.functional.fixture'].sync_all_functional_fixture()
|
|
||||||
|
|
||||||
self.env['sf.functional.fixture.type'].sync_all_functional_fixture_type()
|
self.env['sf.functional.fixture.type'].sync_all_functional_fixture_type()
|
||||||
|
_logger.info("同步功能夹具类型完成")
|
||||||
self.env['sf.machine_tool.type'].sync_all_machine_tool_type()
|
self.env['sf.machine_tool.type'].sync_all_machine_tool_type()
|
||||||
_logger.info("同步资源库机床型号完成")
|
_logger.info("同步资源库机床型号完成")
|
||||||
self.env['maintenance.equipment.image'].sync_all_maintenance_equipment_image()
|
self.env['maintenance.equipment.image'].sync_all_maintenance_equipment_image()
|
||||||
_logger.info("同步能力特征库")
|
_logger.info("同步能力特征库完成")
|
||||||
|
self.env['sf.cutting_tool.standard.library'].sync_all_cutting_tool_standard_library()
|
||||||
|
_logger.info("同步刀具标准库完成")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
_logger.info("捕获错误信息:%s" % e)
|
_logger.info("捕获错误信息:%s" % e)
|
||||||
raise ValidationError("数据错误导致同步失败,请联系管理员")
|
raise ValidationError("数据错误导致同步失败,请联系管理员")
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
7
sf_mrs_connect/security/ir.model.access.csv
Normal file
7
sf_mrs_connect/security/ir.model.access.csv
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||||
|
access_sf_static_resource_datasync,sf_static_resource_datasync,model_sf_static_resource_datasync,base.group_user,1,1,1,1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
import logging
|
import logging
|
||||||
from odoo.modules import get_resource_path
|
from odoo.modules import get_resource_path
|
||||||
from odoo import fields, models, api
|
from odoo import fields, models, api
|
||||||
from quatotion import readSql, feature_recognize, auto_quatotion
|
#from quatotion import readSql, feature_recognize, auto_quatotion
|
||||||
|
|
||||||
__author__ = 'jinling.yang'
|
__author__ = 'jinling.yang'
|
||||||
_logger = logging.getLogger(__name__)
|
_logger = logging.getLogger(__name__)
|
||||||
@@ -24,14 +24,14 @@ class AutoQuatotion(models.Model):
|
|||||||
def get_process_time_db_path(self):
|
def get_process_time_db_path(self):
|
||||||
return get_resource_path('sf_sale', 'models', 'process_time.db')
|
return get_resource_path('sf_sale', 'models', 'process_time.db')
|
||||||
|
|
||||||
def get_auto_quatotion(self, stp_url, feature_full_path, process_time_db_path, model_code):
|
# def get_auto_quatotion(self, stp_url, feature_full_path, process_time_db_path, model_code):
|
||||||
'''
|
# '''
|
||||||
通过打包好的.so库,
|
# 通过打包好的.so库,
|
||||||
以调用autoQuatotion库中Quatotion类,
|
# 以调用autoQuatotion库中Quatotion类,
|
||||||
初始化后调用类的analyseShape方法对模型文件进行价格预测
|
# 初始化后调用类的analyseShape方法对模型文件进行价格预测
|
||||||
'''
|
# '''
|
||||||
# 初始化自动报价类(输入特征数据库和加工时间数据库)
|
# # 初始化自动报价类(输入特征数据库和加工时间数据库)
|
||||||
reader = auto_quatotion.Quatotion(feature_full_path, process_time_db_path)
|
# reader = auto_quatotion.Quatotion(feature_full_path, process_time_db_path)
|
||||||
# 获取价格、加工时间、尺寸、XYZ、翻面次数
|
# # 获取价格、加工时间、尺寸、XYZ、翻面次数
|
||||||
feature_info = reader.analyseShape(stp_url, InfoJson={})
|
# feature_info = reader.analyseShape(stp_url, InfoJson={})
|
||||||
return feature_info
|
# return feature_info
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
from odoo import models, fields, api
|
from odoo import models, fields, api
|
||||||
from odoo.modules import get_resource_path
|
from odoo.modules import get_resource_path
|
||||||
from OCC.Extend.DataExchange import read_step_file
|
# from OCC.Extend.DataExchange import read_step_file
|
||||||
from OCC.Extend.DataExchange import write_stl_file
|
# from OCC.Extend.DataExchange import write_stl_file
|
||||||
from odoo.exceptions import ValidationError, UserError
|
from odoo.exceptions import ValidationError, UserError
|
||||||
from odoo.addons.sf_base.commons.common import Common
|
from odoo.addons.sf_base.commons.common import Common
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ class FunctionalCuttingToolEntity(models.Model):
|
|||||||
|
|
||||||
# code = fields.Char('序列号')
|
# code = fields.Char('序列号')
|
||||||
barcode_id = fields.Many2one('stock.lot', string='功能刀具序列号', readonly=True)
|
barcode_id = fields.Many2one('stock.lot', string='功能刀具序列号', readonly=True)
|
||||||
name = fields.Char('名称', size=20)
|
name = fields.Char(related='barcode_id.name')
|
||||||
functional_tool_name_id = fields.Many2one('product.product', string='功能刀具名称', readonly=True)
|
functional_tool_name_id = fields.Many2one('product.product', string='功能刀具名称', readonly=True)
|
||||||
mrs_cutting_tool_model_id = fields.Many2one('sf.cutting.tool.model', string='刀具型号')
|
mrs_cutting_tool_model_id = fields.Many2one('sf.cutting_tool.standard.library', string='刀具型号')
|
||||||
mrs_cutting_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型',
|
mrs_cutting_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型',
|
||||||
group_expand='_read_group_mrs_cutting_tool_type_id', compute_sudo=True)
|
group_expand='_read_group_mrs_cutting_tool_type_id', compute_sudo=True)
|
||||||
|
|
||||||
@@ -67,10 +67,10 @@ class FunctionalCuttingToolEntity(models.Model):
|
|||||||
domain=[('type', '=', '加工能力')],
|
domain=[('type', '=', '加工能力')],
|
||||||
related='cutting_tool_integral_model_id.suitable_machining_method_ids')
|
related='cutting_tool_integral_model_id.suitable_machining_method_ids')
|
||||||
|
|
||||||
blade_tip_characteristics_ids = fields.Many2many('maintenance.equipment.image',
|
blade_tip_characteristics_id = fields.Many2many('maintenance.equipment.image',
|
||||||
'rel_blade_tip_product_template_tool_entity', '刀尖特征',
|
'rel_blade_tip_product_template_tool_entity', '刀尖特征',
|
||||||
domain=[('type', '=', '刀尖特征')],
|
domain=[('type', '=', '刀尖特征')],
|
||||||
related='cutting_tool_integral_model_id.blade_tip_characteristics_ids')
|
related='cutting_tool_integral_model_id.blade_tip_characteristics_id')
|
||||||
|
|
||||||
handle_type_ids = fields.Many2many('maintenance.equipment.image',
|
handle_type_ids = fields.Many2many('maintenance.equipment.image',
|
||||||
'rel_handle_product_template_tool_entity', '柄部类型',
|
'rel_handle_product_template_tool_entity', '柄部类型',
|
||||||
@@ -90,7 +90,7 @@ class FunctionalCuttingToolEntity(models.Model):
|
|||||||
def _get_functional_tool_model_ids(self, functional_tool_model_code):
|
def _get_functional_tool_model_ids(self, functional_tool_model_code):
|
||||||
functional_tool_model_ids = []
|
functional_tool_model_ids = []
|
||||||
for item in functional_tool_model_code:
|
for item in functional_tool_model_code:
|
||||||
functional_tool_model = self.env['sf.cutting.tool.model'].search([('code', '=', item)])
|
functional_tool_model = self.env['sf.cutting_tool.standard.library'].search([('code', '=', item)])
|
||||||
functional_tool_model_ids.append(functional_tool_model.id)
|
functional_tool_model_ids.append(functional_tool_model.id)
|
||||||
return [(6, 0, functional_tool_model_ids)]
|
return [(6, 0, functional_tool_model_ids)]
|
||||||
|
|
||||||
@@ -623,7 +623,7 @@ class CAMWorkOrderProgramKnifePlan(models.Model):
|
|||||||
"""
|
"""
|
||||||
record = self.env['sf.functional.tool.assembly'].create({
|
record = self.env['sf.functional.tool.assembly'].create({
|
||||||
'barcode_id': self.barcode_id.id,
|
'barcode_id': self.barcode_id.id,
|
||||||
'name': self.functional_tool_name_id.id,
|
'functional_tool_name_id': self.functional_tool_name_id.id,
|
||||||
'functional_tool_type_id': self.functional_tool_type_id.id,
|
'functional_tool_type_id': self.functional_tool_type_id.id,
|
||||||
'functional_tool_diameter': self.diameter,
|
'functional_tool_diameter': self.diameter,
|
||||||
'functional_tool_length': self.tool_loading_length,
|
'functional_tool_length': self.tool_loading_length,
|
||||||
@@ -664,7 +664,6 @@ class CAMWorkOrderProgramKnifePlan(models.Model):
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class FunctionalToolAssembly(models.Model):
|
class FunctionalToolAssembly(models.Model):
|
||||||
_name = 'sf.functional.tool.assembly'
|
_name = 'sf.functional.tool.assembly'
|
||||||
_description = '功能刀具组装单'
|
_description = '功能刀具组装单'
|
||||||
@@ -673,7 +672,7 @@ class FunctionalToolAssembly(models.Model):
|
|||||||
assembly_order_code = fields.Char(string='编码', readonly=True)
|
assembly_order_code = fields.Char(string='编码', readonly=True)
|
||||||
barcode_id = fields.Many2one('stock.lot', string='功能刀具序列号', readonly=True)
|
barcode_id = fields.Many2one('stock.lot', string='功能刀具序列号', readonly=True)
|
||||||
functional_tool_name_id = fields.Many2one('product.product', string='功能刀具名称', readonly=True)
|
functional_tool_name_id = fields.Many2one('product.product', string='功能刀具名称', readonly=True)
|
||||||
name = fields.Char( string='功能刀具名称', readonly=True)
|
name = fields.Char(string='名称', readonly=True)
|
||||||
functional_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型', readonly=True,
|
functional_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型', readonly=True,
|
||||||
group_expand='_read_group_functional_tool_type_ids')
|
group_expand='_read_group_functional_tool_type_ids')
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class SfToolMaterialSearch(models.Model):
|
|||||||
blade_radius = fields.Float('刀片刀尖半径(mm)')
|
blade_radius = fields.Float('刀片刀尖半径(mm)')
|
||||||
blade_nut = fields.Float('刀片配对螺母(mm)')
|
blade_nut = fields.Float('刀片配对螺母(mm)')
|
||||||
mrs_cutting_tool_model_blade_cutter_bar_ids = fields.Many2many(
|
mrs_cutting_tool_model_blade_cutter_bar_ids = fields.Many2many(
|
||||||
'sf.cutting.tool.model',
|
'sf.cutting_tool.standard.library',
|
||||||
relation='sf_tool_material_search_blade_cutter_bar_rel',
|
relation='sf_tool_material_search_blade_cutter_bar_rel',
|
||||||
column1='model_id_1',
|
column1='model_id_1',
|
||||||
column2='model_id_2',
|
column2='model_id_2',
|
||||||
@@ -64,7 +64,7 @@ class SfToolMaterialSearch(models.Model):
|
|||||||
default=lambda self: [], # 使用空列表作为默认值
|
default=lambda self: [], # 使用空列表作为默认值
|
||||||
)
|
)
|
||||||
mrs_cutting_tool_model_blade_cutter_pad_ids = fields.Many2many(
|
mrs_cutting_tool_model_blade_cutter_pad_ids = fields.Many2many(
|
||||||
'sf.cutting.tool.model',
|
'sf.cutting_tool.standard.library',
|
||||||
relation='sf_tool_material_search_blade_cutter_pad_rel',
|
relation='sf_tool_material_search_blade_cutter_pad_rel',
|
||||||
column1='model_id_1',
|
column1='model_id_1',
|
||||||
column2='model_id_2',
|
column2='model_id_2',
|
||||||
@@ -97,7 +97,7 @@ class SfToolMaterialSearch(models.Model):
|
|||||||
suitable_machining_method_ids = fields.Many2many('maintenance.equipment.image',
|
suitable_machining_method_ids = fields.Many2many('maintenance.equipment.image',
|
||||||
'rel_machining_product_template_material_search', '适合加工方式',
|
'rel_machining_product_template_material_search', '适合加工方式',
|
||||||
domain=[('type', '=', '加工能力')])
|
domain=[('type', '=', '加工能力')])
|
||||||
blade_tip_characteristics_ids = fields.Many2many('maintenance.equipment.image',
|
blade_tip_characteristics_id = fields.Many2many('maintenance.equipment.image',
|
||||||
'rel_blade_tip_product_template_material_search', '刀尖特征',
|
'rel_blade_tip_product_template_material_search', '刀尖特征',
|
||||||
domain=[('type', '=', '刀尖特征')])
|
domain=[('type', '=', '刀尖特征')])
|
||||||
handle_type_ids = fields.Many2many('maintenance.equipment.image',
|
handle_type_ids = fields.Many2many('maintenance.equipment.image',
|
||||||
@@ -204,7 +204,7 @@ class SfToolMaterialSearch(models.Model):
|
|||||||
bar_blade_number = fields.Integer('刀杆刃数')
|
bar_blade_number = fields.Integer('刀杆刃数')
|
||||||
bar_d_diameter = fields.Float('刀杆D刃径(mm)')
|
bar_d_diameter = fields.Float('刀杆D刃径(mm)')
|
||||||
mrs_cutting_tool_model_bar_blade_ids = fields.Many2many(
|
mrs_cutting_tool_model_bar_blade_ids = fields.Many2many(
|
||||||
'sf.cutting.tool.model',
|
'sf.cutting_tool.standard.library',
|
||||||
relation='sf_tool_material_search_bar_blade_rel',
|
relation='sf_tool_material_search_bar_blade_rel',
|
||||||
column1='model_id_1',
|
column1='model_id_1',
|
||||||
column2='model_id_2',
|
column2='model_id_2',
|
||||||
@@ -226,7 +226,7 @@ class SfToolMaterialSearch(models.Model):
|
|||||||
pad_blade_number = fields.Integer('刀盘刃数')
|
pad_blade_number = fields.Integer('刀盘刃数')
|
||||||
pad_d_diameter = fields.Float('刀盘D刃径(mm)')
|
pad_d_diameter = fields.Float('刀盘D刃径(mm)')
|
||||||
mrs_cutting_tool_model_pad_blade_ids = fields.Many2many(
|
mrs_cutting_tool_model_pad_blade_ids = fields.Many2many(
|
||||||
'sf.cutting.tool.model',
|
'sf.cutting_tool.standard.library',
|
||||||
relation='sf_tool_material_search_pad_blade_rel',
|
relation='sf_tool_material_search_pad_blade_rel',
|
||||||
column1='model_id_1',
|
column1='model_id_1',
|
||||||
column2='model_id_2',
|
column2='model_id_2',
|
||||||
@@ -256,7 +256,7 @@ class SfToolMaterialSearch(models.Model):
|
|||||||
handle_body_accuracy = fields.Float('刀柄本体精度(mm)')
|
handle_body_accuracy = fields.Float('刀柄本体精度(mm)')
|
||||||
handle_nut = fields.Float('刀柄配对螺母(mm)')
|
handle_nut = fields.Float('刀柄配对螺母(mm)')
|
||||||
mrs_cutting_tool_model_handle_chuck_model_ids = fields.Many2many(
|
mrs_cutting_tool_model_handle_chuck_model_ids = fields.Many2many(
|
||||||
'sf.cutting.tool.model',
|
'sf.cutting_tool.standard.library',
|
||||||
relation='sf_tool_material_search_handle_chuck_rel',
|
relation='sf_tool_material_search_handle_chuck_rel',
|
||||||
column1='model_id_1',
|
column1='model_id_1',
|
||||||
column2='model_id_2',
|
column2='model_id_2',
|
||||||
@@ -280,7 +280,7 @@ class SfToolMaterialSearch(models.Model):
|
|||||||
chuck_height = fields.Float('夹头高度(mm)')
|
chuck_height = fields.Float('夹头高度(mm)')
|
||||||
chuck_nut = fields.Float('夹头配对螺母(mm)')
|
chuck_nut = fields.Float('夹头配对螺母(mm)')
|
||||||
mrs_cutting_tool_model_chuck_handle_model_ids = fields.Many2many(
|
mrs_cutting_tool_model_chuck_handle_model_ids = fields.Many2many(
|
||||||
'sf.cutting.tool.model',
|
'sf.cutting_tool.standard.library',
|
||||||
relation='sf_tool_material_search_chuck_handle_rel',
|
relation='sf_tool_material_search_chuck_handle_rel',
|
||||||
column1='model_id_1',
|
column1='model_id_1',
|
||||||
column2='model_id_2',
|
column2='model_id_2',
|
||||||
|
|||||||
@@ -99,8 +99,8 @@
|
|||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<group string="刀尖特征">
|
<group string="刀尖特征">
|
||||||
<field name="blade_tip_characteristics_ids" string="" widget="custom_many2many_checkboxes"
|
<field name="blade_tip_characteristics_id" string="" widget="custom_many2many_checkboxes"
|
||||||
domain="[('id','in',blade_tip_characteristics_ids)]"/>
|
domain="[('id','in',blade_tip_characteristics_id)]"/>
|
||||||
</group>
|
</group>
|
||||||
<group string="柄部类型">
|
<group string="柄部类型">
|
||||||
<field name="handle_type_ids" string="" widget="custom_many2many_checkboxes"
|
<field name="handle_type_ids" string="" widget="custom_many2many_checkboxes"
|
||||||
|
|||||||
@@ -175,7 +175,7 @@
|
|||||||
<field name="blade_hardness" string="加工硬度"/>
|
<field name="blade_hardness" string="加工硬度"/>
|
||||||
<field name="blade_accuracy" string="精度等级"/>
|
<field name="blade_accuracy" string="精度等级"/>
|
||||||
<field name="blade_coating_material_id" string="涂层材质"/>
|
<field name="blade_coating_material_id" string="涂层材质"/>
|
||||||
<field name="mrs_cutting_tool_model_blade_cutter_bar_ids" widget="many2many_tags"/>
|
<!-- <field name="mrs_cutting_tool_model_blade_cutter_bar_ids" widget="many2many_tags"/>-->
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="blade_top_angle" string="顶角(°)"/>
|
<field name="blade_top_angle" string="顶角(°)"/>
|
||||||
@@ -231,7 +231,7 @@
|
|||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<group string="刀尖特征">
|
<group string="刀尖特征">
|
||||||
<field name="blade_tip_characteristics_ids" string="" widget="custom_many2many_checkboxes"/>
|
<field name="blade_tip_characteristics_id" string="" widget="custom_many2many_checkboxes"/>
|
||||||
</group>
|
</group>
|
||||||
<group string="柄部类型">
|
<group string="柄部类型">
|
||||||
<field name="handle_type_ids" string="" widget="custom_many2many_checkboxes"/>
|
<field name="handle_type_ids" string="" widget="custom_many2many_checkboxes"/>
|
||||||
|
|||||||
@@ -273,7 +273,6 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
|||||||
stock_lot = self.create_assemble_warehouse_receipt()
|
stock_lot = self.create_assemble_warehouse_receipt()
|
||||||
# 创建刀具组装入库单
|
# 创建刀具组装入库单
|
||||||
self.create_stocking_picking(stock_lot)
|
self.create_stocking_picking(stock_lot)
|
||||||
print('已运行1')
|
|
||||||
desc_1 = {
|
desc_1 = {
|
||||||
'barcode_id': stock_lot.id,
|
'barcode_id': stock_lot.id,
|
||||||
'integral_code_id': self.integral_code_id.id,
|
'integral_code_id': self.integral_code_id.id,
|
||||||
@@ -293,13 +292,11 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
|||||||
'tool_loading_person': self.env.user.name,
|
'tool_loading_person': self.env.user.name,
|
||||||
'tool_loading_time': fields.Datetime.now()
|
'tool_loading_time': fields.Datetime.now()
|
||||||
}
|
}
|
||||||
print('已运行2')
|
|
||||||
functional_tool_assembly = self.env['sf.functional.tool.assembly'].search([
|
functional_tool_assembly = self.env['sf.functional.tool.assembly'].search([
|
||||||
('machine_tool_name_id', '=', self.machine_tool_name_id.id),
|
('machine_tool_name_id', '=', self.machine_tool_name_id.id),
|
||||||
('cutter_spacing_code', '=', self.cutter_spacing_code),
|
('cutter_spacing_code', '=', self.cutter_spacing_code),
|
||||||
('assemble_status', '=', '0'),
|
('assemble_status', '=', '0'),
|
||||||
])
|
])
|
||||||
print('已运行3')
|
|
||||||
# 封装功能刀具数据
|
# 封装功能刀具数据
|
||||||
desc_2 = {
|
desc_2 = {
|
||||||
'barcode_id': stock_lot.id,
|
'barcode_id': stock_lot.id,
|
||||||
@@ -323,10 +320,8 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
|||||||
'applicable_range': None,
|
'applicable_range': None,
|
||||||
'image': None,
|
'image': None,
|
||||||
}
|
}
|
||||||
print('已运行4')
|
|
||||||
# 创建功能刀具列表、功能刀具预警、功能刀具实时分布、功能刀具出入库记录
|
# 创建功能刀具列表、功能刀具预警、功能刀具实时分布、功能刀具出入库记录
|
||||||
record_1 = self.env['sf.functional.cutting.tool.entity'].create(desc_2)
|
record_1 = self.env['sf.functional.cutting.tool.entity'].create(desc_2)
|
||||||
print('已运行5')
|
|
||||||
self.env['sf.functional.tool.warning'].create({
|
self.env['sf.functional.tool.warning'].create({
|
||||||
'functional_cutting_tool_id': record_1.id,
|
'functional_cutting_tool_id': record_1.id,
|
||||||
'functional_tool_assembly_id': functional_tool_assembly.id,
|
'functional_tool_assembly_id': functional_tool_assembly.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user