1、新增夹具物料基本参数模型,重构工厂的夹具型号模型,重新优化夹具物料form视图;2、优化刀具标准库模型,优化切削速度模型,优化每齿走刀量模型,新增切削宽度和深度模型,新增坡铣角度模型;3、优化功能刀具安全库存最低安全库存可以高于最高库存的bug;
This commit is contained in:
@@ -293,14 +293,28 @@ class CuttingSpeed(models.Model):
|
||||
|
||||
product_template_id = fields.Many2one('product.template')
|
||||
standard_library_id = fields.Many2one('sf.cutting_tool.standard.library', string='标准库')
|
||||
|
||||
execution_standard_id = fields.Many2one('sf.international.standards', string='执行标准', store=True)
|
||||
material_code = fields.Char('材料代号')
|
||||
material_name_id = fields.Many2one('sf.materials.model', '材料名称',
|
||||
domain="[('standards_id', '=', execution_standard_id)]")
|
||||
material_grade = fields.Char('材料牌号')
|
||||
tensile_strength = fields.Char('拉伸强度 (N/mm²)')
|
||||
hardness = fields.Integer('硬度(hrc)')
|
||||
ability_feature_library = fields.Many2one('maintenance.equipment.image', '加工方式',
|
||||
domain="[('type', '=', '加工能力')]")
|
||||
cutting_width_depth_id = fields.Many2one('sf.cutting.width.depth', '切削宽度和深度')
|
||||
process_capability = fields.Selection([('粗加工', '粗加工'), ('精加工', '精加工')], string='粗/精加工')
|
||||
cutting_speed = fields.Char('切削速度', required=True)
|
||||
cutting_speed_max = fields.Float('最大值')
|
||||
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('坡铣角度(°)')
|
||||
material_grade = fields.Char('材料牌号')
|
||||
tensile_strength = fields.Char('拉伸强度 (N/mm²)')
|
||||
hardness = fields.Integer('硬度(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')
|
||||
@@ -308,7 +322,8 @@ class CuttingSpeed(models.Model):
|
||||
cutting_speed_n5 = fields.Char('径向切宽 ae=5%D1 ap=L1max 切削速度Vc')
|
||||
rough_machining = fields.Char('粗加工 Vc(m/min)')
|
||||
precision_machining = fields.Char('精加工 Vc(m/min)')
|
||||
application = fields.Selection([('主应用', '主应用'), ('次应用', '次应用')], '主/次应用')
|
||||
|
||||
# ======================================
|
||||
|
||||
def _json_cutting_speed(self, obj):
|
||||
cutting_speed_str = (0, '', {
|
||||
@@ -334,15 +349,20 @@ class CuttingSpeed(models.Model):
|
||||
class FeedPerTooth(models.Model):
|
||||
_name = 'sf.feed.per.tooth'
|
||||
_description = '每齿走刀量fz'
|
||||
_order = 'machining_method desc, blade_diameter, materials_type_id'
|
||||
_order = 'blade_diameter,cutting_width_depth_id,materials_type_id'
|
||||
|
||||
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)
|
||||
|
||||
# =============待删除字段===========
|
||||
cutting_speed = fields.Char('径向切宽 ae(mm)')
|
||||
machining_method = fields.Selection([('直铣', '直铣'), ('坡铣', '坡铣')], string='加工方式')
|
||||
materials_type_id = fields.Many2one('sf.materials.model', string='材料型号')
|
||||
blade_diameter = fields.Integer('刃部直径(mm)', readonly=True)
|
||||
feed_per_tooth = fields.Char('每齿走刀量 (mm/z)')
|
||||
|
||||
# ================================
|
||||
|
||||
def _json_feed_per_tooth(self, obj):
|
||||
feed_per_tooth_str = (0, '', {
|
||||
@@ -382,3 +402,19 @@ class FeedPerTooth(models.Model):
|
||||
# def _compute_product_template_id(self):
|
||||
# if self.product_template_id is not None:
|
||||
# self.blade_diameter = self.product_template_id.cutting_tool_blade_diameter
|
||||
|
||||
|
||||
class CuttingWidthDepth(models.Model):
|
||||
_name = 'sf.cutting.width.depth'
|
||||
_description = '切削宽度和深度'
|
||||
|
||||
name = fields.Char('名称')
|
||||
|
||||
|
||||
class RampingAngle(models.Model):
|
||||
_name = 'sf.ramping.angle'
|
||||
_description = '坡铣角度'
|
||||
|
||||
standard_library_id = fields.Many2one('sf.cutting_tool.standard.library', '刀具标准库')
|
||||
|
||||
name = fields.Char('坡铣角度')
|
||||
|
||||
Reference in New Issue
Block a user