Skip to content

Commit c23a0cf

Browse files
Merge pull request #19 from Silmar/master
Funciona novamente
2 parents aeacae8 + faac0b5 commit c23a0cf

1 file changed

Lines changed: 181 additions & 56 deletions

File tree

install_odoo_trustcodebr.sh

Lines changed: 181 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/bash
22

3-
ODOO_VERSION='10'
3+
ODOO_VERSION='11'
44

55
echo "Esse script é focado na instalação do odoo V.$ODOO_VERSION"
66
echo "com o foco em desenvolvimento."
@@ -53,7 +53,7 @@ sudo apt-get install --no-install-recommends python-libxml2 -y
5353
sudo apt-get install --no-install-recommends libxmlsec1-dev -y
5454
sudo apt-get install --no-install-recommends python-openssl -y
5555
sudo apt-get install --no-install-recommends python-cffi -y
56-
56+
sudo apt-get install --no-install-recommends libxmlsec1-opensslopenssl
5757
echo "==== Instalando dependências do WKHTMLTOX ===="
5858
sudo apt-get install --no-install-recommends zlib1g-dev -y
5959
sudo apt-get install --no-install-recommends fontconfig -y
@@ -67,63 +67,174 @@ wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.1/wkhtmlt
6767
sudo dpkg -i ~/wkhtmltox-0.12.1_linux-trusty-amd64.deb
6868

