自建模块日志警告信息处理
This commit is contained in:
@@ -63,6 +63,7 @@ class SfSaintenanceStandards(models.Model):
|
||||
|
||||
class MaintenanceStandardImage(models.Model):
|
||||
_name = 'maintenance.standard.image'
|
||||
_description = 'maintenance.standard.image'
|
||||
|
||||
image = fields.Binary(string='维保图片')
|
||||
standard_id = fields.Many2one('maintenance.standards', string='Standard')
|
||||
|
||||
@@ -66,7 +66,14 @@ 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([('机床', '机床')], related='category_id.equipment_type')
|
||||
equipment_type = fields.Selection([('机床', '机床')], compute='_compute_category_id')
|
||||
|
||||
@api.depends('category_id')
|
||||
def _compute_category_id(self):
|
||||
for record in self:
|
||||
if record:
|
||||
record.equipment_type = record.category_id.equipment_type
|
||||
|
||||
code = fields.Char('机台号')
|
||||
name = fields.Char('名称')
|
||||
knife_type = fields.Selection(
|
||||
@@ -114,7 +121,7 @@ class SfMaintenanceEquipment(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)')
|
||||
|
||||
@@ -8,7 +8,7 @@ class SfMaintenanceLogs(models.Model):
|
||||
code = fields.Char(string='编码')
|
||||
name = fields.Char(string='名称')
|
||||
type = fields.Selection([('type1', '类型1'), ('type2', '类型2')], string='类型')
|
||||
brand = fields.Many2one('sf.machine.brand', relared='model.brand_id', string='品牌')
|
||||
brand = fields.Many2one('sf.machine.brand', related='maintenance_equipment_id.brand_id', string='品牌')
|
||||
maintenance_equipment_id = fields.Many2one('maintenance.equipment', string='设备')
|
||||
code_location = fields.Char(string='编码位置')
|
||||
fault_type = fields.Selection([('电气类', '电气类'), ('机械类', '机械类'), ('程序类', '程序类'), ('系统类', '系统类')], string='故障类型')
|
||||
|
||||
Reference in New Issue
Block a user