Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/新增机台日计划,工件预调(前置三元检测),NC程序下载接口

# Conflicts:
#	sf_manufacturing/controllers/controllers.py
This commit is contained in:
jinling.yang
2024-01-22 15:35:13 +08:00
32 changed files with 940 additions and 306 deletions

View File

@@ -450,10 +450,10 @@ class MrpProduction(models.Model):
for route in routingworkcenter:
if route.routing_type == '后置三元质量检测':
workorders_values.append(
self.env['mrp.workorder'].json_workorder_str1(k, production, route)
)
# if route.routing_type == '后置三元质量检测':
# workorders_values.append(
# self.env['mrp.workorder'].json_workorder_str1(k, production, route)
# )
if route.routing_type == 'CNC加工':
workorders_values.append(
self.env['mrp.workorder'].json_workorder_str1(k, production, route))

View File

@@ -11,7 +11,7 @@ class ResMrpRoutingWorkcenter(models.Model):
('装夹预调', '装夹预调'),
# ('前置三元定位检测', '前置三元定位检测'),
('CNC加工', 'CNC加工'),
('后置三元质量检测', '后置三元质量检测'),
# ('后置三元质量检测', '后置三元质量检测'),
('解除装夹', '解除装夹'),
('切割', '切割'),
('表面工艺', '表面工艺')

View File

@@ -35,7 +35,7 @@ class ResMrpWorkOrder(models.Model):
('装夹预调', '装夹预调'),
# ('前置三元定位检测', '前置三元定位检测'),
('CNC加工', 'CNC加工'),
('后置三元质量检测', '后置三元质量检测'),
# ('后置三元质量检测', '后置三元质量检测'),
('解除装夹', '解除装夹'),
('切割', '切割'), ('表面工艺', '表面工艺')
], string="工序类型")
@@ -216,9 +216,9 @@ class ResMrpWorkOrder(models.Model):
elif route.routing_type == 'CNC加工':
duration_expected = self.env['mrp.routing.workcenter'].sudo().search(
[('name', '=', 'CNC加工')]).time_cycle
elif route.routing_type == '后置三元质量检测':
duration_expected = self.env['mrp.routing.workcenter'].sudo().search(
[('name', '=', '后置三元质量检测')]).time_cycle
# elif route.routing_type == '后置三元质量检测':
# duration_expected = self.env['mrp.routing.workcenter'].sudo().search(
# [('name', '=', '后置三元质量检测')]).time_cycle
elif route.routing_type == '解除装夹':
duration_expected = self.env['mrp.routing.workcenter'].sudo().search(
[('name', '=', '解除装夹')]).time_cycle
@@ -597,6 +597,7 @@ class CNCprocessing(models.Model):
cnc_id = fields.Many2one('ir.attachment')
sequence_number = fields.Char('序号')
program_name = fields.Char('程序名')
functional_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型')
cutting_tool_name = fields.Char('刀具名称')
cutting_tool_no = fields.Char('刀号')
processing_type = fields.Char('加工类型')

View File

@@ -870,21 +870,9 @@ class SfMaintenanceEquipmentTool(models.Model):
_description = '机床刀位'
equipment_id = fields.Many2one('maintenance.equipment', string='设备')
product_template_id = fields.Many2one('product.template', string='功能刀具名称',
domain="[('categ_type', '=', '刀具')]")
image_1920 = fields.Binary('图片', related='product_template_id.image_1920')
categ_type = fields.Char(string='功能刀具类型')
diameter = fields.Char('直径')
precision = fields.Char('\\')
tool_code = fields.Char('功能刀具编码')
hilt_name = fields.Char('刀柄名称')
hilt_code = fields.Char('刀柄编码')
life_value_max = fields.Char('最大寿命值')
alarm_value = fields.Char('报警值')
used_value = fields.Char('已使用值')
code = fields.Char('机床刀位号')
name = fields.Char('', compute='_compute_name')
code = fields.Char('机床刀位号')
name = fields.Char('刀位号', compute='_compute_name')
@api.depends('code')
def _compute_name(self):