Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 21 additions & 10 deletions bin/migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,13 +668,13 @@ def write_env_secret(build_dir, version):
if "PGPASSWORD" in os.environ:
overwrite_values["PGPASSWORD"] = os.environ["PGPASSWORD"]
if params["enterprise-enabled"]:
overwrite_values[
"DEFAULT_REPO_PATTERN_ODOO"
] = "https://github.com/odoo/odoo.git"
overwrite_values["DEFAULT_REPO_PATTERN_ODOO"] = (
"https://github.com/odoo/odoo.git"
)
elif float(version) < 14.0 and version != params["start-version"]:
overwrite_values[
"DEFAULT_REPO_PATTERN_ODOO"
] = "https://github.com/OCA/OpenUpgrade.git"
overwrite_values["DEFAULT_REPO_PATTERN_ODOO"] = (
"https://github.com/OCA/OpenUpgrade.git"
)
rewritten_lines = []

lines = []
Expand Down Expand Up @@ -1041,10 +1041,21 @@ def check_process_status(proc):
proc.kill()

mark_enterprise_done(version)
if not params["no-backups"]:
copy_database(enterprise_database, os.environ["PGDATABASE"], True)
else:
rename_database(enterprise_database, os.environ["PGDATABASE"])
try:
if not params["no-backups"]:
copy_database(enterprise_database, os.environ["PGDATABASE"], True)
else:
rename_database(enterprise_database, os.environ["PGDATABASE"])
except CommandFailedException as e:
logging.error(
"Failed because we weren't able to get the enterprise database in "
"place of the original one. No worries, the migrated database "
"still exists, but someone needs to resolve the error, execute "
"the following command, and restart the migration script:\n"
f"createdb \"{os.environ['PGDATABASE']}\" -T "
f'"{enterprise_database}"'
)
raise e


def run_migration(start_version, target_version):
Expand Down
5 changes: 2 additions & 3 deletions templates/16.0/requirements-default.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,20 @@ ptvsd==5.0.0a4
pudb==2019.1
pydot==1.4.1
Pygments==2.10.0
pyldap==2.4.28
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually think we can remove this. Helpdesk uses it, but we can try to remove it on helpdesk-nightly and see if we can still log in

pyopenssl==22.0.0
pyparsing==2.2.0
PyPDF2==1.26.0
pyserial==3.4
python-dateutil==2.8.2
python-dotenv==0.17.1
python-ldap==3.4.0
python-ldap==3.4.4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What we actually need is:

python-ldap==3.4.0 ; sys_platform != 'win32' and python_version < '3.12' # min version = 3.2.0 (Focal with security backports)
python-ldap==3.4.4 ; sys_platform != 'win32' and python_version >= '3.12'  # (Noble) Mostly to have a wheel package

python-magic==0.4.24
python-stdnum==1.13
pytz==2021.1
pyusb==1.0.2
qrcode==6.1
raven==6.10.0
reportlab==3.5.59
reportlab==3.6.13
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Odoo 16 explicitly states that 3.5.59 is needed

requests==2.26.0
requests-toolbelt==0.9.1
Shapely==2.0.0
Expand Down