1、新增夹具物料基本参数模型,重构工厂的夹具型号模型,重新优化夹具物料form视图;2、优化刀具标准库模型,优化切削速度模型,优化每齿走刀量模型,新增切削宽度和深度模型,新增坡铣角度模型;3、优化功能刀具安全库存最低安全库存可以高于最高库存的bug;

This commit is contained in:
yuxianghui
2023-12-28 17:06:34 +08:00
parent 032b13b2ad
commit b2bb2e33de
9 changed files with 412 additions and 177 deletions

View File

@@ -75,6 +75,8 @@ class CuttingToolModel(models.Model):
integral_coarse_medium_fine = fields.Selection([('', ''), ('', ''), ('', '')], '粗/中/精')
integral_run_out_accuracy_max = fields.Char('整体式刀具端跳精度max')
integral_run_out_accuracy_min = fields.Char('整体式刀具端跳精度min')
ramping_angle_ids = fields.One2many('sf.ramping.angle', 'standard_library_id', '坡铣角度',
domain=lambda self: [('standard_library_id', '=', self.id)])
fit_blade_shape_id = fields.Many2one('maintenance.equipment.image',
'适配刀片形状', domain=[('type', '=', '刀片形状')])
@@ -106,12 +108,9 @@ class CuttingToolModel(models.Model):
cutting_speed_ids = fields.One2many('sf.cutting.speed', 'standard_library_id', string='切削速度Vc')
feed_per_tooth_ids = fields.One2many('sf.feed.per.tooth', 'standard_library_id', '每齿走刀量fz',
domain=[('cutting_speed', '!=', False)])
feed_per_tooth_ids_2 = fields.One2many('sf.feed.per.tooth', 'standard_library_id', '每齿走刀量fz',
domain=[('machining_method', '!=', False)])
feed_per_tooth_ids_3 = fields.One2many('sf.feed.per.tooth', 'standard_library_id', '每齿走刀量fz',
domain=[('cutting_speed', '!=', False)])
feed_per_tooth_ids_4 = fields.One2many('sf.feed.per.tooth', 'standard_library_id', '每齿走刀量fz',
domain=[('machining_method', '!=', False)])
material_model_id = fields.Many2one('sf.materials.model', '材料型号')
# 适用夹头型号可以多选
chuck_ids = fields.Many2many(
@@ -157,6 +156,12 @@ 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: