Add doctstring and remove dead code
This commit is contained in:
parent
1fa8ece909
commit
d21dfb4ae8
|
|
@ -116,7 +116,10 @@ class ServerConfiguration(models.TransientModel):
|
||||||
_conf_defaults = _Defaults()
|
_conf_defaults = _Defaults()
|
||||||
|
|
||||||
def __init__(self, pool, cr):
|
def __init__(self, pool, cr):
|
||||||
# env.sudo is not available
|
"""Add columns to model dynamically
|
||||||
|
and init some properties
|
||||||
|
|
||||||
|
"""
|
||||||
self._add_columns()
|
self._add_columns()
|
||||||
super(ServerConfiguration, self).__init__(pool, cr)
|
super(ServerConfiguration, self).__init__(pool, cr)
|
||||||
self.running_env = system_base_config['running_env']
|
self.running_env = system_base_config['running_env']
|
||||||
|
|
@ -128,6 +131,7 @@ class ServerConfiguration(models.TransientModel):
|
||||||
return '%s | %s' % (section, key)
|
return '%s | %s' % (section, key)
|
||||||
|
|
||||||
def _add_columns(self):
|
def _add_columns(self):
|
||||||
|
"""Add columns to model dynamically"""
|
||||||
cols = chain(
|
cols = chain(
|
||||||
self._get_base_cols(),
|
self._get_base_cols(),
|
||||||
self._get_env_cols(),
|
self._get_env_cols(),
|
||||||
|
|
@ -171,11 +175,6 @@ class ServerConfiguration(models.TransientModel):
|
||||||
self._conf_defaults[key] = item
|
self._conf_defaults[key] = item
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def _merge_fields_desc(self, cr, user, res, cols, env, context=None):
|
|
||||||
for col, field in cols.items():
|
|
||||||
res[col] = cols[col].get_description(env)
|
|
||||||
return res
|
|
||||||
|
|
||||||
def _group(self, items):
|
def _group(self, items):
|
||||||
"""Return an XML chunk which represents a group of fields."""
|
"""Return an XML chunk which represents a group of fields."""
|
||||||
names = []
|
names = []
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue