[IMP] maintenance_project_task_domain, maintenance_server_data, maintenance_service_http_monitoring, maintenance_create_requests_from_project_task: pre-commit execution
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
from . import os_distribution
|
||||
from . import service
|
||||
from . import maintenance_equipment
|
||||
from . import maintenance_equipment
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from odoo import fields, models, api
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class MaintenanceEquipment(models.Model):
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class OsDistribution(models.Model):
|
||||
_name = 'os.distribution'
|
||||
_name = "os.distribution"
|
||||
|
||||
name = fields.Char('Name', compute="_compute_name")
|
||||
distrib_name = fields.Char('Distrib Name', required=True)
|
||||
distrib_version = fields.Char('Distrib Version')
|
||||
name = fields.Char("Name", compute="_compute_name")
|
||||
distrib_name = fields.Char("Distrib Name", required=True)
|
||||
distrib_version = fields.Char("Distrib Version")
|
||||
|
||||
@api.depends("distrib_name","distrib_version")
|
||||
@api.depends("distrib_name", "distrib_version")
|
||||
def _compute_name(self):
|
||||
for distrib in self:
|
||||
distrib.name = ""
|
||||
if distrib.distrib_name != "":
|
||||
distrib.name = distrib.distrib_name
|
||||
if distrib.distrib_version != "":
|
||||
distrib.name = distrib.name + ' ' + distrib.distrib_version
|
||||
distrib.name = distrib.name + " " + distrib.distrib_version
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
from odoo import fields, models
|
||||
|
||||
class Service(models.Model):
|
||||
_name = 'service'
|
||||
|
||||
name = fields.Char('Name', required=True)
|
||||
|
||||
class Service(models.Model):
|
||||
_name = "service"
|
||||
|
||||
name = fields.Char("Name", required=True)
|
||||
|
||||
|
||||
class ServiceVersion(models.Model):
|
||||
_name = "service.version"
|
||||
|
||||
service_id = fields.Many2one('service', string='Service', required=True)
|
||||
name = fields.Char('Name')
|
||||
is_last_version = fields.Boolean('Is Last Version?')
|
||||
service_id = fields.Many2one("service", string="Service", required=True)
|
||||
name = fields.Char("Name")
|
||||
is_last_version = fields.Boolean("Is Last Version?")
|
||||
|
||||
|
||||
class ServiceInstance(models.Model):
|
||||
_name = "service.instance"
|
||||
|
||||
equipment_id = fields.Many2one('maintenance.equipment', string='Equipment')
|
||||
service_id = fields.Many2one('service', string='Service', required=True)
|
||||
version_id = fields.Many2one('service.version', string='Version')
|
||||
service_url = fields.Char(string='Service Url')
|
||||
equipment_id = fields.Many2one("maintenance.equipment", string="Equipment")
|
||||
service_id = fields.Many2one("service", string="Service", required=True)
|
||||
version_id = fields.Many2one("service.version", string="Version")
|
||||
service_url = fields.Char(string="Service Url")
|
||||
active = fields.Boolean(default=True)
|
||||
|
||||
|
||||
class BackupServer(models.Model):
|
||||
_name = 'backup.server'
|
||||
_name = "backup.server"
|
||||
|
||||
name = fields.Char('Name', required=True)
|
||||
name = fields.Char("Name", required=True)
|
||||
|
||||
Reference in New Issue
Block a user