feat(config): add option to initialize odoo without demo data

This commit is contained in:
Janik von Rotz committed 2025-08-28 18:38:00 +02:00
1 parent f19492aeb4
commit 7c433d3469
5 files changed
+27 -23

No files matched your search

+1 -1
View File
@@ -14,9 +14,9 @@ ODOO_REVISION=18.0.20250725
# ODOO_ADDONS_PATH=thirdparty/odoo-apps-partner-contact,../odoo-cd/untracked-odoo-apps
# ODOO_ADDONS_PATH=/mnt/addons/,/mnt/oca/,/mnt/enterprise,/mnt/themes/
# ODOO_DATABASE=odoo
# ODOO_INIT_DEMO_DATA=False
# ODOO_LANGUAGE=en_US
# ENVIRONMENT=production
# ODOO_PARAM=--without-demo=all
# SERVER_WIDE_MODULES=session_db,module_change_auto_install,mail_environment,queue_job
# SESSION_DB_URI=postgres://odoo:odoo@db/odoo
# LOG_LEVEL=debug
+2 -2
View File
@@ -166,10 +166,10 @@ The paths will be appended to the Odoo config.
### Initialize without demo data
In your `.env` file define this Odoo parameter env var:
In your `.env` file set this env var:
```bash
ODOO_PARAM=--without-demo=all
ODOO_INIT_DEMO_DATA=False
```
### Set Odoo database name
+1
View File
@@ -85,6 +85,7 @@ RUN apt-get update && \
wget \
gnupg \
expect \
libcairo2 \
# wkhtmltopdf dependencies:
libjpeg62-turbo \
libx11-6 \
+15 -15
View File
@@ -1,19 +1,19 @@
# Replaced from Docker apt install
num2words
phonenumbers
python-ldap
qrcode
setuptools
vobject
xlrd
xlwt
rlPyCairo
python-magic
odfpy
pdfminer.six
python-slugify
watchdog
num2words # python3-num2words
phonenumbers # python3-phonenumbers
python-ldap # python3-pyldap
qrcode # python3-qrcode
setuptools # python3-setuptools
vobject # python3-vobject
xlrd # python3-xlrd
xlwt # python3-xlwt
python-magic # python3-magic
odfpy # python3-odf
pdfminer.six # python3-pdfminer
python-slugify # python3-slugify
watchdog # python3-watchdog
rlPyCairo # python3-renderpm
# Built-in
manifestoo
click-odoo-contrib
memray
memray
+8 -5
View File
@@ -192,6 +192,7 @@ export PGSSLROOTCERT
ODOO_VERSION=$(echo "$ODOO_REVISION" | cut -d'.' -f1-2)
ODOO_DATABASE=${ODOO_DATABASE:="$ODOO_VERSION"}
ODOO_INIT_DEMO_DATA=${ODOO_INIT_DEMO_DATA:="True"}
ODOO_LANGUAGE=${ODOO_LANGUAGE:="de_CH"}
ODOO_PORT=${ODOO_PORT:="8069"}
POSTGRES_IMAGE=${POSTGRES_IMAGE:="postgres:14-alpine"}
@@ -228,6 +229,10 @@ else
OS_OPEN="xdg-open"
fi
if [ "$ODOO_INIT_DEMO_DATA" = "False" ]; then
ODOO_PARAM="--without-demo=all"
fi
# Check commands
if ! (command -v grep &> /dev/null && grep --version | grep -q GNU) && [[ "$OS_RELEASE" =~ ^(Darwin)$ ]]; then
@@ -595,11 +600,10 @@ function container-ps() {
}
function build() {
if test -z "$1"; then echo "\$1 is empty."; exit; fi
MANIFEST_FILE="$1"
# Set container tag and platform based on Dockerfile
MANIFEST_FILE="images/odoo/Dockerfile"
if [ -n "$1" ]; then
MANIFEST_FILE="$1"
fi
PLATFORM="linux/amd64"
if [ "$MANIFEST_FILE" = "images/odoo/Dockerfile" ]; then
PLATFORM="linux/amd64,linux/arm64"
@@ -624,7 +628,6 @@ function build() {
PYTHON_VERSION="3.9"
;;
"16.0")
# PYTHON_VERSION="3.9"
PYTHON_VERSION="3.11"
;;
"17.0")