¡BIENVENIDO AL FORO DE ODOO ARGENTINA!

BRINDAMOS UN ESPACIO A LA COMUNIDAD ARGENTINA DE ODOO PARA CENTRALIZAR EL DEBATE, COMPARTIR IDEAS, DESARROLLOS, Y FORMAR PARTE DE UNA COMUNIDAD QUE CRECE DÍA A DÍA

¿No estás registrado?  REGISTRATE

Se marcó esta pregunta
10 Respuestas
17678 Vistas

16/09/2016---- Instalación en DigitalOcean con Ubuntu Server 14.04.05 LTS Ok! Lo voy a probar el fin de semana y les cuento si me topé con algún problema.

11/09/2016---- Instalación Ubuntu Server 14.04.05 LTS Ok!
-------------------- Instalación Odoo mediante scripts Ok!
-------------------- Localización argentina siguiendo documentación de este link https://www.odooargentina.com/forum/how-to/introduccion-1/como-configurar-localizacion-argentina-521 Ok!
 

11/09/2016 Con Ubuntu 14.04.05 LTS Ok, Corregí errores con dependencias.
26/03/2016 Solucioné las dependencias afip. por ahora no hay errores.
21/03/2016 Encontre otro problema, modulo dependencia afip, lo solucion y lo vuelvo a subir
20/03/2016 Perdón, cuando copie y pegue, no lo hice bien.

Antes que nada Gracias.

Odoo con localización Argentina y otros addons (lista para ser personalizada)

Les paso 2 scripts que tome y modifique de varios lugares. Corrigen algunos problemitas menores, tambien agregue addons que me hacian falta, espero que sirva a toda la comunidad.

Instrucciones: (sobre ubuntu server 14.04.05 LTS, tanto en virtual box como en hardware real).

Copiar los scripts en el $HOME del usuario, para esto hacen "cd $HOME" obviamente sin las comillas. Aunque los scripts se llaman install_1.sh e install_2.sh, SOLO hay que ejecutar " sudo sh install_1.sh" porque este llama a install_2.sh.

Despues de 15 minutos o mas, tenemos listo odoo con Localización Argentina lista para customizar y otros addons.

#SCRIPT install_1.sh###############################################################
# This script will install ODOO Server on
# clean Ubuntu Server 14.04.05 LTS
# -*- encoding: utf-8 -*-
################################################################################
# Actualizado para Ubuntu Server 14.04.05 LTS. Dependencias corregidas.
# Copyright (c) 2015 Luke Branch ( https://github.com/odoocommunitywidgets ) 
#               All Rights Reserved.
#               General Contact <odoocommunitywidgets@gmail.com>
#
# WARNING: This script as such is intended to be used by professional
# programmers/sysadmins who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly advised to contract a Free Software
# Service Company
#
# This script is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This script is distributed in the hope that it will be useful,
# but comes WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#
################################################################################
# DESCRIPTION: This script is designed to install all the dependencies for the aeroo-reports modules from Alistek.
# It also gives you the option of installing Odoo while you're running the script. If you don't want this just choose no when given the option.

# apt-get update
sudo aptitude update && sudo aptitude upgrade -y
sudo apt-get build-dep build-essential -y

# Install Git:
echo -e "\n---- Install Git ----"
sudo apt-get install git -y

# Install AerooLib:
echo -e "\n---- Install AerooLib ----"
sudo apt-get install python-genshi python-cairo python-lxml libreoffice-script-provider-python libreoffice-base python-cups -y
sudo apt-get install python-setuptools python3-pip -y
sudo mkdir /opt/aeroo
cd /opt/aeroo
sudo git clone https://github.com/aeroo/aeroolib.git
cd /opt/aeroo/aeroolib
sudo python setup.py install

#Crefate Init Script for OpenOffice (Headless Mode):
echo -e "\n---- create init script for LibreOffice (Headless Mode) ----"
sudo touch /etc/init.d/office
sudo su root -c "echo '### BEGIN INIT INFO' >> /etc/init.d/office"
sudo su root -c "echo '# Provides:          office' >> /etc/init.d/office"
sudo su root -c "echo '# Required-Start:    $remote_fs $syslog' >> /etc/init.d/office"
sudo su root -c "echo '# Required-Stop:     $remote_fs $syslog' >> /etc/init.d/office"
sudo su root -c "echo '# Default-Start:     2 3 4 5' >> /etc/init.d/office"
sudo su root -c "echo '# Default-Stop:      0 1 6' >> /etc/init.d/office"
sudo su root -c "echo '# Short-Description: Start daemon at boot time' >> /etc/init.d/office"
sudo su root -c "echo '# Description:       Enable service provided by daemon.' >> /etc/init.d/office"
sudo su root -c "echo '### END INIT INFO' >> /etc/init.d/office"
sudo su root -c "echo '#! /bin/sh' >> /etc/init.d/office"
sudo su root -c "echo '/usr/bin/soffice --nologo --nofirststartwizard --headless --norestore --invisible \"--accept=socket,host=localhost,port=8100,tcpNoDelay=1;urp;\" &' >> /etc/init.d/office"

