Browse Source

new: [odoo-tecnativa] added 'modules' option to charm.

Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
lokavaluto/dev/master
Valentin Lab 5 years ago
parent
commit
9d4a35b8ca
  1. 10
      odoo-tecnativa/hooks/init
  2. 1
      odoo-tecnativa/hooks/postgres_database-relation-joined
  3. 5
      odoo-tecnativa/metadata.yml

10
odoo-tecnativa/hooks/init

@ -26,11 +26,19 @@ find "$LIB" \! -user "$odoo_uid" -print0 | while read-0 f; do
done
## workers management
workers=$(options-get workers 2>&1) || true
workers=$(options-get workers 2>/dev/null) || true
workers=${workers:-1}
modules=$(options-get modules 2>/dev/null | yaml_get_values ,) || true
if [ -z "$modules" ]; then
modules=base,l10n_fr
else
modules="base,${modules}"
fi
init-config-add "
$SERVICE_NAME:
command:
- \"--workers=${workers}\"
- \"-i ${modules}\"
"

1
odoo-tecnativa/hooks/postgres_database-relation-joined

@ -30,7 +30,6 @@ config-add "\
services:
$MASTER_BASE_SERVICE_NAME:
command:
- '-i base,l10n_fr'
- '--database=$DBNAME'
## All this is to please technativa image, but is quite redundant
environment:

5
odoo-tecnativa/metadata.yml

@ -16,6 +16,11 @@ docker-compose:
INITIAL_LANG: fr_FR
LIST_DB: 'true'
default-options:
workers: 1
# modules:
# - l10n_fr
#database: MYDATABASE ## will be the one connected to postgres
uses:
postgres-database:
#constraint: required | recommended | optional

Loading…
Cancel
Save