Load demo data in Odoo 19+

This commit is contained in:
Stéphane Bidoul 2025-10-27 15:53:05 +01:00
parent 5c302a454f
commit 276aa3e83a

View file

@ -16,6 +16,11 @@ dropdb --if-exists ${PGDATABASE}-baseonly
ADDONS=$(manifestoo --select-addons-dir ${ADDONS_DIR} --select-include "${INCLUDE}" --select-exclude "${EXCLUDE}" list --separator=,) ADDONS=$(manifestoo --select-addons-dir ${ADDONS_DIR} --select-include "${INCLUDE}" --select-exclude "${EXCLUDE}" list --separator=,)
# In Odoo 19+, demo data is not loaded by default. We enable it via $ODOO_RC,
# because --with-demo does not exists in previous version and would error out,
# while unknown options in the configuration file are ignored.
echo "with_demo = True" >> $ODOO_RC
# Create the baseonly database if installation failed. # Create the baseonly database if installation failed.
unbuffer $(which odoo || which openerp-server) \ unbuffer $(which odoo || which openerp-server) \
--data-dir=/mnt/data/odoo-data-dir \ --data-dir=/mnt/data/odoo-data-dir \