syncra_addons/syncra_welcome/models/syncra_welcome.py

34 lines
1.0 KiB
Python
Executable File

from odoo import models, fields
class SyncraWelcome(models.Model):
_name = 'syncra.welcome'
_description = 'Portal de Boas-Vindas SYNCRA'
name = fields.Char(string="Nome do Utilizador", required=True)
welcome_message = fields.Text(string="Mensagem", default="Bem-vindo ao ecossistema SYNCRA!")
# Adicionando os campos para o Deploy não quebrar a vista
module_zip = fields.Binary(string="Upload Módulo (.zip)")
module_filename = fields.Char(string="Nome do Ficheiro")
def action_open_gitea(self):
return {
'type': 'ir.actions.act_url',
'url': 'http://173.208.243.178:3000',
'target': 'new',
}
def action_open_cockpit(self):
return {
'type': 'ir.actions.act_url',
'url': 'https://173.208.243.178:9090',
'target': 'new',
}
def action_open_netdata(self):
return {
'type': 'ir.actions.act_url',
'url': 'http://173.208.243.178:8080/',
'target': 'new',
}