73 lines
2.3 KiB
Python
73 lines
2.3 KiB
Python
from odoo import fields, models
|
|
|
|
|
|
class SuitableMachiningMethod(models.Model):
|
|
_name = 'sf.suitable.machining.method'
|
|
_description = '适合加工方式'
|
|
|
|
name = fields.Char('名称')
|
|
image = fields.Image('图片')
|
|
|
|
|
|
class BladeTipCharacteristics(models.Model):
|
|
_name = 'sf.blade.tip.characteristics'
|
|
_description = '刀尖特征'
|
|
|
|
name = fields.Char('名称')
|
|
image = fields.Image('图片')
|
|
|
|
|
|
class HandleType(models.Model):
|
|
_name = 'sf.handle.type'
|
|
_description = '柄部类型'
|
|
|
|
name = fields.Char('名称')
|
|
image = fields.Image('图片')
|
|
|
|
|
|
class CuttingDirection(models.Model):
|
|
_name = 'sf.cutting.direction'
|
|
_description = '走刀方向'
|
|
|
|
name = fields.Char('名称')
|
|
image = fields.Image('图片')
|
|
|
|
|
|
class SuitableCoolant(models.Model):
|
|
_name = 'sf.suitable.coolant'
|
|
_description = '适合冷却液'
|
|
|
|
name = fields.Char('名称')
|
|
image = fields.Image('图片')
|
|
|
|
|
|
class CuttingSpeed(models.Model):
|
|
_name = 'sf.cutting.speed'
|
|
_description = '切削速度Vc'
|
|
|
|
# def _get_order(self):
|
|
# last_tool = self.search([], order='id desc', limit=1)
|
|
# if last_tool:
|
|
# last_order = int(last_tool.order)
|
|
# new_order = last_order + 1
|
|
# else:
|
|
# new_order = '1'
|
|
# return new_order
|
|
#
|
|
# order = fields.Char('序', default=_get_order, readonly=True)
|
|
|
|
execution_standard_id = fields.Char('执行标准')
|
|
material_code = fields.Char('材料代号')
|
|
material_name = fields.Char('材料名称')
|
|
material_grade = fields.Char('材料牌号')
|
|
tensile_strength = fields.Char('拉伸强度 (N/mm²)')
|
|
hardness = fields.Char('硬度(HRC)')
|
|
|
|
cutting_speed_n1 = fields.Char('径向切宽 ae=100%D1 ap=1*D1 切削速度Vc')
|
|
cutting_speed_n2 = fields.Char('径向切宽 ae=50%D1 ap=1.5*D1 切削速度Vc')
|
|
cutting_speed_n3 = fields.Char('径向切宽 ae=25%D1 ap=L1max 切削速度Vc')
|
|
cutting_speed_n4 = fields.Char('径向切宽 ae=15%D1 ap=L1max 切削速度Vc')
|
|
cutting_speed_n5 = fields.Char('径向切宽 ae=5%D1 ap=L1max 切削速度Vc')
|
|
rough_machining = fields.Char('粗加工 Vc(m/min)')
|
|
precision_machining = fields.Char('精加工 Vc(m/min)')
|
|
application = fields.Selection([('主应用', '主应用'), ('次应用', '次应用')], '主/次应用') |