[enh] Add question for OCA repo

This commit is contained in:
ljf 2016-12-14 12:14:06 +01:00
parent a1a238ac36
commit fd307618d9
2 changed files with 66 additions and 62 deletions

View file

@ -20,8 +20,7 @@
"nginx" "nginx"
], ],
"arguments": { "arguments": {
"install" : [ "install": [{
{
"name": "domain", "name": "domain",
"type": "domain", "type": "domain",
"ask": { "ask": {
@ -29,25 +28,30 @@
"fr": "Choisissez un domaine pour Odoo (Odoo sera installé dans sa racine !)" "fr": "Choisissez un domaine pour Odoo (Odoo sera installé dans sa racine !)"
}, },
"example": "odoo.domain.org" "example": "odoo.domain.org"
}, }, {
{ "name": "version",
"name": "odoo_version",
"ask": { "ask": {
"en": "Which version of Odoo do you want to install?", "en": "Which version of Odoo do you want to install?",
"fr": "Quelle version d'Odoo souhaitez-vous installer ?" "fr": "Quelle version d'Odoo souhaitez-vous installer ?"
}, },
"choices": ["8.0", "9.0", "10.0"], "choices": ["8.0", "9.0", "10.0"],
"default": "9.0" "default": "9.0"
}, {
"name": "oca",
"type": "boolean",
"ask": {
"en": "Use OCA repository to get community bugfixes ?",
"fr": "Utiliser les dépots OCA pour bénéficier des bugfix communautaires ?"
}, },
{ "default": false
}, {
"name": "admin_password", "name": "admin_password",
"type": "password", "type": "password",
"ask": { "ask": {
"en": "Choose a strong master admin password", "en": "Choose a strong master admin password",
"fr": "Choisissez un mot de passe maître fort pour l'administration" "fr": "Choisissez un mot de passe maître fort pour l'administration"
} }
}, }, {
{
"name": "lang", "name": "lang",
"ask": { "ask": {
"en": "Choose a language for Odoo", "en": "Choose a language for Odoo",
@ -55,7 +59,6 @@
}, },
"choices": ["en_US", "fr_FR", "de_DE"], "choices": ["en_US", "fr_FR", "de_DE"],
"default": "en_US" "default": "en_US"
} }]
]
} }
} }

View file

@ -6,7 +6,8 @@ app=$YNH_APP_INSTANCE_NAME
# Retrieve arguments # Retrieve arguments
domain=$YNH_APP_ARG_DOMAIN domain=$YNH_APP_ARG_DOMAIN
odoo_version=$YNH_APP_ARG_ODOO_VERSION version=$YNH_APP_ARG_VERSION
oca=$YNH_APP_ARG_OCA
admin_password=$YNH_APP_ARG_ADMIN_PASSWORD admin_password=$YNH_APP_ARG_ADMIN_PASSWORD
lang=$YNH_APP_ARG_LANG lang=$YNH_APP_ARG_LANG
@ -46,7 +47,7 @@ else
echo "Installing odoo" echo "Installing odoo"
ynh_app_setting_set "$app" version "$odoo_version" ynh_app_setting_set "$app" version "$version"
ynh_app_setting_set "$app" instance "master" ynh_app_setting_set "$app" instance "master"
# Install Odoo # Install Odoo
@ -55,7 +56,7 @@ else
# Install Odoo # Install Odoo
sudo curl -sS https://nightly.odoo.com/odoo.key | sudo apt-key add - sudo curl -sS https://nightly.odoo.com/odoo.key | sudo apt-key add -
sudo sh -c "echo 'deb http://nightly.odoo.com/${odoo_version}/nightly/deb/ ./' > /etc/apt/sources.list.d/odoo.list" sudo sh -c "echo 'deb http://nightly.odoo.com/${version}/nightly/deb/ ./' > /etc/apt/sources.list.d/odoo.list"
sudo apt-get update sudo apt-get update
# Initialize installation # Initialize installation