6969
echo "==== Instalação dependências pip para os módulos ===="
70-
sudo -H pip install --upgrade pip
71-
sudo -H pip install --upgrade setuptools
72-
sudo -H pip install Babel==1.3
73-
sudo -H pip install Jinja2==2.7.3
74-
sudo -H pip install Mako==1.0.1
75-
sudo -H pip install MarkupSafe==0.23
76-
sudo -H pip install Pillow==2.7.0
77-
sudo -H pip install Python-Chart==1.39
78-
sudo -H pip install PyYAML==3.11
79-
sudo -H pip install Werkzeug==0.9.6
80-
sudo -H pip install argparse==1.2.1
81-
sudo -H pip install decorator==3.4.0
82-
sudo -H pip install docutils==0.12
83-
sudo -H pip install feedparser==5.1.3
84-
sudo -H pip install gdata==2.0.18
85-
sudo -H pip install gevent==1.0.2
86-
sudo -H pip install greenlet==0.4.7
87-
sudo -H pip install jcconv==0.2.3
88-
sudo -H pip install lxml==3.4.1
89-
sudo -H pip install mock==1.0.1
90-
sudo -H pip install ofxparse==0.14
91-
sudo -H pip install passlib==1.6.2
92-
sudo -H pip install psutil==2.2.0
93-
sudo -H pip install psycogreen==1.0
94-
sudo -H pip install psycopg2==2.5.4
95-
sudo -H pip install pyPdf==1.13
96-
sudo -H pip install pydot==1.0.2
97-
sudo -H pip install pyparsing==2.0.3
98-
sudo -H pip install pyserial==2.7
99-
sudo -H pip install python-dateutil==2.4.0
100-
sudo -H pip install python-ldap==2.4.19
101-
sudo -H pip install python-openid==2.2.5
102-
sudo -H pip install pytz==2014.10
103-
sudo -H pip install pyusb==1.0.0b2
104-
sudo -H pip install qrcode==5.1
105-
sudo -H pip install reportlab==3.1.44
106-
sudo -H pip install requests==2.6.0
107-
sudo -H pip install six==1.9.0
108-
sudo -H pip install suds-jurko==0.6
109-
sudo -H pip install vobject==0.6.6
110-
sudo -H pip install wsgiref==0.1.2
111-
sudo -H pip install XlsxWriter==0.7.7
112-
sudo -H pip install xlwt==0.7.5
113-
sudo -H pip install openpyxl==2.4.0-b1
114-
sudo -H pip install boto==2.38.0
115-
sudo -H pip install odoorpc
116-
sudo -H pip install suds_requests
117-
sudo -H pip install pytrustnfe
118-
sudo -H pip install python-boleto
119-
sudo -H pip install python-cnab
120-
sudo -H pip install wheel
121-
sudo -H pip install http://labs.libre-entreprise.org/frs/download.php/897/pyxmlsec-0.3.1.tar.gz
70+
71+
if [ $ODOO_VERSION == '10' ]
72+
then
73+
74+
echo "======== Caso a versão a versão seja odoo 10 ========"
75+
echo "============= Virtualenv 2.7 será criado ============"
76+
77+
mkdir ~/src
78+
cd ~
79+
wget http://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz
80+
tar -zxvf Python-2.7.9.tgz
81+
cd Python-2.7.9
82+
sudo mkdir /odoopython
83+
84+
sudo ./configure --prefix=/odoopython
85+
sudo make
86+
sudo make install
87+
88+
cd ~/src
89+
wget https://pypi.python.org/packages/d4/0c/9840c08189e030873387a73b90ada981885010dd9aea134d6de30cd24cb8/virtualenv-15.1.0.tar.gz#md5=44e19f4134906fe2d75124427dc9b716
90+
tar -zxvf virtualenv-15.1.0.tar.gz
91+
cd virtualenv-15.1.0/
92+
sudo /odoopython/bin/python setup.py install
93+
mkdir ~/odooenv27
94+
/odoopython/bin/virtualenv ~/odooenv27/ve -p /odoopython/bin/python2.7
95+
source ~/odooenv27/ve/bin/activate
96+
pip install --upgrade pip
97+
pip install --upgrade setuptools
98+
pip install Babel==1.3
99+
pip install Jinja2==2.7.3
100+
pip install Mako==1.0.1
101+
pip install MarkupSafe==0.23
102+
pip install Pillow==2.7.0
103+
pip install Python-Chart==1.39
104+
pip install PyYAML==3.11
105+
pip install Werkzeug==0.9.6
106+
pip install argparse==1.2.1
107+
pip install decorator==3.4.0
108+
pip install docutils==0.12
109+
pip install feedparser==5.1.3
110+
pip install gdata==2.0.18
111+
pip install gevent==1.0.2
112+
pip install greenlet==0.4.7
113+
pip install jcconv==0.2.3
114+
pip install lxml==3.4.1
115+
pip install mock==1.0.1
116+
pip install ofxparse==0.14
117+
pip install passlib==1.6.2
118+
pip install psutil==2.2.0
119+
pip install psycogreen==1.0
120+
pip install psycopg2==2.5.4
121+
pip install pyPdf==1.13
122+
pip install pydot==1.0.2
123+
pip install pyparsing==2.0.3
124+
pip install pyserial==2.7
125+
pip install python-dateutil==2.4.0
126+
pip install python-ldap==2.4.19
127+
pip install python-openid==2.2.5
128+
pip install pytz==2014.10
129+
pip install pyusb==1.0.0b2
130+
pip install qrcode==5.1
131+
pip install reportlab==3.1.44
132+
pip install requests==2.6.0
133+
pip install six==1.9.0
134+
pip install suds-jurko==0.6
135+
pip install vobject==0.6.6
136+
pip install wsgiref==0.1.2
137+
pip install XlsxWriter==0.7.7
138+
pip install xlwt==0.7.5
139+
pip install openpyxl==2.4.0-b1
140+
pip install boto==2.38.0
141+
pip install odoorpc
142+
pip install suds_requests
143+
pip install urllib3
144+
pip install pytrustnfe
145+
pip install python-boleto
146+
pip install python-cnab
147+
pip install wheel
148+
149+
elif [ $ODOO_VERSION == '11' ]
150+
then
151+
echo "======== Caso a versão a versão seja odoo 11 ========"
152+
echo "============= Virtualenv 3.5 será criado ============"
153+
154+
mkdir ~/odooenv35
155+
sudo apt install python3-pip -y
156+
sudo pip3 install virtualenv
157+
cd ~/odooenv35
158+
mkdir envpacks
159+
cd envpacks
160+
161+
virtualenv -p /usr/bin/python3.5 ve
162+
source ve/bin/activate
163+
pip3 install --upgrade pip
164+
pip3 install --upgrade setuptools
165+
pip3 install Babel==1.3
166+
pip3 install Jinja2==2.7.3
167+
pip3 install Mako==1.0.1
168+
pip3 install MarkupSafe==0.23
169+
pip3 install Pillow==2.7.0
170+
pip3 install Python-Chart==1.39
171+
pip3 install PyYAML==3.11
172+
pip3 install Werkzeug==0.9.6
173+
pip3 install argparse==1.2.1
174+
pip3 install decorator==3.4.0
175+
pip3 install docutils==0.12
176+
pip3 install feedparser==5.1.3
177+
pip3 install gdata==2.0.18
178+
pip3 install gevent==1.0.2
179+
pip3 install greenlet==0.4.7
180+
#pip3 install jcconv==0.2.3
181+
#Versão que roda em python3 não está no repo oficial. Git it
182+
git clone https://github.com/ghyde/jcconv
183+
cd jcconv
184+
python setup.py install
185+
cd ..
186+
pip3 install lxml==3.4.1
187+
pip3 install mock==1.0.1
188+
pip3 install ofxparse==0.14
189+
pip3 install passlib==1.6.2
190+
pip3 install psutil==2.2.0
191+
pip3 install psycogreen==1.0
192+
pip3 install psycopg2==2.5.4
193+
pip3 install pyPdf==1.13
194+
pip3 install pydot==1.2.4
195+
pip3 install pyparsing==2.0.3
196+
pip3 install pyserial==2.7
197+
pip3 install python-dateutil==2.4.0
198+
pip3 install python-ldap==3.0.0b4
199+
pip3 install python-openid==2.2.5
200+
pip3 install pytz==2014.10
201+
pip3 install pyusb==1.0.0b2
202+
pip3 install qrcode==5.1
203+
pip3 install reportlab==3.1.44
204+
pip3 install requests==2.6.0
205+
pip3 install six==1.9.0
206+
pip3 install suds-jurko==0.6
207+
pip3 install vobject==0.9.5
208+
#pip3 install wsgiref==0.1.2 Already included by default(python 3)
209+
pip3 install XlsxWriter==0.7.7
210+
pip3 install xlwt==1.3.0
211+
pip3 install openpyxl==2.4.0-b1
212+
pip3 install boto==2.38.0
213+
pip3 install odoorpc
214+
#pip3 install suds_requests
215+
git clone https://github.com/armooo/suds_requests
216+
cd suds_requests/
217+
python setup.py install
218+
cd ..
219+
pip3 install urllib3
220+
#pip3 install pytrustnfe
221+
git clone https://github.com/danimaribeiro/PyTrustNFe
222+
cd PyTrustNFe/
223+
python setup.py install
224+
cd ..
225+
pip3 install python3-boleto
226+
pip3 install python3-cnab
227+
pip3 install wheel
228+
229+
fi
230+
231+
232+
122233
echo ">>> pip e seus requerimentos estão instalados. <<<"
123234

