去掉警告

This commit is contained in:
jinling.yang
2023-08-29 10:22:12 +08:00
parent ed96f8dc0e
commit 6e6b0b66d3
8 changed files with 39 additions and 61 deletions

View File

@@ -118,7 +118,7 @@ class MachineTool(models.Model):
supplier_id = fields.Many2one('res.partner', string='制造商',
domain="[('is_vendor', '=', True)]")
registration_date = fields.Date('注册日期')
state_zc = fields.Selection([("已注册", "已注册"), ("未注册", "未注册")], string="注册状态", default='未注册', tracking=True)
state_zc = fields.Selection([("已注册", "已注册"), ("未注册", "未注册")], string="注册状态", default='未注册')
active = fields.Boolean('有效', default=True)
@api.constrains('rotate_speed')

View File

@@ -34,22 +34,22 @@ class FixtureModel(models.Model):
clamping_way = fields.Char(string="装夹方式")
port_type = fields.Char(string="接口类型")
model_file = fields.Binary(string="3D模型图")
length = fields.Char(string="长度[mm]", size=6)
width = fields.Char(string="宽度[mm]", size=6)
height = fields.Char(string="高度[mm]", size=6)
weight = fields.Char(string="重量[kg]", size=4)
clamp_workpiece_length_max = fields.Integer(string="夹持工件长度MAX[mm]", size=6)
clamp_workpiece_width_max = fields.Integer(string="夹持工件宽度MAX[mm]", size=6)
clamp_workpiece_height_max = fields.Integer(string="夹持工件高度MAX[mm]", size=6)
clamp_workpiece_diameter_max = fields.Float(string="夹持工件直径MAX[mm]", size=6)
maximum_carrying_weight = fields.Float(string="最大承载重量[kg]", size=4)
maximum_clamping_force = fields.Integer(string="最大夹持力[n]", size=8)
length = fields.Char(string="长度(mm)")
width = fields.Char(string="宽度(mm)")
height = fields.Char(string="高度(mm)")
weight = fields.Char(string="重量(kg)")
clamp_workpiece_length_max = fields.Integer(string="夹持工件长度max(mm)")
clamp_workpiece_width_max = fields.Integer(string="夹持工件宽度max(mm)")
clamp_workpiece_height_max = fields.Integer(string="夹持工件高度max(mm)")
clamp_workpiece_diameter_max = fields.Float(string="夹持工件直径max(mm)")
maximum_carrying_weight = fields.Float(string="最大承载重量(kg)")
maximum_clamping_force = fields.Integer(string="最大夹持力(n)")
materials_model_id = fields.Many2one('sf.materials.model', string="材料型号")
driving_way = fields.Selection([('气动', '气动'), ('液压', '液压'), ('机械', '机械')], string="驱动方式")
apply_machine_tool_type_ids = fields.Many2many('sf.machine_tool.type', 'rel_fixture_model_machine_tool_type',
string="适用机床型号")
through_hole_size = fields.Integer(string="过孔大小[mm]", size=6)
screw_size = fields.Integer(string="螺牙大小[mm]", size=6)
through_hole_size = fields.Integer(string="过孔大小[mm]")
screw_size = fields.Integer(string="螺牙大小[mm]")
active = fields.Boolean('有效', default=True)
def _get_code(self, fixture_model_type_code):

View File

@@ -36,7 +36,7 @@ class FunctionalFixture(models.Model):
domain=[('fixture_material_type', '=', '磁吸托盘')])
vice_tray_model_ids = fields.Many2many('sf.fixture.model', 'rel_fixture_model_vice_tray', string="虎钳托盘型号",
domain=[('fixture_material_type', '=', '虎钳托盘')])
registration_status = fields.Selection([("已注册", "已注册"), ("未注册", "未注册")], string="注册状态", default='未注册', tracking=True)
registration_status = fields.Selection([("已注册", "已注册"), ("未注册", "未注册")], string="注册状态", default='未注册')
active = fields.Boolean('有效', default=True)
@api.onchange('type_id')

View File

@@ -102,11 +102,11 @@ class CuttingToolModel(models.Model):
cutting_tool_type_id = fields.Many2one('sf.cutting.tool.type', string='刀具类型',
)
brand_id = fields.Many2one('sf.machine.brand', '品牌')
tool_length = fields.Integer('长度(mm)', size=6)
tool_width = fields.Integer('宽度(mm)', size=6)
tool_height = fields.Integer('高度(mm)', size=6)
tool_thickness = fields.Integer('厚度(mm)', size=6)
tool_weight = fields.Float('重量(kg)', size=4)
tool_length = fields.Integer('长度(mm)')
tool_width = fields.Integer('宽度(mm)')
tool_height = fields.Integer('高度(mm)')
tool_thickness = fields.Integer('厚度(mm)')
tool_weight = fields.Float('重量(kg)')
coating_material = fields.Char('涂层材质')
# 整体式刀具参数
total_length = fields.Float('总长度(mm)')

