Merge branch 'rename-odoo-conf' into 'main'

[FIX] odoo.cfg to odoo.conf

Closes #9 and #8

See merge request odoo-openupgrade-wizard/odoo-openupgrade-wizard!19
This commit is contained in:
Rémy Taymans 2022-10-13 20:01:24 +00:00
commit ec89747ee5
5 changed files with 16 additions and 7 deletions

View File

@ -81,7 +81,7 @@ src/
env_10.0/
extra_debian_requirements.txt
Dockerfile
odoo.cfg
odoo.conf
extra_python_requirements.txt
repos.yml
src/
@ -131,7 +131,7 @@ modules.csv
- ``extra_debian_requirements.txt`` enumerates the list of extra system librairies
required to run the odoo instance.
- ``odoo.cfg`` file. Add here extra configuration required for your custom modules.
- ``odoo.conf`` file. Add here extra configuration required for your custom modules.
the classical keys (``db_host``, ``db_port``, etc...) are automatically
autogenerated.

View File

@ -145,8 +145,8 @@ def init(
# Create odoo config file
ensure_file_exists_from_template(
path_version / Path("odoo.cfg"),
"odoo/odoo.cfg.j2",
path_version / Path("odoo.conf"),
"odoo/odoo.conf.j2",
)
# Create repos.yml file for gitaggregate tools

View File

@ -0,0 +1,9 @@
# This file can be left empty
# The following standard parameters are generated automatically and are
# not required to be found in this file:
# - addons_path
# - connection parameters to the database
# - database name
# - http or xml port
# - etc.
# Only non standard or special options should be specified here.

View File

@ -112,9 +112,9 @@ def generate_odoo_command(
odoo_env_path = get_odoo_env_path(ctx, migration_step["version"])
# Compute 'server_wide_modules'
# For that purpose, read the custom odoo.cfg file
# For that purpose, read the custom odoo.conf file
# to know if server_wide_modules is defined
custom_odoo_config_file = odoo_env_path / "odoo.cfg"
custom_odoo_config_file = odoo_env_path / "odoo.conf"
parser = configparser.RawConfigParser()
parser.read(custom_odoo_config_file)
server_wide_modules = parser.get(
@ -160,7 +160,7 @@ def generate_odoo_command(
result = (
f" {command}"
f" {shell_cmd}"
f" --config=/odoo_env/odoo.cfg"
f" --config=/odoo_env/odoo.conf"
f" --data-dir=/env/filestore/"
f" --addons-path={addons_path}"
f" --logfile={log_file_docker_path}"