[FIX] bug on view by changing generated table field name
This commit is contained in:
parent
1cb4b8d418
commit
cd0a2b2186
|
|
@ -137,7 +137,11 @@ class ServerConfiguration(models.TransientModel):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _format_key(cls, section, key):
|
def _format_key(cls, section, key):
|
||||||
return '%s | %s' % (section, key)
|
return '%s_I_%s' % (section, key)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def _format_key_display_name(cls, key_name):
|
||||||
|
return key_name.replace('_I_', ' | ')
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _add_columns(cls):
|
def _add_columns(cls):
|
||||||
|
|
@ -151,7 +155,10 @@ class ServerConfiguration(models.TransientModel):
|
||||||
col_name = col.replace('.', '_')
|
col_name = col.replace('.', '_')
|
||||||
setattr(ServerConfiguration,
|
setattr(ServerConfiguration,
|
||||||
col_name,
|
col_name,
|
||||||
fields.Char(string=col, readonly=True))
|
fields.Char(
|
||||||
|
string=cls._format_key_display_name(col_name),
|
||||||
|
readonly=True)
|
||||||
|
)
|
||||||
cls._conf_defaults[col_name] = value
|
cls._conf_defaults[col_name] = value
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue