设备新增参数 AGV小车table页

This commit is contained in:
qihao.gong@jikimo.com
2023-09-28 16:20:03 +08:00
parent 6b375ee64d
commit 960bea5bb0
2 changed files with 33 additions and 3 deletions

View File

@@ -14,7 +14,7 @@ class SfMaintenanceEquipmentCategory(models.Model):
_inherit = 'maintenance.equipment.category' _inherit = 'maintenance.equipment.category'
_description = '设备类别' _description = '设备类别'
equipment_type = fields.Selection([('机床', '机床'), ('械臂', '械臂'), ('AGV小车', 'AGV小车'), ('检测设备', '检测设备')], string='类型', default='机床') equipment_type = fields.Selection([('机床', '机床'), ('器人', '器人'), ('AGV小车', 'AGV小车'), ('检测设备', '检测设备')], string='类型', default='机床')
class SfMaintenanceEquipment(models.Model): class SfMaintenanceEquipment(models.Model):
@@ -65,7 +65,7 @@ class SfMaintenanceEquipment(models.Model):
MTcode = fields.Char("编码", default=get_no) MTcode = fields.Char("编码", default=get_no)
created_user = fields.Many2one('res.users', string='创建人', default=lambda self: self.env.user) created_user = fields.Many2one('res.users', string='创建人', default=lambda self: self.env.user)
equipment_type = fields.Selection([('机床', '机床')], compute='_compute_category_id') equipment_type = fields.Selection([('机床', '机床'), ('机器人', '机器人'), ('AGV小车', 'AGV小车'), ('检测设备', '检测设备')], compute='_compute_category_id')
@api.depends('category_id') @api.depends('category_id')
def _compute_category_id(self): def _compute_category_id(self):
@@ -235,6 +235,29 @@ class SfMaintenanceEquipment(models.Model):
item.machine_tool_category = item.type_id.machine_tool_category.id item.machine_tool_category = item.type_id.machine_tool_category.id
item.brand_id = item.type_id.brand_id.id item.brand_id = item.type_id.brand_id.id
# AGV小车设备参数
AGV_L = fields.Char('设备尺寸(长)')
AGV_W = fields.Char('设备尺寸(宽)')
AGV_H = fields.Char('设备尺寸(高)')
AGV_goods_L = fields.Char('载货尺寸(长)')
AGV_goods_W = fields.Char('载货尺寸(宽)')
AGV_goods_H = fields.Char('载货尺寸(高)')
AGV_velocity = fields.Char('标准速度')
AGV_velocity_min = fields.Char('标准速度(最小)')
AGV_velocity_max = fields.Char('标准速度(最大)')
AGV_Lifting_height = fields.Char('升降高度(max)')
AGV_ground_clearance = fields.Char('最小离地高度')
AGV_turning_radius = fields.Char('最小转弯半径')
AGV_gradeability_max = fields.Integer('最大爬坡度')
AGV_parking_accuracy = fields.Char('停车精度')
AGV_load_weight_max = fields.Char('最大负载重量')
AGV_load_weight_max = fields.Char('最大负载重量')
AGV_weight = fields.Char('本体总重量')
AGV_job_duration = fields.Char('连续作业时长')
AGV_transfer_mode = fields.Char('移载方式')
# 注册同步机床 # 注册同步机床
def enroll_machine_tool(self): def enroll_machine_tool(self):
sf_sync_config = self.env['res.config.settings'].get_values() sf_sync_config = self.env['res.config.settings'].get_values()

View File

@@ -65,7 +65,7 @@
force_save="1"/> force_save="1"/>
</xpath> </xpath>
<xpath expr="//page[@name='description']" position="before"> <xpath expr="//page[@name='description']" position="before">
<page string="设备参数" name="sf_equipment" attrs="{'invisible': [('type_id', '=', False)]}"> <page string="设备参数" name="sf_equipment" attrs="{'invisible': [('equipment_type', '!=', '机床')]}">
<group> <group>
<group string="基本参数"> <group string="基本参数">
<field name="control_system_id" required="1" options="{'no_create': True}"/> <field name="control_system_id" required="1" options="{'no_create': True}"/>
@@ -177,6 +177,13 @@
</page> </page>
<page string="设备参数" name="sf_equipment" attrs="{'invisible': [('equipment_type', '!=', 'AGV小车')]}">
</page>
<page string="设备参数" name="sf_equipment" attrs="{'invisible': [('equipment_type', '!=', '机器人')]}">
</page>
<page string="设备参数" name="sf_equipment" attrs="{'invisible': [('equipment_type', '!=', '检测设备')]}">
</page>
<page string="加工能力"> <page string="加工能力">
<field name='image_id' widget="custom_many2many_checkboxes"> <field name='image_id' widget="custom_many2many_checkboxes">