[FIX] install-from-csv: add with-demo option
Add a flag to specify if the database created by install-from-csv should install demo data or not. Fix #41
This commit is contained in:
parent
a878df2915
commit
25655d4b7a
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user