Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/修改机床参数bug

This commit is contained in:
qihao.gong@jikimo.com
2023-08-29 15:48:48 +08:00
27 changed files with 543 additions and 329 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')
@@ -279,7 +279,7 @@ class MachineToolType(models.Model):
feed_speed = fields.Char('进给速度(mm/min)')
tool_speed = fields.Char('刀具速度(m/min)')
distance_min = fields.Char('主轴端面至工作台面距离MIN(mm)')
distance_max = fields.Char('主轴端面至工作台面距离MIN(mm)')
distance_max = fields.Char('主轴端面至工作台面距离MAX(mm)')
taper = fields.Char('主轴锥度(°)')
torque = fields.Char('主轴电机扭矩(n/m)')
motor_power = fields.Char('主轴电机功率(kw)')

View File

@@ -179,3 +179,9 @@ class MrsProductionProcessParameter(models.Model):
def get_gain_way(self, item):
process_parameter = self.env['sf.production.process.parameter'].search([('id', '=', item.id)])
return process_parameter
def _json_production_process_item_code(self, item):
code_arr = []
for i in item.parameter_ids:
code_arr.append(i.code)
return code_arr

View File

@@ -34,22 +34,24 @@ 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):
@@ -80,7 +82,7 @@ class FixtureModel(models.Model):
code = self._get_code("JKM-C-JJWL-LDKP-")
return code
@api.model
@api.model_create_multi
def create(self, vals):
obj = super(FixtureModel, self).create(vals)
if obj.fixture_material_id:

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)')
@@ -208,7 +208,7 @@ class CuttingToolModel(models.Model):
code = self._get_code("JKM-T-DJWL-DBIN-")
return code
@api.model
@api.model_create_multi
def create(self, vals):
obj = super(CuttingToolModel, self).create(vals)
if obj.cutting_tool_material_id:

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

@@ -119,4 +119,22 @@ td.o_required_modifier {
.o_kanban_record_bottom {
font-family: '华文中宋';
//font-weight: bold;
}
.o_list_table th > div > i {
display: none !important;
}
body .o_list_table th:nth-child(4) {
width: 100px !important;
}
//body .o_list_table th:nth-child(5) {
// width: 500px !important;
//}
.o_list_renderer .o_list_table tbody > tr > td:not(.o_list_record_selector):not(.o_handle_cell):not(.o_list_button):not(.o_list_record_remove).o_list_text {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}

View File

@@ -115,7 +115,7 @@
<record model="ir.ui.view" id="sf_production_process_form">
<field name="model">sf.production.process</field>
<field name="arch" type="xml">
<form string="表面工艺" create="0" edit="0" delete="1">
<form string="表面工艺" create="0" edit="1" delete="1">
<sheet>
<div class="oe_title">
<h1>