Use global section name as first part of the section
This commit is contained in:
parent
6b44590605
commit
9ae51f3c68
|
|
@ -89,13 +89,12 @@ class ServerEnvMixin(models.AbstractModel):
|
||||||
"""
|
"""
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
@api.multi
|
@api.model
|
||||||
def _server_env_global_section_name(self):
|
def _server_env_global_section_name(self):
|
||||||
"""Name of the global section in the configuration files
|
"""Name of the global section in the configuration files
|
||||||
|
|
||||||
Can be customized in your model
|
Can be customized in your model
|
||||||
"""
|
"""
|
||||||
self.ensure_one()
|
|
||||||
return self._name.replace(".", "_")
|
return self._name.replace(".", "_")
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
|
|
@ -105,9 +104,8 @@ class ServerEnvMixin(models.AbstractModel):
|
||||||
Can be customized in your model
|
Can be customized in your model
|
||||||
"""
|
"""
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
return ".".join(
|
base = self._server_env_global_section_name()
|
||||||
(self._name.replace(".", "_"), self.name)
|
return ".".join((base, self.name))
|
||||||
)
|
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def _server_env_read_from_config(self, field_name, config_getter):
|
def _server_env_read_from_config(self, field_name, config_getter):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue