Browse Source

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

Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
0k/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 done
## workers management ## workers management
workers=$(options-get workers 2>&1) || true
workers=$(options-get workers 2>/dev/null) || true
workers=${workers:-1} 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 " init-config-add "
$SERVICE_NAME: $SERVICE_NAME:
command: command:
- \"--workers=${workers}\" - \"--workers=${workers}\"
- \"-i ${modules}\"
" "

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

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

5
odoo-tecnativa/metadata.yml

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

Loading…
Cancel
Save