View File

@@ -23,6 +23,7 @@ access_sf_multi_mounting_type,sf_multi_mounting_type,model_sf_multi_mounting_typ
access_sf_fixture_model,sf_fixture_model,model_sf_fixture_model,base.group_user,1,1,1,1
access_sf_functional_fixture_type,sf_functional_fixture_type,model_sf_functional_fixture_type,base.group_user,1,1,1,1
access_sf_functional_fixture,sf_functional_fixture,model_sf_functional_fixture,base.group_user,1,1,1,1
access_sf_sync_common,sf_sync_common,model_sf_sync_common,base.group_user,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
23 access_sf_fixture_model sf_fixture_model model_sf_fixture_model base.group_user 1 1 1 1
24 access_sf_functional_fixture_type sf_functional_fixture_type model_sf_functional_fixture_type base.group_user 1 1 1 1
25 access_sf_functional_fixture sf_functional_fixture model_sf_functional_fixture base.group_user 1 1 1 1
26 access_sf_sync_common sf_sync_common model_sf_sync_common base.group_user 1 1 1 1
27
28
29

View File

@@ -32,14 +32,7 @@ class ProductModelTypeRoutingSort(models.Model):
sequence = fields.Integer('Sequence')
route_workcenter_id = fields.Many2one('mrp.routing.workcenter')
is_repeat = fields.Boolean('重复', related='route_workcenter_id.is_repeat')
routing_type = fields.Selection([
('获取CNC加工程序', '获取CNC加工程序'),
('装夹', '装夹'),
('前置三元定位检测', '前置三元定位检测'),
('CNC加工', 'CNC加工'),
('后置三元质量检测', '后置三元质量检测'),
('解除装夹', '解除装夹'), ('切割', '切割'), ('表面工艺', '表面工艺')
], string="工序类型", related='route_workcenter_id.routing_type')
routing_type = fields.Selection(string="工序类型", related='route_workcenter_id.routing_type')
workcenter_ids = fields.Many2many('mrp.workcenter', required=False, related='route_workcenter_id.workcenter_ids')
product_model_type_id = fields.Many2one('sf.model.type')
@@ -55,14 +48,7 @@ class EmbryoModelTypeRoutingSort(models.Model):
sequence = fields.Integer('Sequence')
route_workcenter_id = fields.Many2one('mrp.routing.workcenter')
is_repeat = fields.Boolean('重复', related='route_workcenter_id.is_repeat')
routing_type = fields.Selection([
('获取CNC加工程序', '获取CNC加工程序'),
('装夹', '装夹'),
('前置三元定位检测', '前置三元定位检测'),
('CNC加工', 'CNC加工'),
('后置三元质量检测', '后置三元质量检测'),
('解除装夹', '解除装夹'), ('切割', '切割'), ('表面工艺', '表面工艺')
], string="工序类型", related='route_workcenter_id.routing_type')
routing_type = fields.Selection(string="工序类型", related='route_workcenter_id.routing_type')
workcenter_ids = fields.Many2many('mrp.workcenter', required=False, related='route_workcenter_id.workcenter_ids')
embryo_model_type_id = fields.Many2one('sf.model.type')
@@ -78,14 +64,7 @@ class SurfaceTechnicsModelTypeRoutingSort(models.Model):
sequence = fields.Integer('Sequence')
route_workcenter_id = fields.Many2one('mrp.routing.workcenter')
is_repeat = fields.Boolean('重复', related='route_workcenter_id.is_repeat')
routing_type = fields.Selection([
('获取CNC加工程序', '获取CNC加工程序'),
('装夹', '装夹'),
('前置三元定位检测', '前置三元定位检测'),
('CNC加工', 'CNC加工'),
('后置三元质量检测', '后置三元质量检测'),
('解除装夹', '解除装夹'), ('切割', '切割'), ('表面工艺', '表面工艺')
], string="工序类型", related='route_workcenter_id.routing_type')
routing_type = fields.Selection(string="工序类型", related='route_workcenter_id.routing_type')
workcenter_ids = fields.Many2many('mrp.workcenter', required=False, related='route_workcenter_id.workcenter_ids')
surface_technics_model_type_id = fields.Many2one('sf.model.type')

View File

@@ -12,11 +12,7 @@ import os
class ResProductMo(models.Model):
_inherit = 'product.template'
model_file = fields.Binary('模型文件')
categ_type = fields.Selection(
[("成品", "成品"), ("坯料", "坯料"), ("原材料", "原材料"), ("表面工艺", "表面工艺"), ("刀具", "刀具"),
("夹具", "夹具")],
string='产品的类别', related='categ_id.type',
store=True)
categ_type = fields.Selection(string='产品的类别', related='categ_id.type', store=True)
model_name = fields.Char('模型名称')
model_long = fields.Float('模型长(mm)', digits=(16, 3))
model_width = fields.Float('模型宽(mm)', digits=(16, 3))
@@ -56,11 +52,11 @@ class ResProductMo(models.Model):
domain="[('cutting_tool_material_id.name', '=', cutting_tool_type)]")
brand_id = fields.Many2one('sf.machine.brand', '品牌')
tool_length = fields.Integer('长度(mm)', size=6)
tool_width = fields.Integer('宽度(mm)', size=6)
tool_height = fields.Integer('高度(mm)', size=6)
tool_thickness = fields.Integer('厚度(mm)', size=6)
tool_weight = fields.Float('重量(kg)', size=4)
tool_length = fields.Integer('长度(mm)')
tool_width = fields.Integer('宽度(mm)')
tool_height = fields.Integer('高度(mm)')
tool_thickness = fields.Integer('厚度(mm)')
tool_weight = fields.Float('重量(kg)')
coating_material = fields.Char('涂层材质')
# 整体式刀具参数
cutting_tool_total_length = fields.Float('总长度(mm)')
@@ -138,17 +134,17 @@ class ResProductMo(models.Model):
fixture_clamping_way = fields.Char(string="装夹方式")
fixture_port_type = fields.Char(string="接口类型")
fixture_model_file = fields.Binary(string="3D模型图")
fixture_clamp_workpiece_length_max = fields.Integer(string="夹持工件长度MAX(mm)", size=6)
fixture_clamp_workpiece_width_max = fields.Integer(string="夹持工件宽度MAX(mm)", size=6)
fixture_clamp_workpiece_height_max = fields.Integer(string="夹持工件高度MAX(mm)", size=6)
fixture_clamp_workpiece_diameter_max = fields.Float(string="夹持工件直径MAX(mm)", digits=(16, 6))
fixture_clamp_workpiece_length_max = fields.Integer(string="夹持工件长度max(mm)")
fixture_clamp_workpiece_width_max = fields.Integer(string="夹持工件宽度max(mm)")
fixture_clamp_workpiece_height_max = fields.Integer(string="夹持工件高度max(mm)")
fixture_clamp_workpiece_diameter_max = fields.Float(string="夹持工件直径max(mm)", digits=(16, 6))
fixture_maximum_carrying_weight = fields.Float(string="最大承载重量(kg)", digits=(16, 4))
fixture_maximum_clamping_force = fields.Integer(string="最大夹持力(n)", size=8)
fixture_maximum_clamping_force = fields.Integer(string="最大夹持力(n)")
fixture_driving_way = fields.Char(string="驱动方式")
fixture_apply_machine_tool_type_ids = fields.Many2many('sf.machine_tool.type', 'rel_product_machine_tool_type',
string="适用机床型号")
fixture_through_hole_size = fields.Integer(string="过孔大小(mm)", size=6)
fixture_screw_size = fields.Integer(string="螺牙大小(mm)", size=6)
fixture_through_hole_size = fields.Integer(string="过孔大小(mm)")
fixture_screw_size = fields.Integer(string="螺牙大小(mm)")
# 注册状态
register_state = fields.Selection([('未注册', '未注册'), ('已注册', '已注册'), ('注册失败', '注册失败')],
string='注册状态', default='未注册')
@@ -368,7 +364,8 @@ class ResProductMo(models.Model):
'materials_type_id': self.env['sf.materials.model'].search(
[('materials_no', '=', item['texture_type_code'])]).id,
# 'model_surface_process_ids': self.get_production_process_id(item['surface_process_code']),
'model_process_parameters_ids': [(6, 0, [])] if not item.get('process_parameters_code') else self.get_process_parameters_id(item['process_parameters_code']),
'model_process_parameters_ids': [(6, 0, [])] if not item.get(
'process_parameters_code') else self.get_process_parameters_id(item['process_parameters_code']),
'model_remark': item['remark'],
'default_code': '%s-%s' % (order_number, i),
# 'barcode': item['barcode'],

View File

@@ -1,5 +1,6 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_quick_easy_order,quick_easy_order,model_quick_easy_order,base.group_user,1,1,1,1
access_sf_auto_quatotion_common,sf_auto_quatotion_common,model_sf_auto_quatotion_common,base.group_user,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_quick_easy_order quick_easy_order model_quick_easy_order base.group_user 1 1 1 1
3 access_sf_auto_quatotion_common sf_auto_quatotion_common model_sf_auto_quatotion_common base.group_user 1 1 1 1
4
5
6