master-sf1.0

This commit is contained in:
qihao.gong@jikimo.com
2023-05-06 16:03:00 +08:00
parent fcf0354a1e
commit 0077d97cfa
307 changed files with 20636 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
import logging
from odoo import api, fields, models, _
_logger = logging.getLogger(__name__)
CONFIG_PARAM_WEB_WINDOW_TITLE = "web.base.title"
class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
web_window_title = fields.Char('Window Title')
@api.model
def get_values(self):
res = super(ResConfigSettings, self).get_values()
ir_config = self.env['ir.config_parameter'].sudo()
web_window_title = ir_config.get_param(CONFIG_PARAM_WEB_WINDOW_TITLE, default='')
res.update(
web_window_title=web_window_title
)
return res
def set_values(self):
super(ResConfigSettings, self).set_values()
ir_config = self.env['ir.config_parameter'].sudo()
ir_config.set_param(CONFIG_PARAM_WEB_WINDOW_TITLE, self.web_window_title or "")