[MIG] server_environment: Migration to 11.0
This commit is contained in:
parent
a020d1f408
commit
d833697a8a
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
{
|
||||
"name": "server configuration environment files",
|
||||
"version": "10.0.1.2.0",
|
||||
"version": "11.0.1.0.0",
|
||||
"depends": ["base", "server_environment_files"],
|
||||
"author": "Camptocamp,Odoo Community Association (OCA)",
|
||||
"summary": "move some configurations out of the database",
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
##############################################################################
|
||||
|
||||
import os
|
||||
import ConfigParser
|
||||
import configparser
|
||||
from lxml import etree
|
||||
from itertools import chain
|
||||
|
||||
|
|
@ -91,7 +91,7 @@ def _load_config():
|
|||
else:
|
||||
conf_files = _listconf(running_env)
|
||||
|
||||
config_p = ConfigParser.SafeConfigParser()
|
||||
config_p = configparser.SafeConfigParser()
|
||||
# options are case-sensitive
|
||||
config_p.optionxform = str
|
||||
try:
|
||||
|
|
@ -144,9 +144,9 @@ class ServerConfiguration(models.TransientModel):
|
|||
def _add_columns(cls):
|
||||
"""Add columns to model dynamically"""
|
||||
cols = chain(
|
||||
cls._get_base_cols().items(),
|
||||
cls._get_env_cols().items(),
|
||||
cls._get_system_cols().items()
|
||||
list(cls._get_base_cols().items()),
|
||||
list(cls._get_env_cols().items()),
|
||||
list(cls._get_system_cols().items())
|
||||
)
|
||||
for col, value in cols:
|
||||
col_name = col.replace('.', '_')
|
||||
|
|
@ -159,7 +159,7 @@ class ServerConfiguration(models.TransientModel):
|
|||
def _get_base_cols(cls):
|
||||
""" Compute base fields"""
|
||||
res = {}
|
||||
for col, item in system_base_config.options.items():
|
||||
for col, item in list(system_base_config.options.items()):
|
||||
key = cls._format_key('odoo', col)
|
||||
res[key] = item
|
||||
return res
|
||||
|
|
|
|||
Loading…
Reference in New Issue