# Setup Permissions and test LibreOffice Headless mode connection

sudo chmod +x /etc/init.d/office
sudo update-rc.d office defaults

# Install AerooDOCS
sudo pip3 install jsonrpc2 daemonize

echo -e "\n---- create conf file for AerooDOCS ----"
sudo touch /etc/aeroo-docs.conf
sudo su root -c "echo '[start]' >> /etc/aeroo-docs.conf"
sudo su root -c "echo 'interface = localhost' >> /etc/aeroo-docs.conf"
sudo su root -c "echo 'port = 8989' >> /etc/aeroo-docs.conf"
sudo su root -c "echo 'oo-server = localhost' >> /etc/aeroo-docs.conf"
sudo su root -c "echo 'oo-port = 8100' >> /etc/aeroo-docs.conf"
sudo su root -c "echo 'spool-directory = /tmp/aeroo-docs' >> /etc/aeroo-docs.conf"
sudo su root -c "echo 'spool-expire = 1800' >> /etc/aeroo-docs.conf"
sudo su root -c "echo 'log-file = /var/log/aeroo-docs/aeroo_docs.log' >> /etc/aeroo-docs.conf"
sudo su root -c "echo 'pid-file = /tmp/aeroo-docs.pid' >> /etc/aeroo-docs.conf"
sudo su root -c "echo '[simple-auth]' >> /etc/aeroo-docs.conf"
sudo su root -c "echo 'username = anonymous' >> /etc/aeroo-docs.conf"
sudo su root -c "echo 'password = anonymous' >> /etc/aeroo-docs.conf"

cd /opt/aeroo
sudo git clone https://github.com/aeroo/aeroo_docs.git
sudo touch /etc/init.d/office
sudo python3 /opt/aeroo/aeroo_docs/aeroo-docs start -c /etc/aeroo-docs.conf
sudo ln -s /opt/aeroo/aeroo_docs/aeroo-docs /etc/init.d/aeroo-docs
sudo update-rc.d aeroo-docs defaults
sudo service aeroo-docs restart

# Install Odoo from Source
echo -e "\n---- Install Odoo 8 from Source (Github) ----"
sudo sh $HOME/install_2.sh

# Install Aeroo Reports:
echo -e "\n---- Install Aeroo Reports Odoo Modules: ----"
cd /opt/odoo/custom

