Add doctstring and remove dead code

This commit is contained in:
Nicolas Bessi 2014-09-09 14:21:35 +02:00 committed by Stéphane Bidoul (ACSONE)
parent fbfaa19e41
commit ab543e5734
No known key found for this signature in database
GPG Key ID: BCAB2555446B5B92
1 changed files with 5 additions and 6 deletions

View File

@ -116,7 +116,10 @@ class ServerConfiguration(models.TransientModel):
_conf_defaults = _Defaults()
def __init__(self, pool, cr):
# env.sudo is not available
"""Add columns to model dynamically
and init some properties
"""
self._add_columns()
super(ServerConfiguration, self).__init__(pool, cr)
self.running_env = system_base_config['running_env']
@ -128,6 +131,7 @@ class ServerConfiguration(models.TransientModel):
return '%s | %s' % (section, key)
def _add_columns(self):
"""Add columns to model dynamically"""
cols = chain(
self._get_base_cols(),
self._get_env_cols(),
@ -171,11 +175,6 @@ class ServerConfiguration(models.TransientModel):
self._conf_defaults[key] = item
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):
"""Return an XML chunk which represents a group of fields."""
names = []