[IMP] cli tools: default 'postgres' database.

Rational: when calling oow psql, sometimes, we don't want to put a database. Example, if we call "oow -d postgres -c 'psql'".
In that case, this improvment makes that default postgres database will be proposed in the 'prompt', if no database is provided
This commit is contained in:
Sylvain LE GAL 2025-02-11 11:33:59 +01:00
parent 9687e8656a
commit 8bf6dd385a
2 changed files with 3 additions and 0 deletions

View File

@ -0,0 +1,2 @@
set a default 'postgres' database in ``oow psql`` command, to avoid force user
to set a database, in case of dbless command.

View File

@ -59,6 +59,7 @@ def database_option_required(function):
"--database",
required=True,
prompt=True,
default="postgres",
type=str,
help="Odoo Database for which you want to perform the operation.",
)(function)