[UPD] todo: show error when missing odoo version for odoo command
This commit is contained in:
parent
3560bd05a3
commit
de6d1b5eeb
1 changed files with 3 additions and 0 deletions
|
|
@ -784,6 +784,9 @@ class TODO:
|
||||||
if not source_odoo and os.path.exists("./.erplibre-version"):
|
if not source_odoo and os.path.exists("./.erplibre-version"):
|
||||||
with open("./.erplibre-version") as f:
|
with open("./.erplibre-version") as f:
|
||||||
source_odoo = f.read()
|
source_odoo = f.read()
|
||||||
|
if not source_odoo:
|
||||||
|
_logger.error(f"You cannot execute Odoo command if no version is installed. Command : {commande}")
|
||||||
|
return -1
|
||||||
commande = (
|
commande = (
|
||||||
f"source ./.venv.{source_odoo}/bin/activate && {commande}"
|
f"source ./.venv.{source_odoo}/bin/activate && {commande}"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue