This commit updates the various res config of Odoo addons to use the newly-introduced config_parameter field attribute.
22 lines
829 B
Python
22 lines
829 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo import api, fields, models
|
|
|
|
|
|
class ResConfigSettings(models.TransientModel):
|
|
_inherit = 'res.config.settings'
|
|
|
|
cal_client_id = fields.Char("Client_id", config_parameter='google_calendar_client_id', default='')
|
|
cal_client_secret = fields.Char("Client_key", config_parameter='google_calendar_client_secret', default='')
|
|
server_uri = fields.Char('URI for tuto')
|
|
|
|
@api.model
|
|
def get_values(self):
|
|
res = super(ResConfigSettings, self).get_values()
|
|
get_param = self.env['ir.config_parameter'].sudo().get_param
|
|
res.update(
|
|
server_uri="%s/google_account/authentication" % get_param('web.base.url', default="http://yourcompany.odoo.com"),
|
|
)
|
|
return res
|