sudo git clone -b master https://github.com/aeroo/aeroo_reports.git
sudo git clone --branch 8.0 --depth 1 https://github.com/ingadhoc/odoo-argentina.git
sudo git clone --branch 8.0 --depth 1 https://github.com/ingadhoc/odoo-addons.git
sudo git clone --branch 8.0 --depth 1 https://github.com/OCA/server-tools.git
sudo git clone --branch 8.0 --depth 1 https://github.com/OCA/web.git
sudo git clone --branch 8.0 --depth 1 https://github.com/OCA/hr.git
sudo git clone --branch 8.0 --depth 1 https://github.com/OCA/margin-analysis.git
sudo git clone --branch 8.0 --depth 1 https://github.com/OCA/partner-contact.git
sudo git clone --branch 8.0 --depth 1 https://github.com/OCA/sale-workflow.git
sudo ln -s /opt/odoo/custom/aeroo_reports/* /opt/odoo/custom/addons/
sudo ln -s /opt/odoo/custom/odoo-argentina/* /opt/odoo/custom/addons/
sudo ln -s /opt/odoo/custom/odoo-addons/* /opt/odoo/custom/addons/
sudo ln -s /opt/odoo/custom/server-tools/* /opt/odoo/custom/addons/
sudo ln -s /opt/odoo/custom/web/* /opt/odoo/custom/addons/
sudo ln -s /opt/odoo/custom/hr/* /opt/odoo/custom/addons/
sudo ln -s /opt/odoo/custom/margin-analysis/* /opt/odoo/custom/addons/
sudo ln -s /opt/odoo/custom/partner-contact/* /opt/odoo/custom/addons/
sudo ln -s /opt/odoo/custom/sale-workflow/* /opt/odoo/custom/addons/
sudo pip install -r odoo-argentina/requirements.txt
sudo pip install genshi==0.6.1 BeautifulSoup geopy==0.95.1 odfpy werkzeug==0.8.3 http pyPdf xlrd pycups suds

git clone https://github.com/bmya/pyafipws.git
cd pyafipws
sudo pip install -r requirements.txt
sudo python setup.py install
chmod 777 -R /usr/local/lib/python2.7/dist-packages/pyafipws/
cd ..
sudo pip install pycups
sudo pip install M2Crypto suds

sudo git clone -b master https://github.com/aeroo/aeroo_reports.git
sudo ln -s /opt/odoo/custom/aeroo_reports/* /opt/odoo/custom/addons/

# cd /opt/odoo/custom
# sudo git clone -b master https://github.com/aeroo/aeroo_reports.git
echo -e "\n >>>>>>>>>> PLEASE RESTART YOUR SERVER TO FINALISE THE INSTALLATION (See below for the command you should use) <<<<<<<<<<"
echo -e "\n---- restart the server (sudo shutdown -r now) ----"
while true; do
    read -p "Reiniciar el servidor ahora (s/n)?" sn
    case $sn in
        [Ss]* ) sudo shutdown -r now
        break;;
        [Nn]* ) break;;
        * ) echo "Por favor responder Si o No.";;
    esac
done
#FIN SCRIPT install_1.sh############################################################

 

 

#SCRIPT install_2.sh###############################################################
# This script will install ODOO Server on
# clean Ubuntu Server 14.04.05 LTS
#!/bin/bash
################################################################################
# Actualizado para Ubuntu Server 14.04.05 LTS. Dependencias corregidas.
# Script for Installation: ODOO Saas
4/Trunk server on Ubuntu 14.04 LTS
# Author: André Schenkels, ICTSTUDIO 2014
# Forked & Modified by: Luke Branch
# Re Forked & Modified by: Christian
# LibreOffice-Python 2.7 Compatibility Script Author: Holger Brunn (https://gist.github.com/hbrunn/6f4a007a6ff7f75c0f8b)
#-------------------------------------------------------------------------------
#  
################################################################################
 
##fixed parameters
#openerp
OE_USER="odoo"
OE_HOME="/opt/$OE_USER"
OE_HOME_EXT="/opt/$OE_USER/$OE_USER-server"
# Replace for openerp-gevent for enabling gevent mode for chat
OE_SERVERTYPE="openerp-server"

#Enter version for checkout "7.0" for version 7.0, "saas-4, saas-5 (opendays version) and "master" for trunk
OE_VERSION="8.0"

#set the superadmin password
OE_SUPERADMIN="admin"
OE_CONFIG="$OE_USER-server"

#--------------------------------------------------
# Set Locale en_US.UTF-8
#--------------------------------------------------
echo -e "\n---- Set en_US.UTF-8 Locale ----"
sudo cp /etc/default/locale /etc/default/locale.BACKUP
sudo rm -rf /etc/default/locale
echo -e "* Change server config file"
sudo su root -c "echo 'LC_ALL="en_US.UTF-8"' >> /etc/default/locale"
sudo su root -c "echo 'LANG="en_US.UTF-8"' >> /etc/default/locale"
sudo su root -c "echo 'LANGUAGE="en_US:en"' >> /etc/default/locale"

#--------------------------------------------------
# Install PostgreSQL Server
#--------------------------------------------------
echo -e "\n---- Install PostgreSQL Server ----"
sudo apt-get install postgresql -y  

echo -e "\n---- PostgreSQL $PG_VERSION Settings  ----"
sudo sed -i s/"#listen_addresses = 'localhost'"/"listen_addresses = '*'"/g /etc/postgresql/9.3/main/postgresql.conf

echo -e "\n---- Creating the ODOO PostgreSQL User  ----"
sudo su - postgres -c "createuser -s $OE_USER" 2> /dev/null || true

#--------------------------------------------------
# Update Server
#--------------------------------------------------
echo -e "\n---- Update Server ----"
sudo apt-get upgrade -y
sudo apt-get update -y

#--------------------------------------------------
# Install SSH
#--------------------------------------------------
echo -e "\n---- Install SSH Server ----"
sudo apt-get install ssh -y

#--------------------------------------------------
# Install Dependencies
#--------------------------------------------------
echo -e "\n---- Install tool packages ----"
sudo apt-get install wget subversion git bzr bzrtools python-pip -y

echo -e "\n---- Install and Upgrade pip and virtualenv ----"
sudo apt-get install python-dev build-essential -y
sudo pip install --upgrade pip
sudo pip install --upgrade virtualenv
echo -e "\n---- Install pyserial and qrcode for compatibility with hw_ modules for peripheral support in Odoo ---"
sudo pip install pyserial qrcode pytz jcconv
sudo apt-get -f install -y

echo -e "\n---- Install pyusb 1.0+ not stable for compatibility with hw_escpos for receipt printer and cash drawer support in Odoo ---"
sudo pip install --pre pyusb
    
echo -e "\n---- Install python packages ----"
sudo apt-get install -y --force-yes --no-install-recommends python-gevent python-dateutil python-feedparser python-gdata python-ldap python-libxslt1 python-lxml python-mako python-openid python-psycopg2 python-pybabel python-pychart python-pydot python-pyparsing python-reportlab python-simplejson python-tz python-vatnumber python-vobject python-webdav python-werkzeug python-xlwt python-yaml python-zsi python-docutils python-psutil python-mock python-unittest2 python-jinja2 python-pypdf python-pdftools python-setuptools python-pybabel python-imaging python-matplotlib python-reportlab-accel python-openssl python-egenix-mxdatetime python-paramiko antiword python-decorator poppler-utils python-requests libpq-dev python-geoip python-markupsafe postgresql-client python-passlib vim libreoffice curl openssh-server npm python-cairo python-genshi libreoffice-script-provider-python ghostscript libldap2-dev libsasl2-dev libssl-dev libevent-dev python-svn libxslt1-dev libfreetype6-dev libjpeg8-dev libjpeg-dev nginx libcups2-dev swig python-m2crypto

# Install NodeJS and Less compiler needed by Odoo 8 Website 
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs
npm install less -y

echo -e "\n---- Install python libraries ----"
sudo pip install gdata
sudo pip install passlib
sudo pip install unidecode

echo -e "\n---- Install Other Dependencies ----"
sudo pip install graphviz bzr --upgrade
sudo apt-get install lptools make mc -y
sudo pip install gevent gevent_psycopg2 psycogreen --upgrade

echo -e "\n---- Install Wkhtmltopdf 0.12.1 ----"
sudo wget http://download.gna.org/wkhtmltopdf/0.12/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb
sudo dpkg -i wkhtmltox-0.12.1_linux-trusty-amd64.deb
sudo cp /usr/local/bin/wkhtmltopdf /usr/bin
sudo cp /usr/local/bin/wkhtmltoimage /usr/bin
    
echo -e "\n---- Create ODOO system user ----"
sudo adduser --system --quiet --shell=/bin/bash --home=$OE_HOME --gecos 'ODOO' --group $OE_USER

echo -e "\n---- Create Log directory ----"
sudo mkdir /var/log/$OE_USER
sudo chown $OE_USER:$OE_USER /var/log/$OE_USER

#--------------------------------------------------
# Install ODOO
#--------------------------------------------------
echo -e "\n==== Installing ODOO Server ===="
sudo git clone https://www.github.com/odoo/odoo --depth 1 --branch $OE_VERSION $OE_HOME_EXT/

echo -e "\n---- Create custom module directory ----"
sudo su $OE_USER -c "mkdir $OE_HOME/custom"
sudo su $OE_USER -c "mkdir $OE_HOME/custom/addons"

echo -e "\n---- Setting permissions on home folder ----"
sudo chown -R $OE_USER:$OE_USER $OE_HOME/*

echo -e "* Create server config file"
sudo touch /etc/$OE_CONFIG.conf
sudo chown $OE_USER:$OE_USER /etc/$OE_CONFIG.conf
sudo chmod 640 /etc/$OE_CONFIG.conf

echo -e "* Change server config file"
sudo su root -c "echo '[options]' >> /etc/$OE_CONFIG.conf"
sudo sed -i s/"db_host = .*"/"db_user = False"/g /etc/$OE_CONFIG.conf
sudo sed -i s/"db_host = .*"/"db_port = False"/g /etc/$OE_CONFIG.conf
sudo sed -i s/"db_user = .*"/"db_user = $OE_USER"/g /etc/$OE_CONFIG.conf
sudo sed -i s/"db_password = .*"/"db_user = False"/g /etc/$OE_CONFIG.conf
sudo sed -i s/"; admin_passwd.*"/"admin_passwd = $OE_SUPERADMIN"/g /etc/$OE_CONFIG.conf
sudo su root -c "echo 'addons_path = $OE_HOME_EXT/addons,$OE_HOME/custom/addons' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '## Server startup config - Common options' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '# Admin password for creating, restoring and backing up databases admin_passwd = admin' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '# specify additional addons paths (separated by commas)' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '## XML-RPC / HTTP - XML-RPC Configuration' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo 'xmlrpc = True' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '# Specify the TCP IP address for the XML-RPC protocol. The empty string binds to all interfaces.' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo 'xmlrpc_interface = ' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '# specify the TCP port for the XML-RPC protocol' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo 'xmlrpc_port = 8069' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '# Enable correct behavior when behind a reverse proxy' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo 'proxy_mode = True' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '## XML-RPC / HTTPS - XML-RPC Secure Configuration' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '# disable the XML-RPC Secure protocol' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo 'xmlrpcs = True' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '# Specify the TCP IP address for the XML-RPC Secure protocol. The empty string binds to all interfaces.' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo 'xmlrpcs_interface = ' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '# specify the TCP port for the XML-RPC Secure protocol' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo 'xmlrpcs_port = 8071' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '# specify the certificate file for the SSL connection' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo 'secure_cert_file = server.cert' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '# specify the private key file for the SSL connection' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo 'secure_pkey_file = server.pkey' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '## NET-RPC - NET-RPC Configuration' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '# enable the NETRPC protocol' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo 'netrpc = False' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '# specify the TCP IP address for the NETRPC protocol' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo 'netrpc_interface = 127.0.0.1' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '# specify the TCP port for the NETRPC protocol' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo 'netrpc_port = 8070' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '## WEB - Web interface Configuration' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '# Filter listed database REGEXP' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo 'dbfilter = .*' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '## Static HTTP - Static HTTP service' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '# enable static HTTP service for serving plain HTML files' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo 'static_http_enable = False' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '# specify the directory containing your static HTML files (e.g '/var/www/')' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo 'static_http_document_root = None' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '# specify the URL root prefix where you want web browsers to access your static HTML files (e.g '/')' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo 'static_http_url_prefix = None' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '## Testing Group - Testing Configuration' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '# Launch a YML test file.' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo 'test_file = False' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '# If set, will save sample of all reports in this directory.' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo 'test_report_directory = False' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '# Enable YAML and unit tests.' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '## Server startup config - Common options' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo 'test_disable = False' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '# Commit database changes performed by YAML or XML tests.' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo 'test_commit = False' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '## Logging Group - Logging Configuration' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '# file where the server log will be stored (default = None)' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo 'logfile = /var/log/$OE_USER/$OE_CONFIG$1.log' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '# do not rotate the logfile' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo 'logrotate = True' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '# Send the log to the syslog server' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo 'syslog = False' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '# setup a handler at LEVEL for a given PREFIX. An empty PREFIX indicates the root logger. This option can be repeated. Example: "openerp.orm:DEBUG" or "werkzeug:CRITICAL" (default: ":INFO")' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo 'log_handler = ["[':INFO']"]' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '# specify the level of the logging. Accepted values: info, debug_rpc, warn, test, critical, debug_sql, error, debug, debug_rpc_answer, notset' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo '#log_level = debug' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo 'log_level = info' >> /etc/$OE_CONFIG.conf"


echo -e "* Create startup file"
sudo su root -c "echo '#!/bin/sh' >> $OE_HOME_EXT/start.sh"
sudo su root -c "echo 'sudo -u $OE_USER $OE_HOME_EXT/$OE_SERVERTYPE --config=/etc/$OE_CONFIG.conf' >> $OE_HOME_EXT/start.sh"
sudo chmod 755 $OE_HOME_EXT/start.sh

#--------------------------------------------------
# Adding ODOO as a deamon (initscript)
#--------------------------------------------------

echo -e "* Create init file"
echo '#!/bin/sh' >> ~/$OE_CONFIG
echo '### BEGIN INIT INFO' >> ~/$OE_CONFIG
echo '# Provides: $OE_CONFIG' >> ~/$OE_CONFIG
echo '# Required-Start: $remote_fs $syslog' >> ~/$OE_CONFIG
echo '# Required-Stop: $remote_fs $syslog' >> ~/$OE_CONFIG
echo '# Should-Start: $network' >> ~/$OE_CONFIG
echo '# Should-Stop: $network' >> ~/$OE_CONFIG
echo '# Default-Start: 2 3 4 5' >> ~/$OE_CONFIG
echo '# Default-Stop: 0 1 6' >> ~/$OE_CONFIG
echo '# Short-Description: Enterprise Business Applications' >> ~/$OE_CONFIG
echo '# Description: ODOO Business Applications' >> ~/$OE_CONFIG
echo '### END INIT INFO' >> ~/$OE_CONFIG
echo 'PATH=/bin:/sbin:/usr/bin' >> ~/$OE_CONFIG
echo "DAEMON=$OE_HOME_EXT/$OE_SERVERTYPE" >> ~/$OE_CONFIG
echo "NAME=$OE_CONFIG" >> ~/$OE_CONFIG
echo "DESC=$OE_CONFIG" >> ~/$OE_CONFIG
echo '' >> ~/$OE_CONFIG
echo '# Specify the user name (Default: odoo).' >> ~/$OE_CONFIG
echo "USER=$OE_USER" >> ~/$OE_CONFIG
echo '' >> ~/$OE_CONFIG
echo '# Specify an alternate config file (Default: /etc/openerp-server.conf).' >> ~/$OE_CONFIG
echo "CONFIGFILE=\"/etc/$OE_CONFIG.conf\"" >> ~/$OE_CONFIG
echo '' >> ~/$OE_CONFIG
echo '# pidfile' >> ~/$OE_CONFIG
echo 'PIDFILE=/var/run/$NAME.pid' >> ~/$OE_CONFIG
echo '' >> ~/$OE_CONFIG
echo '# Additional options that are passed to the Daemon.' >> ~/$OE_CONFIG
echo 'DAEMON_OPTS="-c $CONFIGFILE"' >> ~/$OE_CONFIG
echo '[ -x $DAEMON ] || exit 0' >> ~/$OE_CONFIG
echo '[ -f $CONFIGFILE ] || exit 0' >> ~/$OE_CONFIG
echo 'checkpid() {' >> ~/$OE_CONFIG
echo '[ -f $PIDFILE ] || return 1' >> ~/$OE_CONFIG
echo 'pid=`cat $PIDFILE`' >> ~/$OE_CONFIG
echo '[ -d /proc/$pid ] && return 0' >> ~/$OE_CONFIG
echo 'return 1' >> ~/$OE_CONFIG
echo '}' >> ~/$OE_CONFIG
echo '' >> ~/$OE_CONFIG
echo 'case "${1}" in' >> ~/$OE_CONFIG
echo 'start)' >> ~/$OE_CONFIG
echo 'echo -n "Starting ${DESC}: "' >> ~/$OE_CONFIG
echo 'start-stop-daemon --start --quiet --pidfile ${PIDFILE} \' >> ~/$OE_CONFIG
echo '--chuid ${USER} --background --make-pidfile \' >> ~/$OE_CONFIG
echo '--exec ${DAEMON} -- ${DAEMON_OPTS}' >> ~/$OE_CONFIG
echo 'echo "${NAME}."' >> ~/$OE_CONFIG
echo ';;' >> ~/$OE_CONFIG
echo 'stop)' >> ~/$OE_CONFIG
echo 'echo -n "Stopping ${DESC}: "' >> ~/$OE_CONFIG
echo 'start-stop-daemon --stop --quiet --pidfile ${PIDFILE} \' >> ~/$OE_CONFIG
echo '--oknodo' >> ~/$OE_CONFIG
echo 'echo "${NAME}."' >> ~/$OE_CONFIG
echo ';;' >> ~/$OE_CONFIG
echo '' >> ~/$OE_CONFIG
echo 'restart|force-reload)' >> ~/$OE_CONFIG
echo 'echo -n "Restarting ${DESC}: "' >> ~/$OE_CONFIG
echo 'start-stop-daemon --stop --quiet --pidfile ${PIDFILE} \' >> ~/$OE_CONFIG
echo '--oknodo' >> ~/$OE_CONFIG
echo 'sleep 1' >> ~/$OE_CONFIG
echo 'start-stop-daemon --start --quiet --pidfile ${PIDFILE} \' >> ~/$OE_CONFIG
echo '--chuid ${USER} --background --make-pidfile \' >> ~/$OE_CONFIG
echo '--exec ${DAEMON} -- ${DAEMON_OPTS}' >> ~/$OE_CONFIG
echo 'echo "${NAME}."' >> ~/$OE_CONFIG
echo ';;' >> ~/$OE_CONFIG
echo '*)' >> ~/$OE_CONFIG
echo 'N=/etc/init.d/${NAME}' >> ~/$OE_CONFIG
echo 'echo "Usage: ${NAME} {start|stop|restart|force-reload}" >&2' >> ~/$OE_CONFIG
echo 'exit 1' >> ~/$OE_CONFIG
echo ';;' >> ~/$OE_CONFIG
echo '' >> ~/$OE_CONFIG
echo 'esac' >> ~/$OE_CONFIG
echo 'exit 0' >> ~/$OE_CONFIG

echo -e "* Security Init File"
sudo mv ~/$OE_CONFIG /etc/init.d/$OE_CONFIG
sudo chmod 755 /etc/init.d/$OE_CONFIG
sudo chown root: /etc/init.d/$OE_CONFIG

echo -e "* Create service   sudo service $OE_SERVERTYPE start"
sudo update-rc.d $OE_SERVERTYPE defaults

echo -e "* Open ports in UFW for openerp-gevent"
sudo ufw allow 8072
echo -e "* Open ports in UFW for openerp-server"
sudo ufw allow 8069

echo -e "* Start ODOO on Startup"
sudo update-rc.d $OE_CONFIG defaults

echo "Terminado ODOO server ya puede iniciarse con /etc/init.d/$OE_CONFIG"
echo "Reiniciar el equipo para que Wkhtmltopdf trabaje correctamente."
echo "Despues de reiniciar podras utilizar Odoo accediendo a http://[your server's IP address]:8069"
#FIN SCRIPT install_2.sh########################################################

Avatar
Descartar

deberias agregar en alguna parte: sudo pip install pysimplesoap fpdf pyafipws que sino no se instala el modulo fiscal.

deberias agregar en alguna parte: sudo pip install pysimplesoap fpdf pyafipws que sino no se instala el modulo fiscal.

Autor

Listo!, agregado.

Despues de terminar de correr el script pide reiniciar, reinicio pero no puedo entrar localhost:8069 faltara algo mas ? fue sobre una instalacion limpia de ubuntu 14.04 cree los dos scripts en la carpeta personal y corri sudo sh install_1.sh. espero alguna ayuda. gracias por colaborar

Autor

Nicolas, desde terminal de ubuntu ejecuta y analizá tail -f /var/log/odoo/odoo-server.log ó sudo service odoo-server restar y fíjate como reincia el servidor

Mejor respuesta

Hola Amigos, este script está vigente todavía? o hay algo nuevo para odoo 10? gracias

Avatar
Descartar
Mejor respuesta

Hola Christian,

Muy bueno tu trabajo, gracias por compartirlo!

Saludos,

Leandro

Avatar
Descartar
Autor

Gracias, hay que mejorarlo, seguro debe tener cosas que no tienen sentido, pero tal como esta a mi me funcionó, sin exagerar ni mentir, voy por la instalación numero 60, no porque tenga 60 clientes, sino porque necesitaba capacitarme antes de largarme a ofrecer soluciones con odoo.

Exitos!

Gracias Cristhian por tu trabajo. Esta instalacion funciona sin docker y sin Virtual?

Mejor respuesta

Buenas noches,

Espero poder ayudarles con este script que hice basado en el escript de Yenthe y Yelizariev.

https://github.com/rcastro-tyc/odoo-install-script/tree/odoo-argentina

Saludos !

 

Avatar
Descartar
Mejor respuesta

Buenos dias! Gracias por el explicativo! y compartir... Una pregunta... estos repositorios son para crear una pagina web?

 

 

Avatar
Descartar

Es que baje tambien, y configure en el .conf, pero me da error... Creo tengo que bajar de la forma como dices... y leer el programa, para entender lo que esta haciendo...

Autor

server-tools y web son módulos requeridos por la localización Argentina y si tienen que ver con la parte web de Odoo. La búsqueda y modificación de los scripts que publique arriba fue por que tenia problemas para instalar Odoo + localización en un entorno real, sin Docker, sin Virtual, etc. Básicamente el procedimiento es el siguiente: 1) Ubuntu Server 14.04 limpio (esto quiere decir recién instalado sin actualizaciones ni nada). 2) Copio los 2 scripts en mi $HOME, en mi caso /home/christian/install_1.sh y /home/christian/install_2.sh. 3) IMPORTANTE, solo ejecutar el script install_1.sh. Este script actualiza Ubuntu, instala GiT, Aeroolib, dependencias openoffice, Aerodocs, dispara el segundo script install_2.sh que baja odoo, Aero reports, descarga odio-argentina, y modelos necesarios (para mi instalación, addons de recursos humanos, addon de webcam etc y finaliza. 4) install_2.sh baja e instala odoo 8, postgresql, ssh server y otras dependencias por ejemplo wkhtmltox, gdata etc. 5) install_2.sh genera archivo conf básico (ese conf a mi me funciono). 6) instaló_2.sh crea el demonio / servicio 7) install_2.sh finaliza y regresa a install_1.sh donde baja y copia los addons que yo necesito, con algun que otro requerimiento mas.

Gracias! Ok... por la explicación... Exitos!

Mejor respuesta

Buenas.. Exlente los scripts.
Lo use un par de veces y anduvo de 10, pero ahora estoy teniendo un problema con install_1.sh en la línea(73)
:$ sudo pip3 install jsonrpc2 daemonize

Cuando se ejecuta me muestra error de compilacion o algo por el estilo. Este es el error

:$ sudo pip3 install jsonrpc2 daemonize
Downloading/unpacking jsonrpc2
  Downloading jsonrpc2-0.4.1-py2.py3-none-any.whl
Downloading/unpacking daemonize
  Downloading daemonize-2.4.6-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): six in /usr/lib/python3/dist-packages (from jsonrpc2)
Installing collected packages: jsonrpc2, daemonize
*** Error compiling '/tmp/pip_build_root/jsonrpc2/jsonrpc2/cmd.py'...
  File "/tmp/pip_build_root/jsonrpc2/jsonrpc2/cmd.py", line 15
    print 'runserver %s:%d' % (host, port)
                          ^
SyntaxError: invalid syntax

*** Error compiling '/tmp/pip_build_root/jsonrpc2/jsonrpc2/gae.py'...
  File "/tmp/pip_build_root/jsonrpc2/jsonrpc2/gae.py", line 49
    except ValueError, e:
                     ^
SyntaxError: invalid syntax

Successfully installed jsonrpc2 daemonize
Cleaning up...

Está corriendo sobre un server ubuntu 14.04 en amazon.

¿¿¿Hay error de compilacion pero lo instala bien??

¿Alguna idea?

Gracias.

Avatar
Descartar
Autor

Oscar, esos script's los use para instalarlo sobre VirtualBox con Ubuntu Server 14.04 LTS para desarrollo / evaluación y sobre maquina real i7 con Ubuntu Server 14.04 LTS para producción. Ambos casos instala sin problemas. Actualmente estamos implementando Almacén, Compras y logística en producción. Producción en desarrollo.

Autor

Oscar, esos script's los use para instalarlo sobre VirtualBox con Ubuntu Server 14.04 LTS para desarrollo / evaluación y sobre maquina real i7 con Ubuntu Server 14.04 LTS para producción. Ambos casos instala sin problemas. Actualmente estamos implementando Almacén, Compras y logística en producción. Producción en desarrollo.

Autor

Tengo en producción, los módulos: Almacen, Compras y Logística. Tengo en desarrollo, el módulo Producción. Estoy en un empresa gráfica, la primer etapa son los módulos que arriba te comento. Las etapas siguientes son los módulos de Ventas, ya que este rubro necesita presupuestos personalizados

Autor

Tengo en producción, los módulos: Almacen, Compras y Logística. Tengo en desarrollo, el módulo Producción. Estoy en un empresa gráfica, la primer etapa son los módulos que arriba te comento. Las etapas siguientes son los módulos de Ventas, ya que este rubro necesita presupuestos personalizados

Autor

Hice modificaciones, o mejor dicho arreglé un para de lineas. donde jsonrpc con Ubuntu 14.04.05 generaban error.

Mejor respuesta

Alguien tiene idea si los scripts funcionan con Ubuntu de AWS o tengo que instalarle algo antes? Mil gracias!

Avatar
Descartar
Mejor respuesta

Buenas!

Alguien ajusto estos scripts para ODOO 9.0 ??

Avatar
Descartar
Mejor respuesta

Muy bueno, lo dejé instalando de la noche a la mañana en una VM con Lubuntu 14.04.4 LTS y salió andando.

Un par de observaciones.

El OS estaba en castellano y me lo cambió a inglés. Tiró un cartel para cambiar todos los directorios de Musica > Music, y asi.

Le di que si a los cambios para probar que ande. A mi no me jode, sobre todo en un server pero por ahi es algo a tener en cuenta si va dirigido a .ar

El Odoo apareció configurado por defecto en Zona horaria Bruselas y tira conflicto horario. Se cambia facil.

Pequeños detalles.

Voy a seguir probando y subo lo q encuentre.

 

 

Avatar
Descartar
Mejor respuesta

todo de maravilla, la verdad que muy buen par de scripts!

Avatar
Descartar
Mejor respuesta

Excelente trabajo Christian,

Les comentamos a todos que en la sección de blog está publicado una actualización de como instalar Odoo 9 mediante un script.

Les copio el link:

https://www.odooargentina.com/blog/blog-1/post/instalando-odoo-utilizando-virtualenv-35

Saludos!

Avatar
Descartar