Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/优化刀具基本参数同步

# Conflicts:
#	sf_dlm_management/views/product_template_management_view.xml
This commit is contained in:
jinling.yang
2024-01-08 10:08:50 +08:00
40 changed files with 919 additions and 344 deletions

View File

@@ -23,6 +23,7 @@
'views/tool_basic_param.xml',
'views/tool_menu.xml',
'views/menu_fixture_view.xml',
'views/change_base_view.xml',
],
'demo': [

View File

@@ -92,7 +92,7 @@ class MachineTool(models.Model):
type_id = fields.Many2one('sf.machine_tool.type', '型号')
brand_id = fields.Many2one('sf.machine.brand', string='品牌')
state = fields.Selection(
[("正常", "正常"), ("故障", "故障"), ("不可用", "不可用")],
[("正常", "正常"), ("故障停机", "故障停机"), ("计划维保", "计划维保"),("空闲", "空闲"),("封存(报废)", "封存(报废)")],
default='正常', string="机床状态")
# 0606新增字段
machine_tool_picture = fields.Binary('图片')

View File

@@ -16,7 +16,7 @@ class BasicParametersFixture(models.Model):
weight = fields.Float('重量(mm)', digits=(16, 2))
orientation_dish_diameter = fields.Float('定位盘直径(mm)', digits=(16, 2))
clamping_diameter = fields.Float('装夹直径(mm)', digits=(16, 2))
clamping_num = fields.Selection([('1', '1'), ('2', '2'), ('4', '4'), ('6', '6'), ('8', '8')], string='装单元数')
clamping_num = fields.Selection([('1', '1'), ('2', '2'), ('4', '4'), ('6', '6'), ('8', '8')], string='单元数')
chucking_power_max = fields.Float('最大夹持力(KN)', digits=(16, 2))
repeated_positioning_accuracy = fields.Char('重复定位精度(mm)', size=20)
boolean_transposing_hole = fields.Boolean('是否有转位孔')
@@ -65,4 +65,177 @@ class BasicParametersFixture(models.Model):
# '三爪卡盘' 字段
mounting_hole_depth = fields.Float('安装孔深度(mm)', digits=(16, 2))
centering_diameter = fields.Float('定心直径(mm)', digits=(16, 2))
centering_diameter = fields.Float('定心直径(mm)', digits=(16, 2))
def _json_zero_chuck_param(self, obj):
zero_chuck_param_str = (0, '', {
'name': obj['name'],
'length': obj['length'],
'width': obj['width'],
'height': obj['height'],
'diameter': obj['diameter'],
'weight': obj['weight'],
'orientation_dish_diameter': obj['orientation_dish_diameter'],
'clamping_diameter': obj['clamping_diameter'],
'clamping_num': obj['clamping_num'],
'chucking_power_max': obj['chucking_power_max'],
'repeated_positioning_accuracy': obj['repeated_positioning_accuracy'],
'boolean_transposing_hole': obj['boolean_transposing_hole'],
'unlocking_method': obj['unlocking_method'],
'boolean_chip_blowing_function': obj['boolean_chip_blowing_function'],
'carrying_capacity_max': obj['carrying_capacity_max'],
'rigidity': obj['rigidity'],
'materials_model_id': obj['materials_model_id'],
'machine_tool_type_id': obj['machine_tool_type_id'],
})
return zero_chuck_param_str
def _json_zero_tray_param(self, obj):
zero_tray_param_str = (0, '', {
'name': obj['name'],
'length': obj['length'],
'width': obj['width'],
'height': obj['height'],
'diameter': obj['diameter'],
'weight': obj['weight'],
'clamping_diameter': obj['clamping_diameter'],
'connector_diameter': obj['connector_diameter'],
'chucking_power_max': obj['chucking_power_max'],
'repeated_positioning_accuracy': obj['repeated_positioning_accuracy'],
'boolean_chip_blowing_function': obj['boolean_chip_blowing_function'],
'way_to_install': obj['way_to_install'],
'type_of_drive': obj['type_of_drive'],
'carrying_capacity_max': obj['carrying_capacity_max'],
'materials_model_id': obj['materials_model_id'],
'rigidity': obj['rigidity'],
})
return zero_tray_param_str
def _json_pneumatic_fixture_param(self, obj):
pneumatic_fixture_param_str = (0, '', {
'name': obj['name'],
'length': obj['length'],
'width': obj['width'],
'height': obj['height'],
'weight': obj['weight'],
'gripper_length_min': obj['gripper_length_min'],
'gripper_width_min': obj['gripper_width_min'],
'gripper_height_min': obj['gripper_height_min'],
'gripper_diameter_min': obj['gripper_diameter_min'],
'gripper_length_max': obj['gripper_length_max'],
'gripper_width_max': obj['gripper_width_max'],
'gripper_height_max': obj['gripper_height_max'],
'gripper_diameter_max': obj['gripper_diameter_max'],
'chucking_power_max': obj['chucking_power_max'],
'carrying_capacity_max': obj['carrying_capacity_max'],
'rated_air_pressure': obj['rated_air_pressure'],
'materials_model_id': obj['materials_model_id'],
'rigidity': obj['rigidity'],
'interface_materials_model_id': obj['interface_materials_model_id'],
'type_of_drive': obj['type_of_drive'],
})
return pneumatic_fixture_param_str
def _json_jaw_vice_fixture_param(self, obj):
jaw_vice_fixture_param_str = (0, '', {
'name': obj['name'],
'length': obj['length'],
'width': obj['width'],
'height': obj['height'],
'weight': obj['weight'],
'gripper_length_min': obj['gripper_length_min'],
'gripper_width_min': obj['gripper_width_min'],
'gripper_height_min': obj['gripper_height_min'],
'gripper_diameter_min': obj['gripper_diameter_min'],
'gripper_length_max': obj['gripper_length_max'],
'gripper_width_max': obj['gripper_width_max'],
'gripper_height_max': obj['gripper_height_max'],
'gripper_diameter_max': obj['gripper_diameter_max'],
'chucking_power_max': obj['chucking_power_max'],
'carrying_capacity_max': obj['carrying_capacity_max'],
'transverse_groove': obj['transverse_groove'],
'longitudinal_fitting_groove': obj['longitudinal_fitting_groove'],
'materials_model_id': obj['materials_model_id'],
'rigidity': obj['rigidity'],
'interface_materials_model_id': obj['interface_materials_model_id'],
'type_of_drive': obj['type_of_drive'],
})
return jaw_vice_fixture_param_str
def _json_magnet_fixture_param(self, obj):
magnet_fixture_param_str = (0, '', {
'name': obj['name'],
'length': obj['length'],
'width': obj['width'],
'height': obj['height'],
'height_tolerance_value': obj['height_tolerance_value'],
'weight': obj['weight'],
'gripper_length_min': obj['gripper_length_min'],
'gripper_width_min': obj['gripper_width_min'],
'gripper_height_min': obj['gripper_height_min'],
'gripper_diameter_min': obj['gripper_diameter_min'],
'gripper_length_max': obj['gripper_length_max'],
'gripper_width_max': obj['gripper_width_max'],
'gripper_height_max': obj['gripper_height_max'],
'gripper_diameter_max': obj['gripper_diameter_max'],
'rated_adsorption_force': obj['rated_adsorption_force'],
'magnetic_field_height': obj['magnetic_field_height'],
'magnetic_pole_plate_grinding_allowance': obj['magnetic_pole_plate_grinding_allowance'],
'carrying_capacity_max': obj['carrying_capacity_max'],
'materials_model_id': obj['materials_model_id'],
'rigidity': obj['rigidity'],
'interface_materials_model_id': obj['interface_materials_model_id'],
'type_of_drive': obj['type_of_drive'],
})
return magnet_fixture_param_str
def _json_adapter_board_fixture_param(self, obj):
adapter_board_fixture_param_str = (0, '', {
'name': obj['name'],
'length': obj['length'],
'width': obj['width'],
'height': obj['height'],
'weight': obj['weight'],
'gripper_length_min': obj['gripper_length_min'],
'gripper_width_min': obj['gripper_width_min'],
'gripper_height_min': obj['gripper_height_min'],
'gripper_diameter_min': obj['gripper_diameter_min'],
'gripper_length_max': obj['gripper_length_max'],
'gripper_width_max': obj['gripper_width_max'],
'gripper_height_max': obj['gripper_height_max'],
'gripper_diameter_max': obj['gripper_diameter_max'],
'chucking_power_max': obj['chucking_power_max'],
'carrying_capacity_max': obj['carrying_capacity_max'],
'materials_model_id': obj['materials_model_id'],
'rigidity': obj['rigidity'],
'screw_size': obj['screw_size'],
'via_hole_diameter': obj['via_hole_diameter'],
'type_of_drive': obj['type_of_drive'],
})
return adapter_board_fixture_param_str
def _json_scroll_chuck_param(self, obj):
scroll_chuck_param_str = (0, '', {
'name': obj['name'],
'length': obj['length'],
'width': obj['width'],
'height': obj['height'],
'diameter': obj['diameter'],
'weight': obj['weight'],
'gripper_length_min': obj['gripper_length_min'],
'gripper_width_min': obj['gripper_width_min'],
'gripper_height_min': obj['gripper_height_min'],
'gripper_diameter_min': obj['gripper_diameter_min'],
'gripper_length_max': obj['gripper_length_max'],
'gripper_width_max': obj['gripper_width_max'],
'gripper_height_max': obj['gripper_height_max'],
'gripper_diameter_max': obj['gripper_diameter_max'],
'chucking_power_max': obj['chucking_power_max'],
'carrying_capacity_max': obj['carrying_capacity_max'],
'materials_model_id': obj['materials_model_id'],
'rigidity': obj['rigidity'],
'mounting_hole_depth': obj['mounting_hole_depth'],
'centering_diameter': obj['centering_diameter'],
'type_of_drive': obj['type_of_drive'],
})
return scroll_chuck_param_str

View File

@@ -32,6 +32,7 @@ class FixtureModel(models.Model):
multi_mounting_type_id = fields.Many2one('sf.multi_mounting.type', string="联装类型", required=True)
brand_id = fields.Many2one('sf.machine.brand', string="品牌")
model_file = fields.Binary(string="3D模型图")
status = fields.Boolean('状态')
active = fields.Boolean('有效', default=False)
zero_chuck_ids = fields.One2many('sf.fixture.materials.basic.parameters', 'fixture_model_id',

View File

@@ -71,7 +71,7 @@
<record id="group_plan_director" model="res.groups">
<field name="name">计划总监</field>
<field name="category_id" ref="module_category_plan"/>
<!-- <field name="implied_ids" eval="[(4, ref('sf_base.group_plan_dispatch'))]"/>-->
<field name="implied_ids" eval="[(4, ref('sf_base.group_plan_dispatch'))]"/>
</record>
<record id="group_purchase" model="res.groups">

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<record model="ir.ui.view" id="sf_base_res_partner_kanban_view">
<field name="name">sf.base.res.partner.kanban</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.res_partner_kanban_view"/>
<field name="arch" type="xml">
<xpath expr="//kanban//templates//t//div//div//div//ul//li[last()]" position="after">
<li t-if="record.vat.raw_value" class="o_text_overflow"><field name="vat"/></li>
</xpath>
</field>
</record>
</data>
</odoo>