25 lines
1.4 KiB
Python
25 lines
1.4 KiB
Python
# -*-coding:utf-8-*-
|
|
from odoo import fields, models
|
|
|
|
class SfMaintenanceLogs(models.Model):
|
|
_name = 'sf.maintenance.logs'
|
|
_description = '设备故障日志'
|
|
|
|
code = fields.Char(string='编码')
|
|
name = fields.Char(string='名称')
|
|
type = fields.Selection([('type1', '类型1'), ('type2', '类型2')], string='类型')
|
|
brand = fields.Char(string='品牌')
|
|
model = fields.Char(string='型号')
|
|
code_location = fields.Char(string='编码位置')
|
|
fault_type = fields.Selection([('电气类', '电气类'), ('机械类', '机械类'), ('程序类', '程序类'), ('系统类', '系统类')], string='故障类型')
|
|
fault_code = fields.Char(string='故障代码')
|
|
fault_alarm_info = fields.Char(string='故障报警信息')
|
|
alarm_level = fields.Selection([('一级', '一级(严重)'), ('二级', '二级(中等)'), ('三级', '三级(轻微)')], string='报警级别')
|
|
alarm_time = fields.Datetime(string='报警时间')
|
|
alarm_way = fields.Selection([('文本提示报警', '文本提示报警'), ('声光报警', '声光报警'), ('图文报警', '图文报警')], string='报警方式')
|
|
fault_process = fields.Text(string='故障处理方法')
|
|
operator = fields.Many2one('res.users', string='处理人')
|
|
recovery_time = fields.Datetime(string='复原时间')
|
|
fault_duration = fields.Float(string='故障时长')
|
|
note = fields.Text(string='备注')
|