1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/libreerp_ynh.git synced 2024-09-03 19:36:13 +02:00

[fix] Be able to install each versions

This commit is contained in:
ljf 2018-09-26 20:40:40 +02:00
parent 31f7868194
commit 8fb92faf8d
8 changed files with 45 additions and 32 deletions

View file

@ -5,39 +5,32 @@ Odoo is a suite of web based open source business apps.
The main Odoo Apps include an <a href="https://www.odoo.com/page/crm">Open Source CRM</a>, <a href="https://www.odoo.com/page/website-builder">Website Builder</a>, <a href="https://www.odoo.com/page/e-commerce">eCommerce</a>, <a href="https://www.odoo.com/page/project-management">Project Management</a>, <a href="https://www.odoo.com/page/accounting">Billing &amp; Accounting</a>, <a href="https://www.odoo.com/page/point-of-sale">Point of Sale</a>, <a href="https://www.odoo.com/page/employees">Human Resources</a>, Marketing, Manufacturing, Purchase Management, ... The main Odoo Apps include an <a href="https://www.odoo.com/page/crm">Open Source CRM</a>, <a href="https://www.odoo.com/page/website-builder">Website Builder</a>, <a href="https://www.odoo.com/page/e-commerce">eCommerce</a>, <a href="https://www.odoo.com/page/project-management">Project Management</a>, <a href="https://www.odoo.com/page/accounting">Billing &amp; Accounting</a>, <a href="https://www.odoo.com/page/point-of-sale">Point of Sale</a>, <a href="https://www.odoo.com/page/employees">Human Resources</a>, Marketing, Manufacturing, Purchase Management, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured <a href="https://www.odoo.com">Open Source ERP</a> when you install several Apps.
a full-featured <a href="https://www.odoo.com">Open Source ERP</a> when you install several Apps.
Odoo for YunoHost 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 <a href="https://www.odoo.com/fr_FR/pricing-online#num_users=1&custom_apps=0">the hosted Odoo</a> 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://odoo.example.com/ will work
https://example.com/odoo/ will NOT work https://example.com/odoo/ will NOT work
What does not work To connect on your odoo
------------------ -----------
- Backup and restore via Odoo (works with a trick shared on the Github) - 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 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 About licences
------------- -----------
Odoo 8.0 is under AGPL-3.0
**Backup via Odoo** Next version are under LGPL-3.0
- 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*

View file

@ -28,7 +28,7 @@
Level 1=auto Level 1=auto
Level 2=auto Level 2=auto
Level 3=auto Level 3=auto
Level 4=0 Level 4=1
Level 5=auto Level 5=auto
Level 6=auto Level 6=auto
Level 7=auto Level 7=auto

View file

@ -6,7 +6,7 @@ After=network.target
Type=simple Type=simple
User=odoo User=odoo
Environment=PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin 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 Restart=always
RestartSec=3 RestartSec=3

View file

@ -9,3 +9,4 @@ db_password = {{ dbpass }}
addons_path = {{ source_path }}addons addons_path = {{ source_path }}addons
proxy_mode = true proxy_mode = true
dbfilter = ^{{ database }}$ dbfilter = ^{{ database }}$
logfile = /var/log/odoo/odoo-server.log

View file

@ -7,12 +7,15 @@
"fr": "Odoo est une collection d'apps de gestion d'entreprise (ERP : CRM, Comptabilité, Point de Vente, RH, Achats, ...)." "fr": "Odoo est une collection d'apps de gestion d'entreprise (ERP : CRM, Comptabilité, Point de Vente, RH, Achats, ...)."
}, },
"maintainer": { "maintainer": {
"name": "scith, ljf", "name": "ljf",
"email": "ljf+yunohost@grimaud.me" "email": "ljf+ynh-odoo@reflexlibre.net"
},
"previous_maintainers": {
"name": "scith"
}, },
"version": "11.0-1", "version": "11.0-1",
"url": "https://www.odoo.com", "url": "https://www.odoo.com",
"license": "LGPL-3.0", "license": "LGPL-3.0,AGPL-3.0",
"requirements": { "requirements": {
"yunohost": ">= 2.6.0" "yunohost": ">= 2.6.0"
}, },

View file

@ -94,7 +94,19 @@ function install_dependencies() {
fi fi
if is_stretch ; then 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 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 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 fi
@ -124,6 +136,7 @@ function add_services() {
if ! grep "^odoo:$" /etc/yunohost/services.yml; then if ! grep "^odoo:$" /etc/yunohost/services.yml; then
ynh_configure odoo.service /etc/systemd/system/odoo.service ynh_configure odoo.service /etc/systemd/system/odoo.service
rm /etc/init.d/odoo rm /etc/init.d/odoo
systemctl daemon-reload
yunohost service add odoo --log /var/log/odoo/odoo-server.log yunohost service add odoo --log /var/log/odoo/odoo-server.log
yunohost service stop odoo yunohost service stop odoo

View file

@ -58,11 +58,14 @@ function setup_database() {
# Setup database: not working # Setup database: not working
database=${domain//./-} database=${domain//./-}
if [ $(echo "$odoo_version <= 8" | bc) -ne 0 ]; then
su -c "createdb -O $APPNAME $database" - postgres
fi
# Load translation # Load translation
$bin_file -c $conf_file --stop-after-init -i auth_ldap -d $database sudo -u odoo $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 -d $database --load-language $lang
# Configure language, timezone and ldap # 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.change_password('admin','$admin_password')
self.env.cr.commit() self.env.cr.commit()