From 8fb92faf8dd5a8699b36c824bd9f9ad5bae3617b Mon Sep 17 00:00:00 2001 From: ljf Date: Wed, 26 Sep 2018 20:40:40 +0200 Subject: [PATCH] [fix] Be able to install each versions --- scripts/.restore.swp => .README.md.swp | Bin 12288 -> 12288 bytes README.md | 39 ++++++++++--------------- check_process | 2 +- conf/odoo.service.j2 | 2 +- conf/openerp-server.conf.j2 | 1 + manifest.json | 9 ++++-- scripts/_common.sh | 15 +++++++++- scripts/install | 9 ++++-- 8 files changed, 45 insertions(+), 32 deletions(-) rename scripts/.restore.swp => .README.md.swp (78%) diff --git a/scripts/.restore.swp b/.README.md.swp similarity index 78% rename from scripts/.restore.swp rename to .README.md.swp index 85dbe9a7be1da0f5c833f67db57cd8764770982c..20a7e42a234b7c11727770f60f84377a959c7bb4 100644 GIT binary patch literal 12288 zcmeHNO>Y}T7@qb*fmT#}9Fg9*6$LBa?FXV&D3+YWO)TOM*-op#0gZQO?M-%fRy(se z?tzaVz`x)G`~-U9jF9*R+~5F5;J}4vcGqdsO0Bs8nw6exc6R2S_kG^yeVxcNxq7$L zrCZKbhU+3@_kaBQ!*BR`Hhi72=rAy&&%Dwwley4ZJY(i3Fz9YeFONl{mAfT<;V$w- z&ZN>VPgCVeU&@ab$;=(LTie~X6Z_9FXjJxR{aR7#muhSD%FFw! zth9411C{~HfMvikU>UFsSOzQumVy5X13Ep!K1D2Nt9UL~_cM>(t4DjY3|Iy%1C{~H zfMvikU>UFsSOzQumI2FvW#B)^0LM4%YtJ$EJz&27U;h99*Gr830sIa;0KNr2zrfgM zz=QL62EGEm0B*j>*gJrFfw2sD8@LGk@;qZd13v)Y0bc?EAb<~m9&i>o1N?f9v7dm; zz$M^S;2iK<<(u*EH9U`S|I_$tFUx>sz%pPNunhdW80d*(O&^O)g)$+Y3Ca^+WVE+4 z*lXOtLAyQ3RUG)Yw1+u;l)}LnQMwdPb8jDjE!fQkMnt? zW-^a_nh4^PNRXDKgw9h!oXc~3bltg0ZypMzLh%+&V5d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BRW%3MfI@10XWkc;s5{u literal 12288 zcmeI2L2nyH6vwAXAZRHdIB}t`wk2AGchYic8*)e;msnNoDoH_6R955NvAyYfXR|Y# zG%5k90&zh|oZ#FOMCe5}S)nW59K-VxW7*Azn-B2jdylbrYf!Wv`J_>%a%qe_!tz5nmZ9#*kn>0l^x~yh?wNl&ql5b#sepj*?|QwLtBAKi;nz$xGq za0)mDoB~b(r+`zyDc}@v3OEIv0{=q=M9A1P&obschsERn|K<1pKVM|*5AZwq1v~~{ zfV*G|ybtbxd2ky1_yS`OK@R#r01uo2Kc8jn8}J#}12NbHJ#ZD^-;(TU@ayx8eGR?> zAAt8j3%m+`I>XoxU>{rt=fG>=uhWb@0^fqq!KdI8@G;m1t6(0S1HU20$KX5g2z&`1 z00a8qHdq3ez#QP9(4`67;}mcTI0c*nP64OD306RBwJVG-lF%a^&pK#Q<--muT`x55hiWXMgmaHKCu^wF>g0wdl~!z!CxMAnLI-7`3m54=`Gi5BCTn=so0Z{HArfD+vL-ZfI8|hK!nV)frH6_Z6A025V{ZlrUy1*QOMcY;e{a z)F7?KlE#tNQ8KjNWQ_7FR~U@cZc^p)T2&ZUrSj8u%&&THaGTe3=#Tos3Ut6pbJecz znq4H{5gCu8zP+x?E6bU5*tTdun^bF5#ap8VGFdL^&OAY|oPrMtKFtk ziz@!AQ*I`u4)}j?6SRjNSCR5)RGC7ds+~MZYNO#$?ykP~J6bGZ~5`pbr&| z4*aAfERVYb|!^db`wd={R1QyjQ4EoMCC+kE38=u52pW z7aA9ex0v _AReqvhOBA<$S=$IM1YVbtt!-h>PssUK( zLSv)5?4!c`PIqm6vD<3<#i5FCy9mu>BK477rd6H=l01)3Bh}S4cRx_$u}VBWI@D^A v8yr(JRy@}k*CU)cPcG7rWSpX)Q2w2EkK+`-sz&T@<{Nro diff --git a/README.md b/README.md index 8ff65e4..ba02fbd 100644 --- a/README.md +++ b/README.md @@ -5,39 +5,32 @@ Odoo is a suite of web based open source business apps. The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management, ... -Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get -a full-featured Open Source ERP when you install several Apps. +Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps. Odoo for YunoHost ---------------------------- -Warning: This YunoHost app is still in development. Use it at your own risk! I am **not** responsible for any data loss that jeopardizes your organization +**WARNING**: This YunoHost app is working BUT there is a lot of use case, it's very complex to test all of it. Use it at your own risk! I am **not** responsible for any data loss that jeopardizes your organization. THIS PACKAGE IS NOT AN OFFICIAL PACKAGE FROM Odoo SA BUT IT USES OFFICIAL DEBIAN PACKAGE FROM NIGHTLY REPOSITORY FROM Odoo SA. +**WARNING**: Odoo is a complex app. **DO NOT USE THIS PACKAGE** to run your business unless you know what you are doing!!! If you don't, you should consider to ask for help from a professionnal! -**WARNING**: Odoo is a complex app. **DO NOT USE IT** to run your business unless you know what you are doing!!! If you don't, use the hosted Odoo that will give you peace and customer support! - - -**Important:** This app MUST be installed on a domain's root! +**IMPORTANT:** This app MUST be installed on a domain's root! https://odoo.example.com/ will work https://example.com/odoo/ will NOT work -What does not work ------------------- -- Backup and restore via Odoo (works with a trick shared on the Github) +To connect on your odoo +----------- +- Go on https://YOURDOMAIN/web +- Use your master password OR admin/admin if you use Odoo 8.0 -Still to do +Contribute ----------- See the project here : https://github.com/YunoHost-Apps/odoo_ynh/projects/1 +About jessie support +----------- +This app should be able to setup on yunohost 2.7 (jessie) but I am not able to test this point. Some dependencies issues could appears, feel free to create an issue, with the log message. -Configuration -------------- - -**Backup via Odoo** -- Access Odoo -- Go to manage databases and backup - -**Restore via Odoo** -- Access Odoo -- Go to manage databases and delete the old database -- Restore -- **Important!** The database must be named "*subdomain-domain-tld*" (for example *erp-test-com* if you access the database via *erp.test.com* +About licences +----------- +Odoo 8.0 is under AGPL-3.0 +Next version are under LGPL-3.0 diff --git a/check_process b/check_process index 594f369..76a26b5 100644 --- a/check_process +++ b/check_process @@ -28,7 +28,7 @@ Level 1=auto Level 2=auto Level 3=auto - Level 4=0 + Level 4=1 Level 5=auto Level 6=auto Level 7=auto diff --git a/conf/odoo.service.j2 b/conf/odoo.service.j2 index c6ba300..6c34902 100644 --- a/conf/odoo.service.j2 +++ b/conf/odoo.service.j2 @@ -6,7 +6,7 @@ After=network.target Type=simple User=odoo Environment=PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin -ExecStart={{ bin_file }} --config {{ conf_file }} > /var/log/odoo/odoo-server.log 2>&1 +ExecStart={{ bin_file }} --config {{ conf_file }} --logfile /var/log/odoo/odoo-server.log Restart=always RestartSec=3 diff --git a/conf/openerp-server.conf.j2 b/conf/openerp-server.conf.j2 index 68ec4d5..c1ed393 100644 --- a/conf/openerp-server.conf.j2 +++ b/conf/openerp-server.conf.j2 @@ -9,3 +9,4 @@ db_password = {{ dbpass }} addons_path = {{ source_path }}addons proxy_mode = true dbfilter = ^{{ database }}$ +logfile = /var/log/odoo/odoo-server.log diff --git a/manifest.json b/manifest.json index 8ea90ae..d6d0f7b 100644 --- a/manifest.json +++ b/manifest.json @@ -7,12 +7,15 @@ "fr": "Odoo est une collection d'apps de gestion d'entreprise (ERP : CRM, Comptabilité, Point de Vente, RH, Achats, ...)." }, "maintainer": { - "name": "scith, ljf", - "email": "ljf+yunohost@grimaud.me" + "name": "ljf", + "email": "ljf+ynh-odoo@reflexlibre.net" + }, + "previous_maintainers": { + "name": "scith" }, "version": "11.0-1", "url": "https://www.odoo.com", - "license": "LGPL-3.0", + "license": "LGPL-3.0,AGPL-3.0", "requirements": { "yunohost": ">= 2.6.0" }, diff --git a/scripts/_common.sh b/scripts/_common.sh index 9bed636..b0830c2 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -94,7 +94,19 @@ function install_dependencies() { fi if is_stretch ; then sudo echo "deb http://http.debian.net/debian stretch-backports main" | sudo tee /etc/apt/sources.list.d/stretch-backport.list - apt-get update + if [ $(echo "$odoo_version <= 10" | bc) -ne 0 ]; then + cat > /tmp/python-pypdf_1.13_all.control << EOF # Make a control file for equivs-build +Section: python +Package: python-pypdf +Version: 1.13 +Description: fake package to provide python-pypdf +EOF + ynh_package_install python3-pip + ynh_package_install_from_equivs /tmp/python-pypdf_1.13_all.control + rm /tmp/python-pypdf_1.13_all.control + pip install pyPdf + fi + apt update ynh_install_app_dependencies curl postgresql odoo xfonts-75dpi xfonts-base wkhtmltopdf node-less python-xlrd python3-dev gcc libldap2-dev libssl-dev libsasl2-dev python3-pip python3-num2words python3-pyldap python3-phonenumbers fi @@ -124,6 +136,7 @@ function add_services() { if ! grep "^odoo:$" /etc/yunohost/services.yml; then ynh_configure odoo.service /etc/systemd/system/odoo.service rm /etc/init.d/odoo + systemctl daemon-reload yunohost service add odoo --log /var/log/odoo/odoo-server.log yunohost service stop odoo diff --git a/scripts/install b/scripts/install index 6239a16..0c67829 100644 --- a/scripts/install +++ b/scripts/install @@ -58,11 +58,14 @@ function setup_database() { # Setup database: not working database=${domain//./-} + if [ $(echo "$odoo_version <= 8" | bc) -ne 0 ]; then + su -c "createdb -O $APPNAME $database" - postgres + fi # Load translation - $bin_file -c $conf_file --stop-after-init -i auth_ldap -d $database - $bin_file -c $conf_file --stop-after-init -d $database --load-language $lang + sudo -u odoo $bin_file -c $conf_file --stop-after-init -i auth_ldap -d $database + sudo -u odoo $bin_file -c $conf_file --stop-after-init -d $database --load-language $lang # Configure language, timezone and ldap - $bin_file shell -c $conf_file -d $database <<< \ + sudo -u odoo $bin_file shell -c $conf_file -d $database <<< \ " self.change_password('admin','$admin_password') self.env.cr.commit()