From 960bea5bb02034e73348143fc11a9c57ccab0329 Mon Sep 17 00:00:00 2001 From: "qihao.gong@jikimo.com" Date: Thu, 28 Sep 2023 16:20:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E6=96=B0=E5=A2=9E=E5=8F=82?= =?UTF-8?q?=E6=95=B0=20AGV=E5=B0=8F=E8=BD=A6table=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_maintenance/models/sf_maintenance.py | 27 ++++++++++++++++++++-- sf_maintenance/views/maintenance_views.xml | 9 +++++++- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/sf_maintenance/models/sf_maintenance.py b/sf_maintenance/models/sf_maintenance.py index 2b15ebad..7da49c38 100644 --- a/sf_maintenance/models/sf_maintenance.py +++ b/sf_maintenance/models/sf_maintenance.py @@ -14,7 +14,7 @@ class SfMaintenanceEquipmentCategory(models.Model): _inherit = 'maintenance.equipment.category' _description = '设备类别' - equipment_type = fields.Selection([('机床', '机床'), ('机械臂', '机械臂'), ('AGV小车', 'AGV小车'), ('检测设备', '检测设备')], string='类型', default='机床') + equipment_type = fields.Selection([('机床', '机床'), ('机器人', '机器人'), ('AGV小车', 'AGV小车'), ('检测设备', '检测设备')], string='类型', default='机床') class SfMaintenanceEquipment(models.Model): @@ -65,7 +65,7 @@ class SfMaintenanceEquipment(models.Model): MTcode = fields.Char("编码", default=get_no) 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') 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.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): sf_sync_config = self.env['res.config.settings'].get_values() diff --git a/sf_maintenance/views/maintenance_views.xml b/sf_maintenance/views/maintenance_views.xml index 500d6282..cce4a1d0 100644 --- a/sf_maintenance/views/maintenance_views.xml +++ b/sf_maintenance/views/maintenance_views.xml @@ -65,7 +65,7 @@ force_save="1"/> - + @@ -177,6 +177,13 @@ + + + + + + +