From 05b990038503050c6aa6f50c5c4bae7a80839648 Mon Sep 17 00:00:00 2001 From: "Moises Lopez - https://www.vauxoo.com/" Date: Tue, 29 Jul 2025 17:28:18 -0600 Subject: [PATCH] [REF] entrypoint_deployv: Compatible with saas-18.3+ (future odoo-19.0) to use new with-demo parameter Based on the following future change for odoo-19.0: - [[IMP] core: no longer load demo data by default](https://github.com/odoo/odoo/pull/194585) And inspired by original runbot code to set parameters: - https://github.com/odoo/runbot/blob/91834a6b340bb379df06149/runbot/models/build.py#L1164-L1168 We are checking if this new parameter is needed for the odoo deployed in this image --- src/travis2docker/templates/entrypoint_deployv.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/travis2docker/templates/entrypoint_deployv.sh b/src/travis2docker/templates/entrypoint_deployv.sh index 69e206b..8cb6f4a 100755 --- a/src/travis2docker/templates/entrypoint_deployv.sh +++ b/src/travis2docker/templates/entrypoint_deployv.sh @@ -104,6 +104,14 @@ def start_odoo(): except subprocess.CalledProcessError: database_created = False + configpy = "/home/odoo/instance/odoo/odoo/tools/config.py" + if os.path.isfile(configpy): + with open(configpy) as f_configpy: + for line in f_configpy: + if "--with-demo" in line: + cmd.extend(["--with-demo"]) + break + if not database_created: cmd.extend(["-i", ",".join(modules), "--workers=0", "--stop-after-init"]) if test_enable: