Nine of the thirteen carried a shebang without the bit, so only four could be run by their own path. Set to 755, not chmod +x: two were 664 under the 0002 umask and would have become 775 — executed by others while a group member could still rewrite them. That pairing is the only real risk here; the bit alone grants nothing, since reading the file is enough to run python3 on it. Being runnable opens a path without the venv: the shebang resolves to the system python3, which has no Textual. --tui fell back to the text report saying nothing. It now names the interpreter and the venv. --- FR --- [FIX] script : rendre exécutables les outils d'analyse et de migration Neuf des treize portaient un shebang sans le bit ; quatre seulement se lançaient par leur chemin. Mis à 755, pas chmod +x : deux étaient en 664 sous l'umask 0002 et seraient passés à 775 — exécutés par d'autres alors qu'un membre du groupe pouvait encore les réécrire. C'est la seule vraie prise ici ; le bit seul n'accorde rien, lire le fichier suffit déjà à lancer python3 dessus. Devenir lançable ouvre un chemin sans le venv : le shebang résout le python du système, sans Textual. --tui retombait sur le rapport texte sans rien dire. Il nomme désormais l'interpréteur et le venv. Assisted-by: Claude Opus 5
24 lines
848 B
Python
Executable file
24 lines
848 B
Python
Executable file
#!/usr/bin/env python3
|
|
# © 2021-2026 TechnoLibre (http://www.technolibre.ca)
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
|
|
|
# This script need to be run when upgrade 14 to 15 when database is created from ERPLibre.
|
|
print("Running a script in the Odoo shell!")
|
|
|
|
i = 0
|
|
print(
|
|
f"{i}. Remove project_type because OCA project_category migrating to OCA project_type and conflict with odoo14.0/addons/Numigi_odoo-project-addons"
|
|
)
|
|
# TODO do a migration, copy data to another temporary table
|
|
env["ir.module.module"].search([("name", "=", "project_type")]).unlink()
|
|
i += 1
|
|
|
|
# print(
|
|
# f"{i}. Remove project_type because OCA project_category migrating to OCA project_type"
|
|
# )
|
|
# env["ir.module.module"].search([("name", "=", "l10n_eu_oss_oca")]).unlink()
|
|
# i += 1
|
|
|
|
env.cr.commit()
|
|
|
|
print("End fix migration Odoo 14.0 to Odoo 15.0")
|