Merge branch 'fix-install-from-csv-demo' into 'main'

[FIX] install-from-csv: add with-demo option

Closes #41

See merge request odoo-openupgrade-wizard/odoo-openupgrade-wizard!54
This commit is contained in:
LE GAL SYLVAIN 2024-02-08 09:45:39 +00:00
commit 717f396dc6

View File

@ -16,8 +16,13 @@ from odoo_openupgrade_wizard.tools.tools_postgres import ensure_database
@click.command()
@database_option
@click.option(
"--with-demo/--whitout-demo",
default=True,
help="Create database with or without demo data.",
)
@click.pass_context
def install_from_csv(ctx, database):
def install_from_csv(ctx, database, with_demo):
migration_step = get_migration_step_from_options(ctx, 1)
ensure_database(ctx, database, state="present")
@ -35,6 +40,7 @@ def install_from_csv(ctx, database):
database=database,
detached_container=True,
init="base",
demo=with_demo,
)
odoo_instance = OdooInstance(ctx, database)
odoo_default_company = ctx.obj["config"].get(