From 19809e08ee64dd24981ae2f5e7e5781e1918e7f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Br=C3=BCckl?= Date: Wed, 15 Apr 2015 12:41:04 +0200 Subject: [PATCH] puppet --- setup/lib/cli.py | 3 ++- setup/lib/functions.py | 8 ++++---- setup/puppet/modules/odoo/manifests/init.pp | 6 +++--- setup/restart_prod.sh | 9 +++++++++ 4 files changed, 18 insertions(+), 8 deletions(-) create mode 100755 setup/restart_prod.sh diff --git a/setup/lib/cli.py b/setup/lib/cli.py index 79454941..e670b1c6 100755 --- a/setup/lib/cli.py +++ b/setup/lib/cli.py @@ -64,7 +64,7 @@ def main(): 'setup_journals', 'set_currencies', 'set_decimal_price', - 'import_users', + 'set_translations', ] @@ -75,6 +75,7 @@ def main(): 'set_dmi_noupdate', 'dmi_confirm_inventory', 'setup_mail_server', + 'import_users', ] if cmd == 'update': diff --git a/setup/lib/functions.py b/setup/lib/functions.py index 6e8c59f1..31272e74 100755 --- a/setup/lib/functions.py +++ b/setup/lib/functions.py @@ -558,10 +558,10 @@ class CamadeusFunctions(): wizard_id = self._execute('base_import.import', 'create', vals) if wizard_id: - try: - self._execute('base_import.import', 'do',wizard_id,fields,options) - except: - pass + messages = self._execute('base_import.import', 'do',wizard_id,fields,options) + if messages: + print messages + return False return True return False diff --git a/setup/puppet/modules/odoo/manifests/init.pp b/setup/puppet/modules/odoo/manifests/init.pp index 57ac5ac5..37ec7cc8 100644 --- a/setup/puppet/modules/odoo/manifests/init.pp +++ b/setup/puppet/modules/odoo/manifests/init.pp @@ -121,7 +121,7 @@ class odoo { provider => dpkg, ensure => installed, source => "/tmp/wkhtmltox-0.12.2.1_linux-wheezy-amd64.deb", - require => File['wkhtmltox-0.12.2.1_linux-wheezy-amd64.deb'], + require => [File['wkhtmltox-0.12.2.1_linux-wheezy-amd64.deb'],Package['xfonts-base']], } package {['passlib', @@ -162,8 +162,8 @@ class odoo { # Postfix setup class { '::postfix::server': - myhostname => 'odoo.allomed.at', - mydomain => 'allomed.at', + myhostname => 'test.camadeus.at', + mydomain => 'camadeus.at', mydestination => "\$myhostname, localhost.\$mydomain, localhost, $fqdn", inet_interfaces => 'localhost', } diff --git a/setup/restart_prod.sh b/setup/restart_prod.sh new file mode 100755 index 00000000..670672b4 --- /dev/null +++ b/setup/restart_prod.sh @@ -0,0 +1,9 @@ +#!/bin/sh +# info: restart Odoo server +# author: Camadeus GmbH + +USER=x +HOST=x +INSTANCE=x + +ssh ${USER}@${HOST} "sudo service odoo-server-${INSTANCE} restart"