1.新增每日同步切削速度和每齿走刀量及切削宽度和深度的接口
2.优化产品模版
This commit is contained in:
@@ -106,10 +106,8 @@ class CuttingToolModel(models.Model):
|
||||
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_3 = fields.One2many('sf.feed.per.tooth', 'standard_library_id', '每齿走刀量fz',
|
||||
domain=[('cutting_speed', '!=', False)])
|
||||
feed_per_tooth_ids = fields.One2many('sf.feed.per.tooth', 'standard_library_id', '每齿走刀量fz')
|
||||
feed_per_tooth_ids_3 = fields.One2many('sf.feed.per.tooth', 'standard_library_id', '每齿走刀量fz')
|
||||
|
||||
material_model_id = fields.Many2one('sf.materials.model', '材料型号')
|
||||
# 适用夹头型号可以多选
|
||||
@@ -156,12 +154,6 @@ class CuttingToolModel(models.Model):
|
||||
active = fields.Boolean('有效', default=True)
|
||||
is_cloud = fields.Boolean('云端数据', default=False)
|
||||
|
||||
# 无用字段
|
||||
feed_per_tooth_ids_2 = fields.One2many('sf.feed.per.tooth', 'standard_library_id', '每齿走刀量fz',
|
||||
domain=[('machining_method', '!=', False)])
|
||||
feed_per_tooth_ids_4 = fields.One2many('sf.feed.per.tooth', 'standard_library_id', '每齿走刀量fz',
|
||||
domain=[('machining_method', '!=', False)])
|
||||
|
||||
def _get_ids(self, cutting_tool_type_code, factory_short_name):
|
||||
cutting_tool_type_ids = []
|
||||
for item in cutting_tool_type_code:
|
||||
|
||||
@@ -41,6 +41,7 @@ class ToolMaterialsBasicParameters(models.Model):
|
||||
install_aperture_diameter = fields.Float('安装孔直径(mm)')
|
||||
chip_breaker_groove = fields.Selection([('无', '无'), ('单面', '单面'), ('双面', '双面')],
|
||||
string='有无断屑槽')
|
||||
chip_breaker_type_code = fields.Char('断屑槽型代号')
|
||||
blade_teeth_model = fields.Selection(
|
||||
[('无', '无'), ('V牙型', 'V牙型'), ('米制全牙型', '米制全牙型'), ('美制全牙型', '美制全牙型'),
|
||||
('惠氏全牙型', '惠氏全牙型'), ('BSPT全牙型', 'BSPT全牙型'), ('NPT全牙型', 'NPT全牙型'),
|
||||
@@ -107,6 +108,7 @@ class ToolMaterialsBasicParameters(models.Model):
|
||||
max_rotate_speed = fields.Integer('最大转速(n/min)')
|
||||
diameter_slip_accuracy = fields.Char('径跳精度(mm)', size=20)
|
||||
cooling_model = fields.Char('冷却类型', size=20)
|
||||
taper_shank_model = fields.Char('锥柄型号')
|
||||
is_rough_machining = fields.Boolean('可粗加工', default=False)
|
||||
is_finish_machining = fields.Boolean('可精加工', default=False)
|
||||
is_quick_cutting = fields.Boolean('可高速切削', default=False)
|
||||
@@ -136,169 +138,12 @@ class ToolMaterialsBasicParameters(models.Model):
|
||||
)
|
||||
active = fields.Boolean(string='有效', default=True)
|
||||
|
||||
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_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'
|
||||
|
||||
name = fields.Char('名称')
|
||||
product_template_id = fields.Many2one('product.template')
|
||||
standard_library_id = fields.Many2one('sf.cutting_tool.standard.library', string='标准库')
|
||||
|
||||
@@ -318,40 +163,7 @@ class CuttingSpeed(models.Model):
|
||||
cutting_speed_min = fields.Float('最小值')
|
||||
|
||||
application = fields.Selection([('主应用', '主应用'), ('次应用', '次应用')], '主/次应用')
|
||||
|
||||
# ===============待删除字段==============
|
||||
material_id = fields.Many2one('sf.materials.model', '材料名称',
|
||||
domain="[('standards_id', '=', execution_standard_id)]")
|
||||
slope_milling_angle = fields.Integer('坡铣角度(°)')
|
||||
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)')
|
||||
|
||||
# ======================================
|
||||
|
||||
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
|
||||
active = fields.Boolean(string='有效', default=True)
|
||||
|
||||
|
||||
class FeedPerTooth(models.Model):
|
||||
@@ -359,52 +171,16 @@ class FeedPerTooth(models.Model):
|
||||
_description = '每齿走刀量fz'
|
||||
_order = 'blade_diameter,cutting_width_depth_id,materials_type_id'
|
||||
|
||||
name = fields.Char('名称')
|
||||
product_template_id = fields.Many2one('product.template')
|
||||
standard_library_id = fields.Many2one('sf.cutting_tool.standard.library', string='标准库')
|
||||
blade_diameter = fields.Integer('刃部直径(mm)', readonly=True)
|
||||
materials_type_id = fields.Many2one('sf.materials.model', string='材料名称', readonly=True)
|
||||
cutting_width_depth_id = fields.Many2one('sf.cutting.width.depth', '切削宽度和深度', readonly=True)
|
||||
feed_per_tooth = fields.Char('每齿走刀量 (mm/z)', size=20)
|
||||
active = fields.Boolean(string='有效', default=True)
|
||||
|
||||
# =============待删除字段===========
|
||||
cutting_speed = fields.Char('径向切宽 ae(mm)')
|
||||
machining_method = fields.Selection([('直铣', '直铣'), ('坡铣', '坡铣')], string='加工方式')
|
||||
|
||||
# ================================
|
||||
|
||||
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):
|
||||
|
||||
@@ -379,7 +379,6 @@
|
||||
<field name="cutting_width_depth_id"/>
|
||||
<field name="process_capability"/>
|
||||
<field name="cutting_speed"/>
|
||||
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<field name="inherit_id" ref="sf_sale.view_product_template_form_inherit_sf"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="invoice_policy" position="after">
|
||||
<field name='categ_id' attrs="{'readonly': [('categ_id', '!=', False)]}"/>
|
||||
<field name='categ_id' attrs="{'readonly': [('id', '!=', False)]}"/>
|
||||
<field name='is_bfm' invisible="1"/>
|
||||
<field name='categ_type' invisible="1"/>
|
||||
<field name="upload_model_file"
|
||||
@@ -18,32 +18,29 @@
|
||||
<field name='cutting_tool_type' invisible="1"/>
|
||||
<field name="fixture_material_type" invisible="1"/>
|
||||
<field name="embryo_model_type_id" string="模型类型"
|
||||
attrs="{'invisible': ['|',('categ_type', '!=', '坯料'),('categ_type', '=', False)],'readonly': [('categ_id', '!=', False)]}"/>
|
||||
attrs="{'invisible': ['|',('categ_type', '!=', '坯料'),('categ_type', '=', False)],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="materials_id" string="材料" placeholder="请选择"
|
||||
attrs="{'invisible': [('categ_type', 'not in', ['成品','坯料', '原材料'])],'readonly': [('categ_id', '!=', False)]}"/>
|
||||
attrs="{'invisible': [('categ_type', 'not in', ['成品','坯料', '原材料'])],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="materials_type_id" string="型号" placeholder="请选择"
|
||||
domain="[('materials_id', '=', materials_id)]"
|
||||
attrs="{'invisible': [('categ_type', 'not in', ['成品','坯料', '原材料'])],'readonly': [('categ_id', '!=', False)]}"/>
|
||||
attrs="{'invisible': [('categ_type', 'not in', ['成品','坯料', '原材料'])],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="server_product_process_parameters_id" string="表面工艺参数"
|
||||
options="{'no_create': True}"
|
||||
attrs="{'invisible': ['|',('categ_type', '!=', '表面工艺'),('categ_type', '=', False)]}"/>
|
||||
<field name="cutting_tool_material_id"
|
||||
attrs="{'invisible': [('categ_type', '!=', '刀具')],'readonly': [('categ_type', '!=', False)]}"
|
||||
attrs="{'invisible': [('categ_type', '!=', '刀具')],'readonly': [('id', '!=', False)]}"
|
||||
placeholder="请选择"/>
|
||||
<field name="cutting_tool_model_id" placeholder="请选择"
|
||||
attrs="{'invisible': [('categ_type', '!=', '刀具')],'readonly': [('categ_type', '!=', False)]}"
|
||||
attrs="{'invisible': [('categ_type', '!=', '刀具')],'readonly': [('id', '!=', False)]}"
|
||||
domain="[('cutting_tool_material_id','=',cutting_tool_material_id)]"/>
|
||||
<field name="specification_id" placeholder="请选择"
|
||||
attrs="{'invisible': [('categ_type', '!=', '刀具')],'readonly': [('categ_type', '!=', False)]}"
|
||||
attrs="{'invisible': [('categ_type', '!=', '刀具')],'readonly': [('id', '!=', False)]}"
|
||||
domain="[('standard_library_id','=',cutting_tool_model_id)]"/>
|
||||
<field name="fixture_material_id" attrs="{'invisible': [('categ_type', '!=', '夹具')]}"
|
||||
placeholder="请选择"/>
|
||||
<field name="fixture_model_id" string="型号" placeholder="请选择"
|
||||
attrs="{'invisible': [('categ_type', '!=', '夹具')]}"
|
||||
domain="[('fixture_material_id','=',fixture_material_id)]"/>
|
||||
<field name="name" position="attributes">
|
||||
<attribute name="attrs">{'readonly': [('create_uid', '!=', False)]}</attribute>
|
||||
</field>
|
||||
</field>
|
||||
|
||||
<xpath expr="//label[@for='volume']" position="before">
|
||||
@@ -103,99 +100,95 @@
|
||||
</field>
|
||||
<xpath expr="//page[@name='variants']" position="before">
|
||||
<page string="刀具物料参数"
|
||||
attrs="{'invisible': [('categ_type', '!=', '刀具')],'readonly': [('categ_type', '=', '刀具')]}">
|
||||
attrs="{'invisible': [('categ_type', '!=', '刀具')],'readonly': [('id', '!=', False)]}">
|
||||
<group>
|
||||
<group attrs="{'invisible': [('categ_type', '!=', '刀具')]}" col="1">
|
||||
<field name="cutting_tool_type_id" options="{'no_create': True}"
|
||||
placeholder="请选择" attrs="{'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
placeholder="请选择" attrs="{'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="brand_id" options="{'no_create': True}" placeholder="请选择"
|
||||
attrs="{'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_total_length"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀杆','刀盘','夹头','刀柄'))],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀杆','刀盘','夹头','刀柄'))],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="tool_hardness" string="硬度(hrc)"
|
||||
attrs="{'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'readonly': [('id', '!=', False)]}"/>
|
||||
<label for="cutting_tool_run_out_accuracy_min" string="端跳精度"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('id', '!=', False)]}"/>
|
||||
<div class="o_address_format"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('categ_type', '=', '刀具')]}">
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('id', '!=', False)]}">
|
||||
<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','!=','整体式刀具')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type','!=','整体式刀具')],'readonly': [('id', '!=', False)]}"/>
|
||||
<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','!=','整体式刀具')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type','!=','整体式刀具')],'readonly': [('id', '!=', False)]}"/>
|
||||
<span>(mm)&nbsp;</span>
|
||||
</div>
|
||||
|
||||
<field name="tool_width"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="tool_height"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_flange_diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_flange_length"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
<field name="cutting_tool_shank_outer_diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
<field name="cutting_tool_shank_inner_diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_blade_diameter" string="刃部直径(mm)" class="diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_blade_length"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_blade_width"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_blade_depth"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_blade_helix_angle"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_blade_number" placeholder="请选择"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_blade_tip_working_size"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_blade_tip_diameter" string="刀尖直径(mm)" class="diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_blade_tip_taper" string="刀尖锥度(°)"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('id', '!=', False)]}"/>
|
||||
<!--刀片-->
|
||||
<label for="tool_length" string="尺寸(mm)"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('id', '!=', False)]}"/>
|
||||
<div class="test_model"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('categ_type', '=', '刀具')]}">
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('id', '!=', False)]}">
|
||||
<label for="tool_length" string="长"/>
|
||||
<field name="tool_length" class="o_address_zip"
|
||||
options="{'format': false}"
|
||||
attrs="{'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'readonly': [('id', '!=', False)]}"/>
|
||||
<label for="tool_thickness" string="厚"/>
|
||||
<field name="tool_thickness" class="o_address_zip"
|
||||
options="{'format': false}"
|
||||
attrs="{'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
<label for="tool_width" string="宽"/>
|
||||
<field name="tool_width" class="o_address_zip"
|
||||
options="{'format': false}"
|
||||
attrs="{'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'readonly': [('id', '!=', False)]}"/>
|
||||
</div>
|
||||
<field name="cutting_tool_cut_blade_length"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_blade_tip_circular_arc_radius"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_blade_tip_height_tolerance"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_inscribed_circle_diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_inscribed_circle_tolerance"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_install_aperture_diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_chip_breaker_groove"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_chip_breaker_type_code"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_cut_depth_max"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_blade_blade_number" string="刃数"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_blade_width" string="刃宽"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('id', '!=', False)]}"/>
|
||||
<!--刀杆-->
|
||||
|
||||
<label for="cutting_tool_knife_head_length" string="刀头尺寸(mm)"
|
||||
@@ -205,43 +198,39 @@
|
||||
<label for="cutting_tool_knife_head_length" string="长"/>
|
||||
<field name="cutting_tool_knife_head_length" class="o_address_zip"
|
||||
options="{'format': false}"
|
||||
attrs="{'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'readonly': [('id', '!=', False)]}"/>
|
||||
<label for="cutting_tool_knife_head_width" string="宽"/>
|
||||
<field name="cutting_tool_knife_head_width" class="o_address_zip"
|
||||
options="{'format': false}"
|
||||
attrs="{'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'readonly': [('id', '!=', False)]}"/>
|
||||
<label for="cutting_tool_knife_head_height" string="高"/>
|
||||
<field name="cutting_tool_knife_head_height" class="o_address_zip"
|
||||
options="{'format': false}"
|
||||
attrs="{'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'readonly': [('id', '!=', False)]}"/>
|
||||
</div>
|
||||
<field name="cutting_tool_blade_diameter" string="刃部直径(mm)" class="diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))],'readonly': [('id', '!=', False)]}"/>
|
||||
|
||||
<field name="cutting_tool_blade_length"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀盘')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀盘')],'readonly': [('id', '!=', False)]}"/>
|
||||
|
||||
<field name="cutting_tool_cutter_arbor_diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_cut_blade_length" string="切削刃长度(mm)"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_cut_depth_max"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_min_machining_aperture"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_install_blade_tip_num"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')],'readonly': [('id', '!=', False)]}"/>
|
||||
<!--刀盘-->
|
||||
<field name="cutting_tool_cutter_head_diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀盘')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀盘')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_interface_diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀盘')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀盘')],'readonly': [('id', '!=', False)]}"/>
|
||||
|
||||
<!--夹头-->
|
||||
<field name="cutting_tool_clamping_length"
|
||||
attrs='{"invisible": [("cutting_tool_type","!=","夹头")]}'/>
|
||||
<field name="cutting_tool_clamping_tolerance"
|
||||
attrs='{"invisible": [("cutting_tool_type","!=","夹头")]}'/>
|
||||
<label for="cutting_tool_clamping_diameter_min" string="夹持直径"
|
||||
attrs='{"invisible": [("cutting_tool_type","not in",("夹头","刀柄"))]}'/>
|
||||
<div class="o_address_format"
|
||||
@@ -249,200 +238,197 @@
|
||||
<label for="cutting_tool_clamping_diameter_min" string="最小"/>
|
||||
<field name="cutting_tool_clamping_diameter_min" class="o_address_zip diameter"
|
||||
options="{'format': false}"
|
||||
attrs="{'required': [('cutting_tool_type','not in',('夹头','刀柄'))],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'required': [('cutting_tool_type','not in',('夹头','刀柄'))],'readonly': [('id', '!=', False)]}"/>
|
||||
<span>(mm)&nbsp;</span>
|
||||
<label for="cutting_tool_clamping_diameter_max" string="最大"/>
|
||||
<field name="cutting_tool_clamping_diameter_max" class="o_address_zip diameter"
|
||||
options="{'format': false}"
|
||||
attrs="{'required': [('cutting_tool_type','not in',('夹头','刀柄'))],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'required': [('cutting_tool_type','not in',('夹头','刀柄'))],'readonly': [('id', '!=', False)]}"/>
|
||||
<span>(mm)&nbsp;</span>
|
||||
</div>
|
||||
<field name="cutting_tool_clamping_way"
|
||||
attrs="{'invisible': [('cutting_tool_type','not in',('刀柄','夹头'))],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type','not in',('刀柄','夹头'))],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_top_diameter" class="diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type','not in',('夹头'))],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type','not in',('夹头'))],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_outer_diameter" class="diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type','not in',('夹头'))],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type','not in',('夹头'))],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_inner_diameter" class="diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type','not in',('夹头'))],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type','not in',('夹头'))],'readonly': [('id', '!=', False)]}"/>
|
||||
<!--夹头-->
|
||||
|
||||
<field name="cutting_tool_standard_speed"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
<field name="cutting_tool_speed_max"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_change_time"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_cooling_type"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'readonly': [('id', '!=', False)]}"/>
|
||||
</group>
|
||||
<group attrs="{'invisible': [('categ_type', '!=', '刀具')],'readonly': [('categ_type', '=', '刀具')]}">
|
||||
<group attrs="{'invisible': [('categ_type', '!=', '刀具')],'readonly': [('id', '!=', False)]}">
|
||||
<field name="materials_type_id" options="{'no_create': True}" placeholder="请选择"
|
||||
string="材质" attrs="{'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
<field name="coating_material" attrs="{'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
string="材质" attrs="{'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="coating_material" attrs="{'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_blade_type"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_coarse_medium_fine" string="粗/中/精" placeholder="请选择"
|
||||
attrs="{'required': [('cutting_tool_type','=','整体式刀具')],'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'required': [('cutting_tool_type','=','整体式刀具')],'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))],'readonly': [('id', '!=', False)]}"/>
|
||||
<!--整体式刀具-->
|
||||
<field name="cutting_tool_shank_diameter" string="柄部直径(mm)" class="diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_shank_length"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_neck_diameter" string="颈部直径(mm)" class="diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_neck_length" string="颈部长度(mm)"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
<field name="cutting_tool_cut_depth"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_cut_depth_max"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_pitch"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="tool_weight"
|
||||
attrs='{"invisible": [("cutting_tool_type","not in",("夹头","刀柄"))],"readonly": [("categ_type", "=", "刀具")]}'/>
|
||||
attrs='{"invisible": [("cutting_tool_type","not in",("夹头","刀柄"))],"readonly": [("id", "!=", False)]}'/>
|
||||
<field name="cutting_tool_taper"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('夹头','刀柄'))],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('夹头','刀柄'))],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_taper_shank_model"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_dynamic_balance_class"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_jump_accuracy"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_rear_angle"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片'))],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片'))],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_main_included_angle"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片','刀杆'))],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片','刀杆','刀盘'))],'readonly': [('id', '!=', False)]}"/>
|
||||
<!-- <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', ('刀片'))],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
<field name="cutting_tool_blade_tip_dip_angle"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
<field name="cutting_tool_side_cutting_edge_angle"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀片'))],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_pitch"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_bladed_teeth_model"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_thickness_tolerance"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_thread_model"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_thread_num"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_cutter_bar_ids" widget="many2many_tags"
|
||||
options="{'no_create': True}"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_cutter_pad_ids" widget="many2many_tags"
|
||||
options="{'no_create': True}"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('id', '!=', False)]}"/>
|
||||
<!--刀柄-->
|
||||
<field name="cutting_tool_is_rough_finish"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
<field name="cutting_tool_is_finish"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
<field name="cutting_tool_is_drill_hole"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
<field name="cutting_tool_is_high_speed_cutting"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_is_safety_lock" string="有无安全锁"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
|
||||
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'readonly': [('id', '!=', False)]}"/>
|
||||
<!--夹头-->
|
||||
<field name="cutting_tool_jump_accuracy" string="跳动精度(mm)"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_max_load_capacity"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_er_size_model"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_handle_ids" widget="many2many_tags"
|
||||
options="{'no_create': True}"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cooling_suit_type_ids"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')],'readonly': [('id', '!=', False)]}"/>
|
||||
<!-- 刀杆 -->
|
||||
<field name="cutting_tool_rear_angle"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_installing_structure"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_is_cooling_hole"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_locating_slot_code"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_blade_ids" widget="many2many_tags"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_tool_shim"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_cotter_pin"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_pressing_plate"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_screw"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀柄'))],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆'))],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_fit_nut_model"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_wrench"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀柄'))],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀柄'))],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_chuck_ids" widget="many2many_tags"
|
||||
options="{'no_create': True}"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_fit_chuck_size"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'readonly': [('id', '!=', False)]}"/>
|
||||
<!-- 刀盘 -->
|
||||
<field name="cutting_tool_blade_ids" widget="many2many_tags"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀盘')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
<field name="cutting_tool_blade_ids" widget="many2many_tags"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀盘')],'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
<field name="cutting_tool_screw"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀盘')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_wrench"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀盘')],'readonly': [('id', '!=', False)]}"/>
|
||||
|
||||
</group>
|
||||
</group>
|
||||
<group string="适配刀片形状"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'in', ('刀柄','夹头','整体式刀具',False))]}">
|
||||
<field name="fit_blade_shape_id" string="" widget="many2one_radio"
|
||||
attrs="{'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'readonly': [('id', '!=', False)]}"/>
|
||||
</group>
|
||||
<group string="适合加工方式"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀杆','刀盘','刀片'))]}">
|
||||
<field name="suitable_machining_method_ids" string=""
|
||||
attrs="{'readonly': [('categ_type', '=', '刀具')]}"
|
||||
attrs="{'readonly': [('id', '!=', False)]}"
|
||||
widget="custom_many2many_checkboxes"/>
|
||||
</group>
|
||||
<group string="刀尖特征"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀杆','刀盘','刀片'))]}">
|
||||
<field name="blade_tip_characteristics_id" string=""
|
||||
attrs="{'readonly': [('categ_type', '=', '刀具')]}"
|
||||
attrs="{'readonly': [('id', '!=', False)]}"
|
||||
widget="many2one_radio"/>
|
||||
</group>
|
||||
<group attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀杆','刀盘','刀片'))]}">
|
||||
<group string="柄部类型"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}">
|
||||
<field name="handle_type_id" string="" widget="many2one_radio"
|
||||
attrs="{'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'readonly': [('id', '!=', False)]}"/>
|
||||
</group>
|
||||
<group string="压紧方式"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))]}">
|
||||
<field name="compaction_way_id" string="" widget="many2one_radio"
|
||||
attrs="{'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'readonly': [('id', '!=', False)]}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀杆','刀盘','刀片'))]}">
|
||||
<group string="走刀方向">
|
||||
<field name="cutting_direction_ids" string="" widget="custom_many2many_checkboxes"
|
||||
attrs="{'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'readonly': [('id', '!=', False)]}"/>
|
||||
</group>
|
||||
<group string="适合冷却液">
|
||||
<field name="suitable_coolant_ids" string="" widget="custom_many2many_checkboxes"
|
||||
attrs="{'readonly': [('categ_type', '=', '刀具')]}"/>
|
||||
attrs="{'readonly': [('id', '!=', False)]}"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="切削速度Vc"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))]}">
|
||||
<field name="cutting_speed_ids" string="" widget="one2many"
|
||||
attrs="{'readonly': [('categ_type', '=', '刀具')]}">
|
||||
attrs="{'readonly': [('id', '!=', False)]}">
|
||||
<tree editable="bottom">
|
||||
<!-- <field name="order"/>-->
|
||||
<field name="execution_standard_id"/>
|
||||
<field name="material_code"/>
|
||||
<field name="material_id"/>
|
||||
<!-- <field name="material_id"/>-->
|
||||
<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="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>
|
||||
@@ -450,14 +436,11 @@
|
||||
<page string="每齿走刀量fz"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('整体式刀具','刀片'))],'readonly': [('categ_type', '=', '刀具')]}">
|
||||
<field name="feed_per_tooth_ids" string="" widget="one2many"
|
||||
attrs="{'readonly': [('categ_type', '=', '刀具')]}">
|
||||
attrs="{'readonly': [('id', '!=', False)]}">
|
||||
<tree editable="bottom">
|
||||
<field name="cutting_speed"
|
||||
attrs="{'readonly': [('materials_type_id','!=',False)]}"/>
|
||||
<field name="machining_method" placeholder="请选择"
|
||||
attrs="{'readonly': [('cutting_speed','!=',False)]}"/>
|
||||
<field name="materials_type_id" placeholder="请选择"
|
||||
attrs="{'readonly': [('cutting_speed','!=',False)]}"/>
|
||||
<!-- <field name="cutting_speed"-->
|
||||
<!-- attrs="{'readonly': [('materials_type_id','!=',False)]}"/>-->
|
||||
<field name="materials_type_id" placeholder="请选择"/>
|
||||
<field name="blade_diameter"/>
|
||||
<field name="feed_per_tooth"/>
|
||||
</tree>
|
||||
|
||||
@@ -6,6 +6,8 @@ import os
|
||||
from odoo import models, fields, api, _
|
||||
from odoo.exceptions import ValidationError
|
||||
from odoo.modules import get_resource_path
|
||||
|
||||
|
||||
# from OCC.Extend.DataExchange import read_step_file
|
||||
# from OCC.Extend.DataExchange import write_stl_file
|
||||
|
||||
@@ -228,7 +230,7 @@ class ResProductMo(models.Model):
|
||||
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_chip_breaker_type_code = self.specification_id.chip_breaker_type_code
|
||||
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
|
||||
@@ -257,7 +259,7 @@ class ResProductMo(models.Model):
|
||||
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_chip_breaker_type_code = self.specification_id.chip_breaker_type_code
|
||||
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
|
||||
@@ -274,15 +276,15 @@ class ResProductMo(models.Model):
|
||||
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.max_rotate_speed
|
||||
self.cutting_tool_change_time = self.specification_id.tool_changing_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.cutting_tool_flange_diameter = self.specification_id.flange_diameter
|
||||
self.cutting_tool_fit_chuck_size = self.specification_id.fit_chuck_size
|
||||
self.cutting_tool_dynamic_balance_class = self.specification_id.dynamic_balance_class
|
||||
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)]
|
||||
@@ -384,6 +386,7 @@ class ResProductMo(models.Model):
|
||||
cutting_tool_install_aperture_diameter = fields.Float('安装孔直径(mm)')
|
||||
cutting_tool_chip_breaker_groove = fields.Selection([('无', '无'), ('单面', '单面'), ('双面', '双面')],
|
||||
string='有无断屑槽')
|
||||
cutting_tool_chip_breaker_type_code = fields.Char('断屑槽型代号')
|
||||
cutting_tool_bladed_teeth_model = fields.Selection(
|
||||
[('无', '无'), ('V牙型', 'V牙型'), ('米制全牙型', '米制全牙型'), ('美制全牙型', '美制全牙型'),
|
||||
('惠氏全牙型', '惠氏全牙型'), ('BSPT全牙型', 'BSPT全牙型'), ('NPT全牙型', 'NPT全牙型'),
|
||||
@@ -395,8 +398,6 @@ class ResProductMo(models.Model):
|
||||
('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.Float('每英寸螺纹数(tpi)')
|
||||
@@ -451,24 +452,23 @@ class ResProductMo(models.Model):
|
||||
cutting_tool_interface_diameter = fields.Float('接口直径(mm)')
|
||||
|
||||
# 刀柄参数
|
||||
cutting_tool_shank_outer_diameter = fields.Float('柄部外径(mm)')
|
||||
cutting_tool_shank_inner_diameter = fields.Float('柄部内径(mm)')
|
||||
cutting_tool_clamping_length = fields.Float('夹持长度(mm)')
|
||||
cutting_tool_clamping_tolerance = fields.Float('夹持公差(mm)')
|
||||
cutting_tool_clamping_diameter_max = fields.Float('最大夹持直径')
|
||||
cutting_tool_clamping_diameter_min = fields.Float('最小夹持直径')
|
||||
cutting_tool_flange_length = fields.Float('法兰柄长(mm)')
|
||||
cutting_tool_flange_diameter = fields.Float('法兰直径(mm)')
|
||||
cutting_tool_is_rough_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_safety_lock = fields.Boolean('有无安全锁', default=False)
|
||||
cutting_tool_is_high_speed_cutting = fields.Boolean('可高速切削', default=False)
|
||||
cutting_tool_change_time = fields.Integer('换刀时间(s)')
|
||||
cutting_tool_clamping_way = fields.Char('夹持方式')
|
||||
cutting_tool_fit_chuck_size = fields.Char('适配夹头尺寸')
|
||||
cutting_tool_taper_shank_model = fields.Char('锥柄型号')
|
||||
cutting_tool_standard_speed = fields.Integer('标准转速(n/min)')
|
||||
cutting_tool_speed_max = fields.Integer('最大转速(n/min)')
|
||||
cutting_tool_cooling_type = fields.Char('冷却类型')
|
||||
cutting_tool_dynamic_balance_class = fields.Char('动平衡等级')
|
||||
cutting_tool_fit_nut_model = fields.Char('适用锁紧螺母型号')
|
||||
|
||||
|
||||
# 夹头参数
|
||||
cutting_tool_taper = fields.Integer('锥度(°)')
|
||||
cutting_tool_top_diameter = fields.Float('顶部直径')
|
||||
@@ -476,7 +476,7 @@ class ResProductMo(models.Model):
|
||||
cutting_tool_inner_diameter = fields.Float('内径(mm)')
|
||||
cooling_suit_type_ids = fields.Char('适用冷却套型号')
|
||||
cutting_tool_max_load_capacity = fields.Float('最大负载能力(kg)')
|
||||
cutting_tool_er_size_model = fields.Char('ER尺寸型号')
|
||||
cutting_tool_er_size_model = fields.Char('尺寸型号')
|
||||
cutting_tool_handle_ids = fields.Many2many(
|
||||
'sf.cutting_tool.standard.library',
|
||||
relation='product_cutting_tool_library_chuck_handle_rel',
|
||||
|
||||
@@ -67,6 +67,13 @@ class ResConfigSettings(models.TransientModel):
|
||||
_logger.info("同步刀具标准库完成")
|
||||
self.env['sf.tool.materials.basic.parameters'].sync_all_cutting_tool_basic_parameters()
|
||||
_logger.info("同步刀具物料基本参数完成")
|
||||
self.env['sf.cutting.width.depth'].sync_all_cutting_width_depth()
|
||||
_logger.info("同步刀具物料切削宽度和深度完成")
|
||||
self.env['sf.cutting.speed'].sync_all_cutting_speed()
|
||||
_logger.info("同步刀具物料切削速度完成")
|
||||
self.env['sf.feed.per.tooth'].sync_all_feed_per_tooth()
|
||||
_logger.info("同步刀具物料每齿走刀量完成")
|
||||
|
||||
except Exception as e:
|
||||
_logger.info("捕获错误信息:%s" % e)
|
||||
raise ValidationError("数据错误导致同步失败,请联系管理员")
|
||||
|
||||
@@ -64,6 +64,12 @@ class MrStaticResourceDataSync(models.Model):
|
||||
logging.info("刀具标准库已每日同步成功")
|
||||
self.env['sf.tool.materials.basic.parameters'].sync_cutting_tool_basic_parameters_yesterday()
|
||||
_logger.info("同步刀具物料基本参数完成")
|
||||
self.env['sf.cutting.width.depth'].sync_cutting_width_depth_yesterday()
|
||||
_logger.info("同步刀具物料切削宽度和深度完成")
|
||||
self.env['sf.cutting.speed'].sync_cutting_speed_yesterday()
|
||||
_logger.info("同步刀具物料切削速度完成")
|
||||
self.env['sf.feed.per.tooth'].sync_feed_per_tooth_yesterday()
|
||||
_logger.info("同步刀具物料每齿走刀量完成")
|
||||
except Exception as e:
|
||||
logging.info("捕获错误信息:%s" % e)
|
||||
raise ValidationError("数据错误导致同步失败,请联系管理员")
|
||||
@@ -1907,6 +1913,242 @@ class ModelInternationalStandards(models.Model):
|
||||
raise ValidationError("制造标准认证未通过")
|
||||
|
||||
|
||||
class CuttingSpeed(models.Model):
|
||||
_inherit = 'sf.cutting.speed'
|
||||
_description = '切削速度'
|
||||
url = '/api/cutting_speed/list'
|
||||
|
||||
def sync_cutting_speed_yesterday(self):
|
||||
config = self.env['res.config.settings'].get_values()
|
||||
headers = Common.get_headers(self, config['token'], config['sf_secret_key'])
|
||||
strUrl = config['sf_url'] + self.url
|
||||
r = requests.post(strUrl, json={}, data=None, headers=headers)
|
||||
r = r.json()
|
||||
result = json.loads(r['result'])
|
||||
if result['status'] == 1:
|
||||
for item in result['cutting_speed_yesterday_list']:
|
||||
cutting_speed = self.search([("name", '=', item['name'])])
|
||||
if not cutting_speed:
|
||||
self.create({
|
||||
'name': item['name'],
|
||||
'standard_library_id': self.env['sf.cutting_tool.standard.library'].search(
|
||||
[('code', '=', item['standard_library_code'].replace("JKM", result[
|
||||
'factory_short_name']))]).id,
|
||||
'execution_standard_id': self.env['sf.international.standards'].search(
|
||||
[('code', '=', item['execution_standard_code'])]).id,
|
||||
'material_name_id': self.env['sf.materials.model'].search(
|
||||
[('materials_no', '=', item['material_name'])]).id,
|
||||
'cutting_width_depth_id': self.env['sf.cutting.width.depth'].search(
|
||||
[('name', '=', item['cutting_width_depth'])]).id,
|
||||
'ability_feature_library': self.env['maintenance.equipment.image'].search(
|
||||
[('name', '=', item['ability_feature_library']), ('type', '=', '加工能力')]).id,
|
||||
'material_code': item['material_code'],
|
||||
'material_grade': item['material_grade'],
|
||||
'tensile_strength': item['tensile_strength'],
|
||||
'hardness': item['hardness'],
|
||||
'cutting_speed': item['cutting_speed'],
|
||||
'application': item['application'],
|
||||
'active': item['active'],
|
||||
})
|
||||
else:
|
||||
if item['active'] is False:
|
||||
item.write({'active': False})
|
||||
else:
|
||||
self.write({
|
||||
'execution_standard_id': self.env['sf.international.standards'].search(
|
||||
[('code', '=', item['execution_standard_code'])]).id,
|
||||
'material_name_id': self.env['sf.materials.model'].search(
|
||||
[('materials_no', '=', item['material_name'])]).id,
|
||||
'cutting_width_depth_id': self.env['sf.cutting.width.depth'].search(
|
||||
[('name', '=', item['cutting_width_depth'])]).id,
|
||||
'ability_feature_library': self.env['maintenance.equipment.image'].search(
|
||||
[('name', '=', item['ability_feature_library']), ('type', '=', '加工能力')]).id,
|
||||
'material_code': item['material_code'],
|
||||
'material_grade': item['material_grade'],
|
||||
'tensile_strength': item['tensile_strength'],
|
||||
'hardness': item['hardness'],
|
||||
'cutting_speed': item['cutting_speed'],
|
||||
'application': item['application'], })
|
||||
else:
|
||||
raise ValidationError("切削速度认证未通过")
|
||||
|
||||
def sync_all_cutting_speed(self):
|
||||
config = self.env['res.config.settings'].get_values()
|
||||
headers = Common.get_headers(self, config['token'], config['sf_secret_key'])
|
||||
strUrl = config['sf_url'] + self.url
|
||||
r = requests.post(strUrl, json={}, data=None, headers=headers)
|
||||
r = r.json()
|
||||
result = json.loads(r['result'])
|
||||
if result['status'] == 1:
|
||||
for item in result['cutting_speed_all_list']:
|
||||
cutting_speed = self.search([("name", '=', item['name'])])
|
||||
if not cutting_speed:
|
||||
self.create({
|
||||
'name': item['name'],
|
||||
'standard_library_id': self.env['sf.cutting_tool.standard.library'].search(
|
||||
[('code', '=', item['standard_library_code'].replace("JKM", result[
|
||||
'factory_short_name']))]).id,
|
||||
'execution_standard_id': self.env['sf.international.standards'].search(
|
||||
[('code', '=', item['execution_standard_code'])]).id,
|
||||
'material_name_id': self.env['sf.materials.model'].search(
|
||||
[('materials_no', '=', item['material_name'])]).id,
|
||||
'cutting_width_depth_id': self.env['sf.cutting.width.depth'].search(
|
||||
[('name', '=', item['cutting_width_depth'])]).id,
|
||||
'ability_feature_library': self.env['maintenance.equipment.image'].search(
|
||||
[('name', '=', item['ability_feature_library']), ('type', '=', '加工能力')]).id,
|
||||
'material_code': item['material_code'],
|
||||
'material_grade': item['material_grade'],
|
||||
'tensile_strength': item['tensile_strength'],
|
||||
'hardness': item['hardness'],
|
||||
'cutting_speed': item['cutting_speed'],
|
||||
'application': item['application'],
|
||||
'active': item['active'],
|
||||
})
|
||||
else:
|
||||
if item['active'] is False:
|
||||
item.write({'active': False})
|
||||
else:
|
||||
self.write({
|
||||
'execution_standard_id': self.env['sf.international.standards'].search(
|
||||
[('code', '=', item['execution_standard_code'])]).id,
|
||||
'material_name_id': self.env['sf.materials.model'].search(
|
||||
[('materials_no', '=', item['material_name'])]).id,
|
||||
'cutting_width_depth_id': self.env['sf.cutting.width.depth'].search(
|
||||
[('name', '=', item['cutting_width_depth'])]).id,
|
||||
'ability_feature_library': self.env['maintenance.equipment.image'].search(
|
||||
[('name', '=', item['ability_feature_library']), ('type', '=', '加工能力')]).id,
|
||||
'material_code': item['material_code'],
|
||||
'material_grade': item['material_grade'],
|
||||
'tensile_strength': item['tensile_strength'],
|
||||
'hardness': item['hardness'],
|
||||
'cutting_speed': item['cutting_speed'],
|
||||
'application': item['application'], })
|
||||
else:
|
||||
raise ValidationError("切削速度认证未通过")
|
||||
|
||||
|
||||
class CuttingWidthDepth(models.Model):
|
||||
_inherit = 'sf.cutting.width.depth'
|
||||
_description = '切削宽度和深度'
|
||||
url = '/api/cutting_width_depth/list'
|
||||
|
||||
def sync_cutting_width_depth_yesterday(self):
|
||||
config = self.env['res.config.settings'].get_values()
|
||||
headers = Common.get_headers(self, config['token'], config['sf_secret_key'])
|
||||
strUrl = config['sf_url'] + self.url
|
||||
r = requests.post(strUrl, json={}, data=None, headers=headers)
|
||||
r = r.json()
|
||||
result = json.loads(r['result'])
|
||||
if result['status'] == 1:
|
||||
for item in result['cutting_width_depth_yesterday_list']:
|
||||
cutting_width_depth = self.search([("name", '=', item['name'])])
|
||||
if not cutting_width_depth:
|
||||
self.create({
|
||||
'name': item['name'],
|
||||
})
|
||||
else:
|
||||
raise ValidationError("切削宽度和深度认证未通过")
|
||||
|
||||
def sync_all_cutting_width_depth(self):
|
||||
config = self.env['res.config.settings'].get_values()
|
||||
headers = Common.get_headers(self, config['token'], config['sf_secret_key'])
|
||||
strUrl = config['sf_url'] + self.url
|
||||
r = requests.post(strUrl, json={}, data=None, headers=headers)
|
||||
r = r.json()
|
||||
result = json.loads(r['result'])
|
||||
if result['status'] == 1:
|
||||
for item in result['cutting_width_depth_all_list']:
|
||||
cutting_width_depth = self.search([("name", '=', item['name'])])
|
||||
if not cutting_width_depth:
|
||||
self.create({
|
||||
'name': item['name'],
|
||||
})
|
||||
else:
|
||||
raise ValidationError("切削宽度和深度认证未通过")
|
||||
|
||||
|
||||
class CuttingSpeed(models.Model):
|
||||
_inherit = 'sf.feed.per.tooth'
|
||||
_description = '每齿走刀量'
|
||||
url = '/api/feed_per_tooth/list'
|
||||
|
||||
def sync_feed_per_tooth_yesterday(self):
|
||||
config = self.env['res.config.settings'].get_values()
|
||||
headers = Common.get_headers(self, config['token'], config['sf_secret_key'])
|
||||
strUrl = config['sf_url'] + self.url
|
||||
r = requests.post(strUrl, json={}, data=None, headers=headers)
|
||||
r = r.json()
|
||||
result = json.loads(r['result'])
|
||||
if result['status'] == 1:
|
||||
for item in result['feed_per_tooth_yesterday_list']:
|
||||
feed_per_tooth = self.search([("name", '=', item['name'])])
|
||||
if not feed_per_tooth:
|
||||
self.create({
|
||||
'name': item['name'],
|
||||
'standard_library_id': self.env['sf.cutting_tool.standard.library'].search(
|
||||
[('code', '=', item['standard_library_code'].replace("JKM", result[
|
||||
'factory_short_name']))]).id,
|
||||
'materials_type_id': self.env['sf.materials.model'].search(
|
||||
[('materials_no', '=', item['materials_type_code'])]).id,
|
||||
'cutting_width_depth_id': self.env['sf.cutting.width.depth'].search(
|
||||
[('name', '=', item['cutting_width_depth'])]).id,
|
||||
'blade_diameter': item['blade_diameter'],
|
||||
'feed_per_tooth': item['feed_per_tooth'],
|
||||
'active': item['active'],
|
||||
})
|
||||
else:
|
||||
if item['active'] is False:
|
||||
item.write({'active': False})
|
||||
else:
|
||||
self.write({
|
||||
'materials_type_id': self.env['sf.materials.model'].search(
|
||||
[('materials_no', '=', item['materials_type_code'])]).id,
|
||||
'cutting_width_depth_id': self.env['sf.cutting.width.depth'].search(
|
||||
[('name', '=', item['cutting_width_depth'])]).id,
|
||||
'blade_diameter': item['blade_diameter'],
|
||||
'feed_per_tooth': item['feed_per_tooth'], })
|
||||
else:
|
||||
raise ValidationError("每齿走刀量认证未通过")
|
||||
|
||||
def sync_all_feed_per_tooth(self):
|
||||
config = self.env['res.config.settings'].get_values()
|
||||
headers = Common.get_headers(self, config['token'], config['sf_secret_key'])
|
||||
strUrl = config['sf_url'] + self.url
|
||||
r = requests.post(strUrl, json={}, data=None, headers=headers)
|
||||
r = r.json()
|
||||
result = json.loads(r['result'])
|
||||
if result['status'] == 1:
|
||||
for item in result['feed_per_tooth_all_list']:
|
||||
feed_per_tooth = self.search([("name", '=', item['name'])])
|
||||
if not feed_per_tooth:
|
||||
self.create({
|
||||
'name': item['name'],
|
||||
'standard_library_id': self.env['sf.cutting_tool.standard.library'].search(
|
||||
[('code', '=', item['standard_library_code'].replace("JKM", result[
|
||||
'factory_short_name']))]).id,
|
||||
'materials_type_id': self.env['sf.materials.model'].search(
|
||||
[('materials_no', '=', item['materials_type_code'])]).id,
|
||||
'cutting_width_depth_id': self.env['sf.cutting.width.depth'].search(
|
||||
[('name', '=', item['cutting_width_depth'])]).id,
|
||||
'blade_diameter': item['blade_diameter'],
|
||||
'feed_per_tooth': item['feed_per_tooth'],
|
||||
'active': item['active'],
|
||||
})
|
||||
else:
|
||||
if item['active'] is False:
|
||||
item.write({'active': False})
|
||||
else:
|
||||
self.write({
|
||||
'materials_type_id': self.env['sf.materials.model'].search(
|
||||
[('materials_no', '=', item['materials_type_code'])]).id,
|
||||
'cutting_width_depth_id': self.env['sf.cutting.width.depth'].search(
|
||||
[('name', '=', item['cutting_width_depth'])]).id,
|
||||
'blade_diameter': item['blade_diameter'],
|
||||
'feed_per_tooth': item['feed_per_tooth'], })
|
||||
else:
|
||||
raise ValidationError("每齿走刀量认证未通过")
|
||||
|
||||
|
||||
class Cutting_tool_standard_library(models.Model):
|
||||
_inherit = 'sf.cutting_tool.standard.library'
|
||||
_description = '刀具标准库'
|
||||
@@ -2197,6 +2439,7 @@ class CuttingToolBasicParameters(models.Model):
|
||||
'install_aperture_diameter': blade_item['diameter_mounting_hole'],
|
||||
'pitch': blade_item['pitch'],
|
||||
'chip_breaker_groove': blade_item['is_chip_breaker'],
|
||||
'chip_breaker_type_code': blade_item['chip_breaker_type_code'],
|
||||
'blade_teeth_model': '无' if not blade_item['blade_profile'] else blade_item[
|
||||
'blade_profile'],
|
||||
'blade_blade_number': blade_item['blade_number'],
|
||||
@@ -2216,7 +2459,6 @@ class CuttingToolBasicParameters(models.Model):
|
||||
'name': integral_tool_item['name'],
|
||||
'length': blade_item['length'],
|
||||
'thickness': blade_item['thickness'],
|
||||
'width': blade_item['width'],
|
||||
'cutting_blade_length': blade_item['cutting_blade_length'],
|
||||
'relief_angle': blade_item['relief_angle'],
|
||||
'blade_tip_circular_arc_radius': blade_item['radius_tip_re'],
|
||||
@@ -2224,6 +2466,7 @@ class CuttingToolBasicParameters(models.Model):
|
||||
'install_aperture_diameter': blade_item['diameter_mounting_hole'],
|
||||
'pitch': blade_item['pitch'],
|
||||
'chip_breaker_groove': blade_item['is_chip_breaker'],
|
||||
'chip_breaker_type_code': blade_item['chip_breaker_type_code'],
|
||||
'blade_teeth_model': '无' if not blade_item['blade_profile'] else blade_item[
|
||||
'blade_profile'],
|
||||
'blade_blade_number': blade_item['blade_number'],
|
||||
@@ -2546,6 +2789,7 @@ class CuttingToolBasicParameters(models.Model):
|
||||
'install_aperture_diameter': blade_item['diameter_mounting_hole'],
|
||||
'pitch': blade_item['pitch'],
|
||||
'chip_breaker_groove': blade_item['is_chip_breaker'],
|
||||
'chip_breaker_type_code': blade_item['chip_breaker_type_code'],
|
||||
'blade_teeth_model': '无' if not blade_item['blade_profile'] else blade_item[
|
||||
'blade_profile'],
|
||||
'blade_blade_number': blade_item['blade_number'],
|
||||
@@ -2575,6 +2819,7 @@ class CuttingToolBasicParameters(models.Model):
|
||||
'install_aperture_diameter': blade_item['diameter_mounting_hole'],
|
||||
'pitch': blade_item['pitch'],
|
||||
'chip_breaker_groove': blade_item['is_chip_breaker'],
|
||||
'chip_breaker_type_code': blade_item['chip_breaker_type_code'],
|
||||
'blade_teeth_model': '无' if not blade_item['blade_profile'] else blade_item[
|
||||
'blade_profile'],
|
||||
'blade_blade_number': blade_item['blade_number'],
|
||||
@@ -2587,7 +2832,6 @@ class CuttingToolBasicParameters(models.Model):
|
||||
'blade_tip_height_tolerance': blade_item['tip_height_tolerance'],
|
||||
'inscribed_circle_tolerance': blade_item['internal_circle_tolerance'],
|
||||
'thickness_tolerance': blade_item['thickness_tolerance'],
|
||||
'active': blade_item['active'],
|
||||
})
|
||||
basic_parameters_chuck_list = json.loads(
|
||||
result['cutting_tool_basic_parameters_all_list']['basic_parameters_chuck'])
|
||||
@@ -2634,7 +2878,6 @@ class CuttingToolBasicParameters(models.Model):
|
||||
'weight': chuck_item['weight'],
|
||||
'max_load_capacity': chuck_item['load_capacity_max'],
|
||||
'cooling_jacket': chuck_item['cooling_sleeve_model'],
|
||||
'active': chuck_item['active'],
|
||||
})
|
||||
basic_parameters_cutter_arbor_list = json.loads(
|
||||
result['cutting_tool_basic_parameters_all_list']['basic_parameters_cutter_arbor'])
|
||||
@@ -2705,7 +2948,6 @@ class CuttingToolBasicParameters(models.Model):
|
||||
'pressing_plate': cutter_arbor_item['fit_plate_model'],
|
||||
'screw': cutter_arbor_item['fit_screw_model'],
|
||||
'spanner': cutter_arbor_item['fit_wrench_model'],
|
||||
'active': cutter_arbor_item['active'],
|
||||
})
|
||||
basic_parameters_cutter_head_list = json.loads(
|
||||
result['cutting_tool_basic_parameters_all_list']['basic_parameters_cutter_head'])
|
||||
@@ -2762,7 +3004,6 @@ class CuttingToolBasicParameters(models.Model):
|
||||
'spanner': cutter_head_item['fit_wrench_model'],
|
||||
'is_cooling_hole': cutter_head_item['is_cooling_hole'],
|
||||
'locating_slot_code': cutter_head_item['locator_slot_code'],
|
||||
'active': cutter_head_item['active'],
|
||||
})
|
||||
basic_parameters_knife_handle_list = json.loads(
|
||||
result['cutting_tool_basic_parameters_all_list']['basic_parameters_knife_handle'])
|
||||
|
||||
@@ -150,10 +150,10 @@ class ResPartnerToSale(models.Model):
|
||||
if self.env.user.has_group('sf_base.group_purchase_director'):
|
||||
domain = [('supplier_rank', '>', 0)]
|
||||
elif self.env.user.has_group('sf_base.group_purchase'):
|
||||
customer = self.env['res.partner'].search(
|
||||
[('supplier_rank', '>', 0), ('user_id', '=', self.env.user.id)])
|
||||
if customer:
|
||||
ids = [t.id for t in customer]
|
||||
supplier = self.env['res.partner'].search(
|
||||
[('supplier_rank', '>', 0), ('purchase_user_id', '=', self.env.user.id)])
|
||||
if supplier:
|
||||
ids = [t.id for t in supplier]
|
||||
domain = [('id', 'in', ids)]
|
||||
else:
|
||||
domain = [('id', '=', False)]
|
||||
@@ -191,12 +191,9 @@ class ResUserToSale(models.Model):
|
||||
if self.env.user.has_group('sf_base.group_purchase_director'):
|
||||
domain = [('supplier_rank', '>', 0)]
|
||||
elif self.env.user.has_group('sf_base.group_purchase'):
|
||||
supplier = self.env['res.partner'].search(
|
||||
[('supplier_rank', '>', 0), ('purchase_user_id', '=', self.env.user.id)])
|
||||
if supplier:
|
||||
ids = [t.id for t in supplier]
|
||||
domain = [('id', 'in', ids)]
|
||||
if self.id != self.env.user.id:
|
||||
domain = [('id', '=', self.id)]
|
||||
else:
|
||||
domain = [('id', '=', False)]
|
||||
domain = [('id', '=', self.env.user.id)]
|
||||
return self._search(domain, limit=limit, access_rights_uid=name_get_uid)
|
||||
return super()._name_search(name, args, operator, limit, name_get_uid)
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
</field>
|
||||
<xpath expr="//group[@name='sale']/field[@name='user_id']" position="replace">
|
||||
<field name="user_id" widget="many2one_avatar_user" context="{'is_sale': True }"
|
||||
attrs="{'required' : [('customer_rank','>', 0)]}"/>
|
||||
attrs="{'required' : [('customer_rank','>', 0)],'readonly': [('supplier_rank','>', 0)]}"/>
|
||||
</xpath>
|
||||
<field name="category_id" position="attributes">
|
||||
<attribute name="required">1</attribute>
|
||||
@@ -67,7 +67,7 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_partner_property_form_inherit_sf">
|
||||
<record model="ir.ui.view" id="view_partner_tree_inherit_sf">
|
||||
<field name="name">res.partner.property.form.inherit.sf</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_tree"/>
|
||||
|
||||
Reference in New Issue
Block a user