124235
echo "Clonando repositório oficial Odoo no GitHub. Isso pode demorar um bom tempo."
125236
echo "Se sua internet é lenta, recomenda-se tomar um café enquanto aguarda."
126-
git clone https://github.com/odoo/odoo.git ~/odoo
237+
git clone --depth 1 -b $ODOO_VERSION.0 https://github.com/odoo/odoo.git ~/odoo
127238

128239
echo "Terminando o arquivo de configuração, quase lá."
129240
rm ~/odoo/odoo-config
@@ -143,7 +254,7 @@ echo "db_password = 123" >> ~/odoo/odoo-config
143254

144255
echo "Clonando repositório oficial dos módulos Odoo Brasil no GitHub."
145256
echo "Agora falta pouco."
146-
git clone https://github.com/Trust-Code/odoo-brasil.git ~/odoo-brasil
257+
git clone -b $ODOO_VERSION.0 https://github.com/Trust-Code/odoo-brasil.git ~/odoo-brasil
147258

148259
echo "==== Instalação e configuração Odoo Brasil completa ===="
149260
echo "---- PostgreSQL ---- "
@@ -155,3 +266,17 @@ echo "Pasta de Addons: addons, ~/odoo/addons, ~/odoo-brasil"
155266
echo "========================================================"
156267
echo "A instalação está completa !"
157268
echo "Obrigado por usar este script !!!"
269+
echo "iniciar o sistema com os comandos"
270+
if [ $ODOO_VERSION == '10' ]
271+
then
272+
echo "source ~/odooenv27/ve/bin/activate"
273+
echo "cd ~/odoo"
274+
echo "git checkout $ODOO_VERSION.0"
275+
echo "./odoo-bin --config=odoo-config"
276+
elif [ $ODOO_VERSION == '11' ]
277+
then
278+
echo "source ~/odooenv35/ve/bin/activate"
279+
echo "cd ~/odoo"
280+
echo "git checkout $ODOO_VERSION.0"
281+
echo "./odoo-bin --config=odoo-config"
282+
fi

0 commit comments

Comments
 (0)