Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/刀具物料与夹具物料的反注册
# Conflicts: # sf_base/views/base_view.xml
This commit is contained in:
@@ -64,7 +64,7 @@ class MachineTool(models.Model):
|
||||
knife_type = fields.Selection(
|
||||
[("BT40", "BT40"), ("BT30", "BT30")],
|
||||
default="", string="刀把类型")
|
||||
number_of_knife_library = fields.Integer('刀库数量')
|
||||
number_of_knife_library = fields.Integer('刀库数量(把)')
|
||||
rotate_speed = fields.Integer('转速')
|
||||
number_of_axles = fields.Selection(
|
||||
[("三轴", "三轴"), ("四轴", "四轴"), ("五轴", "五轴")],
|
||||
@@ -281,7 +281,7 @@ class MachineToolType(models.Model):
|
||||
distance_min = fields.Char('主轴端面至工作台面距离MIN(mm)')
|
||||
distance_max = fields.Char('主轴端面至工作台面距离MIN(mm)')
|
||||
taper = fields.Char('主轴锥度(°)')
|
||||
torque = fields.Char('主轴点击扭矩(n/m)')
|
||||
torque = fields.Char('主轴电机扭矩(n/m)')
|
||||
motor_power = fields.Char('主轴电机功率(kw)')
|
||||
tool_quality_max = fields.Char('刀具最大质量(kg)')
|
||||
tool_long_max = fields.Char('刀具最大长度(mm)')
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from odoo import fields, models, api
|
||||
|
||||
|
||||
# from datetime import datetime
|
||||
# from odoo.exceptions import ValidationError
|
||||
|
||||
@@ -24,59 +22,60 @@ class FunctionalCuttingTool(models.Model):
|
||||
|
||||
code = fields.Char('编码')
|
||||
name = fields.Char('名称')
|
||||
active = fields.Boolean('有效', default=True)
|
||||
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_integral_model_ids = fields.Many2many('sf.cutting.tool.model', 'rel_integral_model_functional_sf',
|
||||
string='整体式刀具型号', domain=
|
||||
[('mrs_cutting_tool_material_name', '=', '整体式刀具')])
|
||||
# 刀片型号
|
||||
mrs_cutting_tool_blade_model_ids = fields.Many2many('sf.cutting.tool.model', 'rel_blade_model_functional_sf',
|
||||
string='刀片型号', domain=
|
||||
[('mrs_cutting_tool_material_name', '=', '刀片')])
|
||||
# 刀杆型号
|
||||
mrs_cutting_tool_cutterbar_model_ids = fields.Many2many('sf.cutting.tool.model',
|
||||
'rel_cutterbar_model_functional_sf',
|
||||
string='刀杆型号', domain=
|
||||
[('mrs_cutting_tool_material_name', '=', '刀杆')])
|
||||
# 刀盘型号
|
||||
mrs_cutting_tool_cutterpad_model_ids = fields.Many2many('sf.cutting.tool.model',
|
||||
'rel_cutterpad_model_functional_sf',
|
||||
string='刀盘型号', domain=
|
||||
[('mrs_cutting_tool_material_name', '=', '刀盘')])
|
||||
# 刀柄型号
|
||||
mrs_cutting_tool_cutterhandle_model_ids = fields.Many2many('sf.cutting.tool.model',
|
||||
'rel_cutterhandle_model_functional_sf',
|
||||
string='刀柄型号',
|
||||
domain=
|
||||
[('mrs_cutting_tool_material_name', '=', '刀柄')])
|
||||
# 夹头型号
|
||||
mrs_cutting_tool_cutterhead_model_ids = fields.Many2many('sf.cutting.tool.model',
|
||||
'rel_cutterhead_model_functional_sf',
|
||||
string='夹头型号', domain=
|
||||
[('mrs_cutting_tool_material_name', '=', '夹头')])
|
||||
|
||||
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)
|
||||
|
||||
def _get_functional_tool_model_ids(self, functional_tool_model_code):
|
||||
functional_tool_model_ids = []
|
||||
for item in functional_tool_model_code:
|
||||
functional_tool_model = self.env['sf.cutting.tool.model'].search([('code', '=', item)])
|
||||
functional_tool_model_ids.append(functional_tool_model.id)
|
||||
return [(6, 0, functional_tool_model_ids)]
|
||||
# # 整体式刀具型号
|
||||
# mrs_cutting_tool_integral_model_ids = fields.Many2many('sf.cutting.tool.model', 'rel_integral_model_functional_sf',
|
||||
# string='整体式刀具型号', domain=
|
||||
# [('cutting_tool_type', '=', '整体式刀具')])
|
||||
# # 刀片型号
|
||||
# mrs_cutting_tool_blade_model_ids = fields.Many2many('sf.cutting.tool.model', 'rel_blade_model_functional_sf',
|
||||
# string='刀片型号', domain=
|
||||
# [('cutting_tool_type', '=', '刀片')])
|
||||
# # 刀杆型号
|
||||
# mrs_cutting_tool_cutterbar_model_ids = fields.Many2many('sf.cutting.tool.model',
|
||||
# 'rel_cutterbar_model_functional_sf',
|
||||
# string='刀杆型号', domain=
|
||||
# [('cutting_tool_type', '=', '刀杆')])
|
||||
# # 刀盘型号
|
||||
# mrs_cutting_tool_cutterpad_model_ids = fields.Many2many('sf.cutting.tool.model',
|
||||
# 'rel_cutterpad_model_functional_sf',
|
||||
# string='刀盘型号', domain=
|
||||
# [('cutting_tool_type', '=', '刀盘')])
|
||||
# # 刀柄型号
|
||||
# mrs_cutting_tool_cutterhandle_model_ids = fields.Many2many('sf.cutting.tool.model',
|
||||
# 'rel_cutterhandle_model_functional_sf',
|
||||
# string='刀柄型号',
|
||||
# domain=
|
||||
# [('cutting_tool_type', '=', '刀柄')])
|
||||
# # 夹头型号
|
||||
# mrs_cutting_tool_cutterhead_model_ids = fields.Many2many('sf.cutting.tool.model',
|
||||
# 'rel_cutterhead_model_functional_sf',
|
||||
# string='夹头型号', domain=
|
||||
# [('cutting_tool_type', '=', '夹头')])
|
||||
#
|
||||
# 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)
|
||||
#
|
||||
# def _get_functional_tool_model_ids(self, functional_tool_model_code):
|
||||
# functional_tool_model_ids = []
|
||||
# for item in functional_tool_model_code:
|
||||
# functional_tool_model = self.env['sf.cutting.tool.model'].search([('code', '=', item)])
|
||||
# functional_tool_model_ids.append(functional_tool_model.id)
|
||||
# return [(6, 0, functional_tool_model_ids)]
|
||||
|
||||
|
||||
# 功能刀具类型
|
||||
@@ -97,217 +96,93 @@ class CuttingToolModel(models.Model):
|
||||
|
||||
name = fields.Char('名称')
|
||||
code = fields.Char('编码')
|
||||
mrs_machine_brand_id = fields.Many2one('sf.machine.brand', '品牌')
|
||||
mrs_materials_model_id = fields.Many2one('sf.materials.model', '材料型号')
|
||||
# 关联刀具物料
|
||||
mrs_cutting_tool_material_id = fields.Many2one('sf.cutting.tool.material', '刀具物料', required=True)
|
||||
cutting_tool_material_type = fields.Char(related='mrs_cutting_tool_material_id.name', string='刀具物料类型',
|
||||
store=True)
|
||||
# 关联刀具物料名称
|
||||
mrs_cutting_tool_material_name = fields.Char(related='mrs_cutting_tool_material_id.name', string='刀具物料名称',
|
||||
store=True)
|
||||
# 关联刀具类型
|
||||
mrs_cutting_tool_type_id = fields.Many2one(
|
||||
'sf.cutting.tool.type', '刀具类型',
|
||||
domain="[('mrs_cutting_tool_material_id.name', '=', mrs_cutting_tool_material_name)]", required=True)
|
||||
|
||||
# 整体式刀具特有字段
|
||||
integral_code = fields.Char('整体式刀具编码')
|
||||
integral_accuracy = fields.Float('精度(μm)')
|
||||
integral_hardness = fields.Float('加工硬度(HRC)')
|
||||
integral_coating_material = fields.Char('涂层材质')
|
||||
integral_total_length = fields.Float('总长度(mm)')
|
||||
integral_shank_length = fields.Float('柄部长度(mm)')
|
||||
integral_blade_length = fields.Float('刃部长度(mm)')
|
||||
integral_diameter = fields.Float('直径(mm)')
|
||||
integral_blade_number = fields.Integer('刃数')
|
||||
integral_front_angle = fields.Float('前角(°)')
|
||||
integral_rear_angle = fields.Float('后角(°)')
|
||||
integral_main_included_angle = fields.Float('主偏角(°)')
|
||||
integral_nut = fields.Float('配对螺母(mm)')
|
||||
integral_scope = fields.Char('适用范围')
|
||||
|
||||
# 刀片特有字段
|
||||
blade_code = fields.Char('刀片编码')
|
||||
blade_coating_material = fields.Char('涂层材质')
|
||||
blade_length = fields.Float('长度L(mm)')
|
||||
blade_width = fields.Float('宽度D(mm)')
|
||||
blade_height = fields.Float('高度T(mm)')
|
||||
blade_top_angle = fields.Float('顶角(°)')
|
||||
blade_front_angle = fields.Float('前角(°)')
|
||||
blade_rear_angle = fields.Float('后角(°)')
|
||||
blade_main_included_angle = fields.Float('主偏角(°)')
|
||||
blade_r_angle = fields.Float('R角(°)')
|
||||
blade_hardness = fields.Char('加工硬度')
|
||||
blade_accuracy = fields.Char('精度等级')
|
||||
blade_radius = fields.Float('刀尖半径(mm)')
|
||||
blade_nut = fields.Float('配对螺母(mm)')
|
||||
mrs_cutting_tool_model_blade_cutter_bar_ids = fields.Many2many(
|
||||
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', '品牌')
|
||||
tool_length = fields.Integer('长度(mm)', size=6)
|
||||
tool_width = fields.Integer('宽度(mm)', size=6)
|
||||
tool_height = fields.Integer('高度(mm)', size=6)
|
||||
tool_thickness = fields.Integer('厚度(mm)', size=6)
|
||||
tool_weight = fields.Float('重量(kg)', size=4)
|
||||
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='sf_cutting_tool_model_blade_cutter_bar_rel',
|
||||
relation='cutting_tool_model_handle_chuck_rel',
|
||||
column1='model_id_1',
|
||||
column2='model_id_2',
|
||||
domain="[('mrs_cutting_tool_material_id.name', '=', '刀杆')]",
|
||||
string='适用刀杆型号',
|
||||
default=lambda self: [], # 使用空列表作为默认值
|
||||
)
|
||||
mrs_cutting_tool_model_blade_cutter_pad_ids = fields.Many2many(
|
||||
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='sf_cutting_tool_model_blade_cutter_pad_rel',
|
||||
relation='cutting_tool_model_blade_cutter_bar_rel',
|
||||
column1='model_id_1',
|
||||
column2='model_id_2',
|
||||
domain="[('mrs_cutting_tool_material_id.name', '=', '刀盘')]",
|
||||
string='适用刀盘型号',
|
||||
default=lambda self: [], # 使用空列表作为默认值
|
||||
domain="[('cutting_tool_type', '=', '刀杆')]",
|
||||
string='适用刀杆型号'
|
||||
)
|
||||
|
||||
# 刀杆特有字段
|
||||
bar_code = fields.Char('刀杆编码')
|
||||
bar_c_diameter = fields.Float('C柄径(mm)')
|
||||
bar_total_length = fields.Float('L总长(mm)')
|
||||
bar_blade_number = fields.Integer('刃数')
|
||||
bar_d_diameter = fields.Float('D刃径(mm)')
|
||||
mrs_cutting_tool_model_bar_blade_ids = fields.Many2many(
|
||||
cutter_pad_ids = fields.Many2many(
|
||||
'sf.cutting.tool.model',
|
||||
relation='sf_cutting_tool_model_bar_blade_rel',
|
||||
relation='cutting_tool_model_blade_cutter_pad_rel',
|
||||
column1='model_id_1',
|
||||
column2='model_id_2',
|
||||
domain="[('mrs_cutting_tool_material_id.name', '=', '刀片')]",
|
||||
string='适用刀片型号',
|
||||
default=lambda self: [], # 使用空列表作为默认值
|
||||
domain="[('cutting_tool_type', '=', '刀盘')]",
|
||||
string='适用刀盘型号' # 使用空列表作为默认值
|
||||
)
|
||||
bar_wrench = fields.Float('配对扳手(mm)')
|
||||
bar_screw = fields.Float('配备螺丝(mm)')
|
||||
bar_radius = fields.Float('刀尖圆角半径')
|
||||
bar_accuracy = fields.Char('精度等级')
|
||||
bar_hardness = fields.Char('硬度(°)')
|
||||
bar_scope = fields.Char('适用范围')
|
||||
|
||||
# 刀盘特有字段
|
||||
pad_code = fields.Char('刀盘编码')
|
||||
pad_c_diameter = fields.Float('C柄径(mm)')
|
||||
pad_total_length = fields.Float('L总长(mm)')
|
||||
pad_blade_number = fields.Integer('刃数')
|
||||
pad_d_diameter = fields.Float('D刃径(mm)')
|
||||
mrs_cutting_tool_model_pad_blade_ids = fields.Many2many(
|
||||
# 刀杆/参数
|
||||
blade_diameter = fields.Float('刃径(mm)')
|
||||
blade_ids = fields.Many2many(
|
||||
'sf.cutting.tool.model',
|
||||
relation='sf_cutting_tool_model_pad_blade_rel',
|
||||
relation='cutting_tool_model_pad_blade_rel',
|
||||
column1='model_id_1',
|
||||
column2='model_id_2',
|
||||
domain="[('mrs_cutting_tool_material_id.name', '=', '刀片')]",
|
||||
string='适用刀片型号',
|
||||
default=lambda self: [], # 使用空列表作为默认值
|
||||
domain="[('cutting_tool_type', '=', '刀片')]",
|
||||
string='适用刀片型号' # 使用空列表作为默认值
|
||||
)
|
||||
pad_wrench = fields.Float('配对扳手(mm)')
|
||||
pad_screw = fields.Float('配备螺丝(mm)')
|
||||
pad_radius = fields.Float('刀尖圆角半径')
|
||||
pad_accuracy = fields.Char('精度等级')
|
||||
pad_hardness = fields.Char('硬度(°)')
|
||||
pad_scope = fields.Char('适用范围')
|
||||
|
||||
# 刀柄特有字段
|
||||
handle_code = fields.Char('刀柄编码')
|
||||
# 柄长L(mm)、法兰柄长L1(mm)、法兰直径D1(mm)
|
||||
handle_length = fields.Float('柄长L(mm)')
|
||||
handle_diameter = fields.Float('直径D(mm)')
|
||||
handle_flange_length = fields.Float('法兰柄长L1(mm)')
|
||||
handle_flange_diameter = fields.Float('法兰直径D1(mm)')
|
||||
# 夹持直径min、夹持直径max、径跳精度、最大转速n/min、3D模型图
|
||||
handle_clamping_diameter_min = fields.Float('夹持直径min')
|
||||
handle_clamping_diameter_max = fields.Float('夹持直径max')
|
||||
handle_jump_accuracy = fields.Float('径跳精度')
|
||||
handle_max_speed = fields.Float('最大转速n/min')
|
||||
handle_weight = fields.Float('重量(kg)')
|
||||
handle_body_accuracy = fields.Float('本体精度(mm)')
|
||||
handle_nut = fields.Float('配对螺母(mm)')
|
||||
mrs_cutting_tool_model_handle_chuck_model_ids = fields.Many2many(
|
||||
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='sf_cutting_tool_model_handle_chuck_rel',
|
||||
relation='cutting_tool_model_chuck_handle_rel',
|
||||
column1='model_id_1',
|
||||
column2='model_id_2',
|
||||
domain="[('mrs_cutting_tool_material_id.name', '=', '夹头')]",
|
||||
string='适用夹头型号',
|
||||
|
||||
domain="[('cutting_tool_type', '=', '刀柄')]",
|
||||
string='适用刀柄型号'
|
||||
)
|
||||
handle_clamping_range = fields.Float('夹持范围(mm)')
|
||||
handle_detection_accuracy = fields.Float('检测精度')
|
||||
handle_detection_hardness = fields.Char('检测硬度')
|
||||
handle_standard_speed = fields.Float('标准转速')
|
||||
active = fields.Boolean('有效', default=True)
|
||||
|
||||
# 夹头特有字段
|
||||
chuck_code = fields.Char('夹头编码')
|
||||
chuck_accuracy = fields.Float('精度(mm)')
|
||||
# 夹持直径min、夹持直径max、3D模型图
|
||||
chuck_clamping_diameter_min = fields.Float('夹持直径min')
|
||||
chuck_clamping_diameter_max = fields.Float('夹持直径max')
|
||||
chuck_diameter = fields.Float('外径(mm)')
|
||||
chuck_inner_diameter = fields.Float('内径(mm)')
|
||||
chuck_height = fields.Float('高度(mm)')
|
||||
chuck_nut = fields.Float('配对螺母(mm)')
|
||||
mrs_cutting_tool_model_chuck_handle_model_ids = fields.Many2many(
|
||||
'sf.cutting.tool.model',
|
||||
relation='sf_cutting_tool_model_chuck_handle_rel',
|
||||
column1='model_id_1',
|
||||
column2='model_id_2',
|
||||
domain="[('mrs_cutting_tool_material_id.name', '=', '刀柄')]",
|
||||
string='适用刀柄型号',
|
||||
default=lambda self: [], # 使用空列表作为默认值
|
||||
)
|
||||
chuck_clamping_range = fields.Float('夹持范围(mm)')
|
||||
chuck_feature = fields.Char('特性')
|
||||
|
||||
image = fields.Binary('图片')
|
||||
three_d_model = fields.Many2one('ir.attachment', '3D模型')
|
||||
|
||||
hide_integral = fields.Boolean(compute='_compute_hide_model_number', default=False, string='隐藏整体式刀具')
|
||||
hide_blade = fields.Boolean(compute='_compute_hide_model_number', default=False, string='隐藏刀片')
|
||||
hide_cutter_bar = fields.Boolean(compute='_compute_hide_model_number', default=False, string='隐藏刀杆')
|
||||
hide_cutter_pad = fields.Boolean(compute='_compute_hide_model_number', default=False, string='隐藏刀盘')
|
||||
hide_handler = fields.Boolean(compute='_compute_hide_model_number', default=False, string='隐藏刀柄')
|
||||
hide_chuck = fields.Boolean(compute='_compute_hide_model_number', default=False, string='隐藏夹头')
|
||||
hide_model = fields.Boolean(compute='_compute_hide_model_number', default=True, string='隐藏型号')
|
||||
image_is_visible = fields.Boolean(compute='_compute_image_is_visible', default=True, string='隐藏图片')
|
||||
active = fields.Boolean(default=True, string='有效')
|
||||
|
||||
@api.depends('mrs_cutting_tool_material_id')
|
||||
def _compute_image_is_visible(self):
|
||||
for record in self:
|
||||
record.image_is_visible = not (record.hide_handler or record.hide_chuck)
|
||||
|
||||
@api.depends('mrs_cutting_tool_material_id')
|
||||
def _compute_hide_model_number(self):
|
||||
"""
|
||||
根据刀具物料类型,显示不同的字段
|
||||
"""
|
||||
for record in self:
|
||||
record.hide_integral = False
|
||||
record.hide_blade = False
|
||||
record.hide_cutter_bar = False
|
||||
record.hide_cutter_pad = False
|
||||
record.hide_handler = False
|
||||
record.hide_chuck = False
|
||||
record.hide_model = True
|
||||
|
||||
if record.mrs_cutting_tool_material_id and record.mrs_cutting_tool_material_id.name == '整体式刀具':
|
||||
record.hide_model = False
|
||||
record.hide_integral = True
|
||||
elif record.mrs_cutting_tool_material_id and record.mrs_cutting_tool_material_id.name == '刀片':
|
||||
record.hide_model = False
|
||||
record.hide_blade = True
|
||||
elif record.mrs_cutting_tool_material_id and record.mrs_cutting_tool_material_id.name == '刀杆':
|
||||
record.hide_model = False
|
||||
record.hide_cutter_bar = True
|
||||
elif record.mrs_cutting_tool_material_id and record.mrs_cutting_tool_material_id.name == '刀盘':
|
||||
record.hide_model = False
|
||||
record.hide_cutter_pad = True
|
||||
elif record.mrs_cutting_tool_material_id and record.mrs_cutting_tool_material_id.name == '刀柄':
|
||||
record.hide_model = False
|
||||
record.hide_handler = True
|
||||
elif record.mrs_cutting_tool_material_id and record.mrs_cutting_tool_material_id.name == '夹头':
|
||||
record.hide_model = False
|
||||
record.hide_chuck = True
|
||||
else:
|
||||
record.hide_model = True
|
||||
# @api.model
|
||||
# def create(self, vals):
|
||||
# if vals.get('name', '/') == '/' or vals.get('name', '/') is False:
|
||||
# vals['name'] = '/'
|
||||
# obj = super(CuttingToolModel, self).create(vals)
|
||||
# return obj
|
||||
|
||||
|
||||
# 刀具类型
|
||||
@@ -318,18 +193,6 @@ class CuttingToolType(models.Model):
|
||||
code = fields.Char('编码')
|
||||
name = fields.Char('名称')
|
||||
# 关联刀具物料
|
||||
mrs_cutting_tool_material_id = fields.Many2one('sf.cutting.tool.material', '刀具物料')
|
||||
# 整体式刀具类型特有字段
|
||||
integral_tool_type_code = fields.Char('整体式刀具类型编码')
|
||||
# 刀片类型特有字段
|
||||
blade_type_code = fields.Char('刀片类型编码')
|
||||
# 刀杆类型特有字段
|
||||
bar_type_code = fields.Char('刀杆类型编码')
|
||||
# 刀盘类型特有字段
|
||||
pad_type_code = fields.Char('刀盘类型编码')
|
||||
# 刀柄类型特有字段
|
||||
handle_type_code = fields.Char('刀柄类型编码')
|
||||
# 夹头类型特有字段
|
||||
chuck_type_code = fields.Char('夹头类型编码')
|
||||
|
||||
cutting_tool_material_id = fields.Many2one('sf.cutting.tool.material', '刀具物料')
|
||||
remark = fields.Char('备注')
|
||||
active = fields.Boolean('有效', default=True)
|
||||
|
||||
@@ -5,4 +5,11 @@
|
||||
margin-left: 20px;
|
||||
margin-right: 0px !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
.o_form_label.o_field_invalid::after {
|
||||
content: '*' !important;
|
||||
color: red !important;
|
||||
padding: 0 4px !important;
|
||||
vertical-align: top !important;
|
||||
font-size: 1.5rem !important;
|
||||
}
|
||||
@@ -11,9 +11,9 @@
|
||||
<field name="name" string="模糊搜索"
|
||||
filter_domain="['|',('name', 'ilike', self),('code', 'ilike', self)]"/>
|
||||
<filter name="filter_active" string="已归档" domain="[('active','=',False)]"/>
|
||||
<!-- <searchpanel>-->
|
||||
<!-- <field name="tag_ids" icon="fa-filter"/>-->
|
||||
<!-- </searchpanel>-->
|
||||
<!-- <searchpanel>-->
|
||||
<!-- <field name="tag_ids" icon="fa-filter"/>-->
|
||||
<!-- </searchpanel>-->
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
@@ -109,7 +109,11 @@
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="name" required="1" string="名称"/>
|
||||
<label for="name"/>
|
||||
<h1>
|
||||
<field name="name" string="设备名称" placeholder="e.g. LED Monitor"/>
|
||||
</h1>
|
||||
<field name="code" force_save="1" readonly="1"/>
|
||||
<field name="brand_id" required="1"
|
||||
domain="[('tag_ids', '=', '机床')]"
|
||||
options="{'no_create': True}"/>
|
||||
@@ -194,7 +198,7 @@
|
||||
</group>
|
||||
<group string="主轴">
|
||||
<field name="taper" required="1"/>
|
||||
<field name="rotate_speed" string="主轴转速(min)" required="1"
|
||||
<field name="rotate_speed" string="主轴转速(r/min)" required="1"
|
||||
options="{'format': false}"/>
|
||||
<field name="heightened_way" required="1"/>
|
||||
<field name="torque" required="1"/>
|
||||
@@ -219,11 +223,11 @@
|
||||
<div class="test_model">
|
||||
<label for="tool_diameter_min" string="最小(min)"/>
|
||||
<field name="tool_diameter_min" class="o_address_zip" required="1"
|
||||
options="{'format': false}"/>
|
||||
options="{'format': false}"/>Φ
|
||||
<span>&nbsp;</span>
|
||||
<label for="tool_diameter_max" string="最大(max)"/>
|
||||
<field name="tool_diameter_max" class="o_address_zip" required="1"
|
||||
options="{'format': false}"/>
|
||||
options="{'format': false}"/>Φ
|
||||
</div>
|
||||
<field name="tool_quality_max" required="1"/>
|
||||
</group>
|
||||
@@ -359,21 +363,38 @@
|
||||
</h1>
|
||||
</div>
|
||||
<group string="基本信息">
|
||||
<!-- <group>-->
|
||||
<!-- <field name="brand_id"-->
|
||||
<!-- required="1"-->
|
||||
<!-- domain="[('tag_ids', '=', '机床')]"-->
|
||||
<!-- options="{'no_create': True}"/>-->
|
||||
<!-- </group>-->
|
||||
<group>
|
||||
<field name="brand_id"
|
||||
required="1"
|
||||
domain="[('tag_ids', '=', '机床')]"
|
||||
options="{'no_create': True}"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="name" required="1"/>
|
||||
<field name="name" required="1" string="设备名称" placeholder="e.g. LED Monitor"/>
|
||||
<field name="type_id" required="1" options="{'no_create': True}"
|
||||
domain="[('brand_id', '=', brand_id)]"
|
||||
attrs="{'invisible': [('brand_id','=',False)]}"/>
|
||||
</group>
|
||||
|
||||
<group>
|
||||
<field name="code" readonly="1" string="行业编码" force_save="1"/>
|
||||
<!-- <div class="oe_title">-->
|
||||
<!-- <label for="name"/>-->
|
||||
<!-- <h1><field name="name" string="设备名称" placeholder="e.g. LED Monitor"/></h1>-->
|
||||
<!-- </div>-->
|
||||
<group string="基本信息">
|
||||
<group>
|
||||
<field name="MTcode" string="编码"/>
|
||||
<field name="brand_id"
|
||||
required="1"
|
||||
domain="[('tag_ids', '=', '机床')]"
|
||||
options="{'no_create': True}"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="type_id" required="1" options="{'no_create': True}"
|
||||
domain="[('brand_id', '=', brand_id)]"
|
||||
attrs="{'invisible': [('brand_id','=',False)]}"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="code" readonly="1" string="行业编码" force_save="1"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
|
||||
@@ -187,7 +187,6 @@
|
||||
<group>
|
||||
<group>
|
||||
<field name="name" string="名称"/>
|
||||
<field name="brand_id" options="{'no_create': True}"/>
|
||||
<field name="fixture_material_id" options="{'no_create': True}"/>
|
||||
<field name="fixture_material_type" invisible="1"/>
|
||||
<field name="multi_mounting_type_id" options="{'no_create': True}"/>
|
||||
@@ -200,9 +199,10 @@
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="参数"
|
||||
attrs='{"invisible": [("fixture_material_type","not in",("气动托盘","转接板(锁板)托盘","磁吸托盘","虎钳托盘","零点卡盘"))]}'>
|
||||
attrs='{"invisible": [("fixture_material_type","not in",("气动夹具","转接板(锁板)夹具","磁吸夹具","虎钳夹具","零点卡盘"))]}'>
|
||||
<group>
|
||||
<group>
|
||||
<field name="brand_id" options="{'no_create': True}"/>
|
||||
<label for="length" string="尺寸(mm)"/>
|
||||
<div class="test_model">
|
||||
<label for="length" string="长"/>
|
||||
@@ -220,16 +220,16 @@
|
||||
<field name="weight"></field>
|
||||
<field name="materials_model_id" options="{'no_create': True}"/>
|
||||
<field name="clamping_way"
|
||||
attrs='{"invisible": [("fixture_material_type","not in",("气动托盘","磁吸托盘","虎钳托盘"))]}'/>
|
||||
attrs='{"invisible": [("fixture_material_type","not in",("气动夹具","磁吸夹具","虎钳夹具"))]}'/>
|
||||
<field name="port_type"
|
||||
attrs='{"invisible": [("fixture_material_type","not in",("气动托盘","磁吸托盘","虎钳托盘"))]}'/>
|
||||
attrs='{"invisible": [("fixture_material_type","not in",("气动夹具","磁吸夹具","虎钳夹具"))]}'/>
|
||||
<field name="through_hole_size"
|
||||
attrs='{"invisible": [("fixture_material_type","!=",("转接板(锁板)托盘"))]}'/>
|
||||
attrs='{"invisible": [("fixture_material_type","!=",("转接板(锁板)夹具"))]}'/>
|
||||
<field name="screw_size"
|
||||
attrs='{"invisible": [("fixture_material_type","!=",("转接板(锁板)托盘"))]}'/>
|
||||
attrs='{"invisible": [("fixture_material_type","!=",("转接板(锁板)夹具"))]}'/>
|
||||
<field name="driving_way"
|
||||
attrs='{"invisible": [("fixture_material_type","not in",("虎钳托盘","零点卡盘"))]}'/>
|
||||
<field name="apply_machine_tool_type_ids" widget="many2many_tags"
|
||||
attrs='{"invisible": [("fixture_material_type","not in",("虎钳夹具","零点卡盘"))]}'/>
|
||||
<field name="apply_machine_tool_type_ids" widget="many2many_tags" options="{'no_create': True}"
|
||||
attrs='{"invisible": [("fixture_material_type","!=",("零点卡盘"))]}'/>
|
||||
</group>
|
||||
<group>
|
||||
@@ -240,20 +240,20 @@
|
||||
<label for="clamp_workpiece_length_max" string="长"/>
|
||||
<field name="clamp_workpiece_length_max" class="o_address_zip"
|
||||
options="{'format': false}"
|
||||
attrs="{'required': [('fixture_material_type', 'in',('气动托盘','转接板(锁板)托盘','磁吸托盘','虎钳托盘'))]}"/>
|
||||
attrs="{'required': [('fixture_material_type', 'in',('气动夹具','转接板(锁板)夹具','磁吸夹具','虎钳夹具'))]}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="clamp_workpiece_width_max" string="宽"/>
|
||||
<field name="clamp_workpiece_width_max" class="o_address_zip"
|
||||
options="{'format': false}"
|
||||
attrs="{'required': [('fixture_material_type', 'in',('气动托盘','转接板(锁板)托盘','磁吸托盘','虎钳托盘'))]}"/>
|
||||
attrs="{'required': [('fixture_material_type', 'in',('气动夹具','转接板(锁板)夹具','磁吸夹具','虎钳夹具'))]}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="clamp_workpiece_height_max" string="高"/>
|
||||
<field name="clamp_workpiece_height_max" class="o_address_zip"
|
||||
options="{'format': false}"
|
||||
attrs="{'required': [('fixture_material_type', 'in',('气动托盘','转接板(锁板)托盘','磁吸托盘','虎钳托盘'))]}"/>
|
||||
attrs="{'required': [('fixture_material_type', 'in',('气动夹具','转接板(锁板)夹具','磁吸夹具','虎钳夹具'))]}"/>
|
||||
</div>
|
||||
<field name="clamp_workpiece_diameter_max" string="夹持工件最大直径(mm)"
|
||||
attrs="{'invisible': [('fixture_material_type','=','零点卡盘')],'required': [('fixture_material_type', 'in',('气动托盘','转接板(锁板)托盘','磁吸托盘','虎钳托盘'))]}"/>
|
||||
attrs="{'invisible': [('fixture_material_type','=','零点卡盘')],'required': [('fixture_material_type', 'in',('气动夹具','转接板(锁板)夹具','磁吸夹具','虎钳夹具'))]}"/>
|
||||
<field name="maximum_carrying_weight"></field>
|
||||
<field name="maximum_clamping_force"></field>
|
||||
</group>
|
||||
|
||||
@@ -58,13 +58,13 @@
|
||||
<field name="code"/>
|
||||
<field name="name" string="名称"/>
|
||||
<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'/>
|
||||
<!-- <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>
|
||||
</field>
|
||||
</record>
|
||||
@@ -85,50 +85,50 @@
|
||||
<field name="mrs_cutting_tool_model_id"
|
||||
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>
|
||||
<field name="image" nolabel="1" widget="image"/>
|
||||
<!-- <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>-->
|
||||
<!-- <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 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>
|
||||
@@ -201,8 +201,7 @@
|
||||
<tree string="刀具型号" edit="0" delete="0" create="0">
|
||||
<field name="code"/>
|
||||
<field name="name" string="名称"/>
|
||||
<field name="mrs_cutting_tool_material_id"/>
|
||||
<field name="image" widget='image'/>
|
||||
<field name="cutting_tool_material_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -220,214 +219,101 @@
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="cutting_tool_material_type" invisible="1"/>
|
||||
<field name="mrs_cutting_tool_material_id"
|
||||
options="{'no_create': True, 'no_quick_create': True}"/>
|
||||
<field name="mrs_machine_brand_id"
|
||||
options="{'no_create': True, 'no_quick_create': True}"/>
|
||||
<field name="mrs_materials_model_id"
|
||||
options="{'no_create': True, 'no_quick_create': True}"/>
|
||||
<field name="mrs_cutting_tool_type_id"
|
||||
<field name="name" string="名称"/>
|
||||
<field name="cutting_tool_material_id"
|
||||
options="{'no_create': True, 'no_quick_create': True}"/>
|
||||
<field name="cutting_tool_type" invisible="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="image" nolabel="1" widget="image"/>
|
||||
</group>
|
||||
<!-- <group>-->
|
||||
<!-- <field name="image" nolabel="1" widget="image"/>-->
|
||||
<!-- </group>-->
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="参数"
|
||||
attrs="{'invisible': [('cutting_tool_material_type', '=', False)]}">
|
||||
attrs="{'invisible': [('cutting_tool_type', '=', False)]}">
|
||||
<group>
|
||||
<!--整体式刀具-->
|
||||
<group>
|
||||
<field name="hide_integral" invisible="1"/>
|
||||
<field name="hide_blade" invisible="1"/>
|
||||
<field name="hide_cutter_bar" invisible="1"/>
|
||||
<field name="hide_cutter_pad" invisible="1"/>
|
||||
<field name="hide_handler" invisible="1"/>
|
||||
<field name="hide_chuck" invisible="1"/>
|
||||
<field name="mrs_cutting_tool_material_name" invisible="1"/>
|
||||
|
||||
<field name="integral_total_length"
|
||||
attrs="{'invisible': [('hide_integral', '=', False)], 'required': [('hide_integral', '!=', False)]}"/>
|
||||
<field name="integral_shank_length"
|
||||
attrs="{'invisible': [('hide_integral', '=', False)], 'required': [('hide_integral', '!=', False)]}"/>
|
||||
<field name="integral_blade_length"
|
||||
attrs="{'invisible': [('hide_integral', '=', False)], 'required': [('hide_integral', '!=', False)]}"/>
|
||||
<field name="integral_diameter"
|
||||
attrs="{'invisible': [('hide_integral', '=', False)], 'required': [('hide_integral', '!=', False)]}"/>
|
||||
<field name="integral_blade_number"
|
||||
attrs="{'invisible': [('hide_integral', '=', False)], 'required': [('hide_integral', '!=', False)]}"/>
|
||||
<field name="integral_accuracy"
|
||||
attrs="{'invisible': [('hide_integral', '=', False)], 'required': [('hide_integral', '!=', False)]}"/>
|
||||
<field name="integral_hardness"
|
||||
attrs="{'invisible': [('hide_integral', '=', False)], 'required': [('hide_integral', '!=', False)]}"/>
|
||||
|
||||
<field name="brand_id"/>
|
||||
<field name="cutting_tool_type_id" />
|
||||
<field name="material_model_id"/>
|
||||
<field name="total_length"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀柄'))]}"/>
|
||||
<field name="shank_length"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<field name="blade_length"
|
||||
attrs="{'invisible': [('hide_blade', '=', False)], 'required': [('hide_blade', '!=', False)]}"/>
|
||||
<field name="blade_width"
|
||||
attrs="{'invisible': [('hide_blade', '=', False)], 'required': [('hide_blade', '!=', False)]}"/>
|
||||
<field name="blade_height"
|
||||
attrs="{'invisible': [('hide_blade', '=', False)], 'required': [('hide_blade', '!=', False)]}"/>
|
||||
<field name="blade_top_angle"
|
||||
attrs="{'invisible': [('hide_blade', '=', False)], 'required': [('hide_blade', '!=', False)]}"/>
|
||||
<field name="blade_front_angle"
|
||||
attrs="{'invisible': [('hide_blade', '=', False)], 'required': [('hide_blade', '!=', False)]}"/>
|
||||
<field name="blade_rear_angle"
|
||||
attrs="{'invisible': [('hide_blade', '=', False)], 'required': [('hide_blade', '!=', False)]}"/>
|
||||
|
||||
<field name="bar_c_diameter"
|
||||
attrs="{'invisible': [('hide_cutter_bar', '=', False)], 'required': [('hide_cutter_bar', '!=', False)]}"/>
|
||||
<field name="bar_total_length"
|
||||
attrs="{'invisible': [('hide_cutter_bar', '=', False)], 'required': [('hide_cutter_bar', '!=', False)]}"/>
|
||||
<field name="bar_blade_number"
|
||||
attrs="{'invisible': [('hide_cutter_bar', '=', False)], 'required': [('hide_cutter_bar', '!=', False)]}"/>
|
||||
<field name="bar_d_diameter"
|
||||
attrs="{'invisible': [('hide_cutter_bar', '=', False)], 'required': [('hide_cutter_bar', '!=', False)]}"/>
|
||||
<field name="bar_wrench"
|
||||
attrs="{'invisible': [('hide_cutter_bar', '=', False)], 'required': [('hide_cutter_bar', '!=', False)]}"/>
|
||||
|
||||
|
||||
<field name="pad_c_diameter"
|
||||
attrs="{'invisible': [('hide_cutter_pad', '=', False)], 'required': [('hide_cutter_pad', '!=', False)]}"/>
|
||||
<field name="pad_total_length"
|
||||
attrs="{'invisible': [('hide_cutter_pad', '=', False)], 'required': [('hide_cutter_pad', '!=', False)]}"/>
|
||||
<field name="pad_blade_number"
|
||||
attrs="{'invisible': [('hide_cutter_pad', '=', False)], 'required': [('hide_cutter_pad', '!=', False)]}"/>
|
||||
<field name="pad_d_diameter"
|
||||
attrs="{'invisible': [('hide_cutter_pad', '=', False)], 'required': [('hide_cutter_pad', '!=', False)]}"/>
|
||||
<field name="pad_wrench"
|
||||
attrs="{'invisible': [('hide_cutter_pad', '=', False)], 'required': [('hide_cutter_pad', '!=', False)]}"/>
|
||||
|
||||
|
||||
<field name="handle_length"
|
||||
attrs="{'invisible': [('hide_handler', '=', False)], 'required': [('hide_handler', '!=', False)]}"/>
|
||||
<field name="handle_flange_length"
|
||||
attrs="{'invisible': [('hide_handler', '=', False)], 'required': [('hide_handler', '!=', False)]}"/>
|
||||
<field name="handle_flange_diameter"
|
||||
attrs="{'invisible': [('hide_handler', '=', False)], 'required': [('hide_handler', '!=', False)]}"/>
|
||||
<field name="handle_weight"
|
||||
attrs="{'invisible': [('hide_handler', '=', False)], 'required': [('hide_handler', '!=', False)]}"/>
|
||||
<field name="handle_body_accuracy"
|
||||
attrs="{'invisible': [('hide_handler', '=', False)], 'required': [('hide_handler', '!=', False)]}"/>
|
||||
<field name="handle_clamping_diameter_min"
|
||||
attrs="{'invisible': [('hide_handler', '=', False)], 'required': [('hide_handler', '!=', False)]}"/>
|
||||
<field name="handle_clamping_diameter_max"
|
||||
attrs="{'invisible': [('hide_handler', '=', False)], 'required': [('hide_handler', '!=', False)]}"/>
|
||||
|
||||
|
||||
<field name="chuck_accuracy"
|
||||
attrs="{'invisible': [('hide_chuck', '=', False)], 'required': [('hide_chuck', '!=', False)]}"/>
|
||||
<field name="chuck_diameter"
|
||||
attrs="{'invisible': [('hide_chuck', '=', False)], 'required': [('hide_chuck', '!=', False)]}"/>
|
||||
<field name="chuck_inner_diameter"
|
||||
attrs="{'invisible': [('hide_chuck', '=', False)], 'required': [('hide_chuck', '!=', False)]}"/>
|
||||
<field name="chuck_height"
|
||||
attrs="{'invisible': [('hide_chuck', '=', False)], 'required': [('hide_chuck', '!=', False)]}"/>
|
||||
|
||||
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<!--刀片-->
|
||||
<label for="tool_length" string="尺寸(mm)"
|
||||
attrs='{"invisible": [("cutting_tool_type","not in",("刀片","刀杆","刀盘"))]}'/>
|
||||
<div class="test_model"
|
||||
attrs='{"invisible": [("cutting_tool_type","not in",("刀片","刀杆","刀盘"))]}'>
|
||||
<label for="tool_length" string="长"/>
|
||||
<field name="tool_length" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
<label for="tool_width" string="宽"/>
|
||||
<field name="tool_width" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
<label for="tool_thickness" string="厚"/>
|
||||
<field name="tool_thickness" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
</div>
|
||||
<field name="diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片','刀杆','刀盘'))]}"/>
|
||||
<field name="blade_diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}"/>
|
||||
<field name="blade_number"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片','刀杆','刀盘'))]}"/>
|
||||
<field name="diameter_max"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
<field name="flange_length"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
<field name="flange_diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
<!--夹头-->
|
||||
<field name="outer_diameter"
|
||||
attrs='{"invisible": [("cutting_tool_type","!=","夹头")]}'/>
|
||||
<field name="inner_diameter"
|
||||
attrs='{"invisible": [("cutting_tool_type","!=","夹头")]}'/>
|
||||
<field name="tool_height"
|
||||
attrs='{"invisible": [("cutting_tool_type","!=","夹头")]}'/>
|
||||
<field name="tool_weight"
|
||||
attrs='{"invisible": [("cutting_tool_type","not in",("夹头","刀柄"))]}'/>
|
||||
<field name="clamping_diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('夹头','刀柄'))]}"/>
|
||||
<field name="cutter_bar_ids" widget="many2many_tags"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片'))]}"/>
|
||||
<field name="cutter_pad_ids" widget="many2many_tags"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片'))]}"/>
|
||||
<field name="blade_ids" widget="many2many_tags"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}"/>
|
||||
<field name="chuck_ids" widget="many2many_tags"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘','刀柄','整体式刀具'))]}"/>
|
||||
<field name="handle_ids" widget="many2many_tags"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('夹头'))]}"/>
|
||||
</group>
|
||||
<group>
|
||||
|
||||
<field name="integral_front_angle"
|
||||
attrs="{'invisible': [('hide_integral', '=', False)], 'required': [('hide_integral', '!=', False)]}"/>
|
||||
<field name="integral_rear_angle"
|
||||
attrs="{'invisible': [('hide_integral', '=', False)], 'required': [('hide_integral', '!=', False)]}"/>
|
||||
<field name="integral_main_included_angle"
|
||||
attrs="{'invisible': [('hide_integral', '=', False)], 'required': [('hide_integral', '!=', False)]}"/>
|
||||
<field name="integral_coating_material"
|
||||
attrs="{'invisible': [('hide_integral', '=', False)], 'required': [('hide_integral', '!=', False)]}"/>
|
||||
<field name="integral_nut"
|
||||
attrs="{'invisible': [('hide_integral', '=', False)], 'required': [('hide_integral', '!=', False)]}"/>
|
||||
<field name="integral_scope"
|
||||
attrs="{'invisible': [('hide_integral', '=', False)], 'required': [('hide_integral', '!=', False)]}"/>
|
||||
|
||||
|
||||
<field name="blade_main_included_angle"
|
||||
attrs="{'invisible': [('hide_blade', '=', False)], 'required': [('hide_blade', '!=', False)]}"/>
|
||||
<field name="blade_r_angle"
|
||||
attrs="{'invisible': [('hide_blade', '=', False)], 'required': [('hide_blade', '!=', False)]}"/>
|
||||
<field name="blade_coating_material"
|
||||
attrs="{'invisible': [('hide_blade', '=', False)], 'required': [('hide_blade', '!=', False)]}"/>
|
||||
<field name="blade_hardness"
|
||||
attrs="{'invisible': [('hide_blade', '=', False)], 'required': [('hide_blade', '!=', False)]}"/>
|
||||
<field name="blade_radius"
|
||||
attrs="{'invisible': [('hide_blade', '=', False)], 'required': [('hide_blade', '!=', False)]}"/>
|
||||
<field name="blade_nut"
|
||||
attrs="{'invisible': [('hide_blade', '=', False)], 'required': [('hide_blade', '!=', False)]}"/>
|
||||
|
||||
|
||||
<field name="bar_screw"
|
||||
attrs="{'invisible': [('hide_cutter_bar', '=', False)], 'required': [('hide_cutter_bar', '!=', False)]}"/>
|
||||
<field name="bar_radius"
|
||||
attrs="{'invisible': [('hide_cutter_bar', '=', False)], 'required': [('hide_cutter_bar', '!=', False)]}"/>
|
||||
<field name="bar_hardness"
|
||||
attrs="{'invisible': [('hide_cutter_bar', '=', False)], 'required': [('hide_cutter_bar', '!=', False)]}"/>
|
||||
<field name="bar_scope"
|
||||
attrs="{'invisible': [('hide_cutter_bar', '=', False)], 'required': [('hide_cutter_bar', '!=', False)]}"/>
|
||||
|
||||
|
||||
<field name="pad_screw"
|
||||
attrs="{'invisible': [('hide_cutter_pad', '=', False)], 'required': [('hide_cutter_pad', '!=', False)]}"/>
|
||||
<field name="pad_radius"
|
||||
attrs="{'invisible': [('hide_cutter_pad', '=', False)], 'required': [('hide_cutter_pad', '!=', False)]}"/>
|
||||
<field name="pad_accuracy"
|
||||
attrs="{'invisible': [('hide_cutter_pad', '=', False)], 'required': [('hide_cutter_pad', '!=', False)]}"/>
|
||||
<field name="pad_hardness"
|
||||
attrs="{'invisible': [('hide_cutter_pad', '=', False)], 'required': [('hide_cutter_pad', '!=', False)]}"/>
|
||||
<field name="pad_scope"
|
||||
attrs="{'invisible': [('hide_cutter_pad', '=', False)], 'required': [('hide_cutter_pad', '!=', False)]}"/>
|
||||
|
||||
|
||||
<field name="handle_nut"
|
||||
attrs="{'invisible': [('hide_handler', '=', False)], 'required': [('hide_handler', '!=', False)]}"/>
|
||||
<field name="handle_clamping_range"
|
||||
attrs="{'invisible': [('hide_handler', '=', False)], 'required': [('hide_handler', '!=', False)]}"/>
|
||||
<field name="handle_detection_accuracy"
|
||||
attrs="{'invisible': [('hide_handler', '=', False)], 'required': [('hide_handler', '!=', False)]}"/>
|
||||
<field name="handle_detection_hardness"
|
||||
attrs="{'invisible': [('hide_handler', '=', False)], 'required': [('hide_handler', '!=', False)]}"/>
|
||||
<field name="handle_standard_speed"
|
||||
attrs="{'invisible': [('hide_handler', '=', False)], 'required': [('hide_handler', '!=', False)]}"/>
|
||||
<field name="handle_jump_accuracy"
|
||||
attrs="{'invisible': [('hide_handler', '=', False)], 'required': [('hide_handler', '!=', False)]}"/>
|
||||
<field name="handle_max_speed"
|
||||
attrs="{'invisible': [('hide_handler', '=', False)], 'required': [('hide_handler', '!=', False)]}"/>
|
||||
|
||||
<field name="chuck_nut"
|
||||
attrs="{'invisible': [('hide_chuck', '=', False)], 'required': [('hide_chuck', '!=', False)]}"/>
|
||||
<field name="chuck_clamping_range"
|
||||
attrs="{'invisible': [('hide_chuck', '=', False)], 'required': [('hide_chuck', '!=', False)]}"/>
|
||||
<field name="chuck_feature"
|
||||
attrs="{'invisible': [('hide_chuck', '=', False)], 'required': [('hide_chuck', '!=', False)]}"/>
|
||||
</group>
|
||||
<group string='其他信息'>
|
||||
<group>
|
||||
<field name="mrs_cutting_tool_model_blade_cutter_bar_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'no_create': True, 'no_quick_create': True}"
|
||||
attrs="{'invisible': [('hide_blade', '=', False)]}"/>
|
||||
<field name="mrs_cutting_tool_model_bar_blade_ids" widget="many2many_tags"
|
||||
options="{'no_create': True, 'no_quick_create': True}"
|
||||
attrs="{'invisible': [('hide_cutter_bar', '=', False)]}"/>
|
||||
<field name="mrs_cutting_tool_model_pad_blade_ids" widget="many2many_tags"
|
||||
options="{'no_create': True, 'no_quick_create': True}"
|
||||
attrs="{'invisible': [('hide_cutter_pad', '=', False)]}"/>
|
||||
<field name="mrs_cutting_tool_model_handle_chuck_model_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'no_create': True, 'no_quick_create': True}"
|
||||
attrs="{'invisible': [('hide_handler', '=', False)]}"/>
|
||||
<field name="mrs_cutting_tool_model_chuck_handle_model_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'no_create': True, 'no_quick_create': True}"
|
||||
attrs="{'invisible': [('hide_chuck', '=', False)]}"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="mrs_cutting_tool_model_blade_cutter_pad_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'no_create': True, 'no_quick_create': True}"
|
||||
attrs="{'invisible': [('hide_blade', '=', False)]}"/>
|
||||
</group>
|
||||
<field name="jump_accuracy"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
<field name="front_angle"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))]}"/>
|
||||
<field name="top_angle"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))]}"/>
|
||||
<field name="rear_angle"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))]}"/>
|
||||
<field name="main_included_angle"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))]}"/>
|
||||
<field name="coating_material"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))]}"/>
|
||||
<field name="accuracy_level"
|
||||
attrs="{'invisible': [('cutting_tool_type', '=', '刀柄')]}"/>
|
||||
<field name="working_hardness"/>
|
||||
<field name="wrench"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('夹头','刀柄','刀杆','刀盘' ))]}"/>
|
||||
<field name="screw"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('夹头','刀柄'))]}"/>
|
||||
<field name="nut"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))]}"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
@@ -447,7 +333,7 @@
|
||||
<field name="code" string="编码搜索" filter_domain="[('code','ilike',self)]"/>
|
||||
<filter name="filter_active" string="已归档" domain="[('active','=',False)]"/>
|
||||
<searchpanel class="account_root">
|
||||
<field name="mrs_cutting_tool_material_id" icon="fa-filter"/>
|
||||
<field name="cutting_tool_material_id" icon="fa-filter"/>
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
@@ -462,7 +348,7 @@
|
||||
<tree string="刀具类型" create="0" edit="0" delete="0">
|
||||
<field name="code"/>
|
||||
<field name="name" string="名称"/>
|
||||
<field name="mrs_cutting_tool_material_id"/>
|
||||
<field name="cutting_tool_material_id"/>
|
||||
<field name="remark"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -497,8 +383,9 @@
|
||||
<search string="刀具类型">
|
||||
<field name="name" string="名称搜索" filter_domain="[('name','ilike',self)]"/>
|
||||
<field name="code" string="编码搜索" filter_domain="[('code','ilike',self)]"/>
|
||||
<filter name="filter_active" string="已归档" domain="[('active','=',False)]"/>
|
||||
<searchpanel class="account_root">
|
||||
<field name="mrs_cutting_tool_material_id" icon="fa-filter"/>
|
||||
<field name="cutting_tool_material_id" icon="fa-filter"/>
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user