[NEW] pad_hedgedoc_connector: create addon

This commit is contained in:
Stéphan Sainléger
2022-08-09 23:02:58 +02:00
parent fb525f95d9
commit 5f2adcbc91
13 changed files with 316 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
from . import res_config_settings
from . import company
from . import hedgedoc_pad

View File

@@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-
from odoo import models, fields
class Company(models.Model):
_inherit = "res.company"
hedgedoc_server_url = fields.Char(string="Hedgedoc Server URL")

View File

@@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
from odoo import models, fields, api, _
class HedgedocPad(models.Model):
_name = "hedgedoc.pad"
_description = "Hedgedoc Pad"
name = fields.Char(string=_("Title"), required=True,)
url = fields.Char(string=_("URL"))

View File

@@ -0,0 +1,14 @@
# -*- coding: utf-8 -*-
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
hedgedoc_server_url = fields.Char(
related="company_id.hedgedoc_server_url",
string="Hedgedoc Server URL",
readonly=False,
)