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

[enh] Rename Odoo by LibreERP for trademark reasons

This commit is contained in:
ljf 2018-12-14 19:24:55 +01:00
parent 4e8c709cf4
commit 16d084c513
22 changed files with 240 additions and 55 deletions

View file

@ -1,36 +1,31 @@
Odoo
LibreERP
----
Odoo is a suite of web based open source business apps.
LibreERP is a suite of web based open source business apps. LibreERP is a fork of Odoo Community Edition.
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 LibreERP Apps include an Open Source CRM, Website Builder, eCommerce, Project Management, Billing &amp; 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 <a href="https://www.odoo.com">Open Source ERP</a> when you install several Apps.
LibreERP 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
LibreERP for YunoHost
----------------------------
**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**: LibreERP 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!
**IMPORTANT:** This app MUST be installed on a domain's root!
https://odoo.example.com/ will work
https://example.com/odoo/ will NOT work
https://erp.example.com/ will work
https://example.com/erp/ will NOT work
To connect on your odoo
To connect on your LibreERP
-----------
- Go on https://YOURDOMAIN/web
- Use your master password OR admin/admin if you use Odoo 8.0
- Use your master password OR admin/admin if you use LibreERP 8.0
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.
See the project here : https://github.com/YunoHost-Apps/libreerp_ynh/projects/1
About licences
-----------
Odoo 8.0 is under AGPL-3.0
LibreERP 8.0 is under AGPL-3.0
Next version are under LGPL-3.0
LibreERP is forked from Odoo Community Edition. The name is change due to Odoo trademark policy.

View file

@ -36,5 +36,5 @@
Level 9=0
Level 10=0
;;; Options
Email=ljf+odoo_ynh@reflexlibre.net
Email=ljf+libreerp_ynh@reflexlibre.net
Notification=down

5
conf/10.src Normal file
View file

@ -0,0 +1,5 @@
SOURCE_URL=https://github.com/odoo/odoo/archive/f69c004795e0a7f32d5c6243cc3d4915cf010bbe.tar.gz
SOURCE_SUM=79bfb272bc48509390386de357413e34bbb10fceee0662ca89e9e18383ed522f
SOURCE_FILENAME=odoo-10.tar.gz
SOURCE_FORMAT=tar.gz
SOURCE_SUM_PRG=sha256sum

5
conf/11.src Normal file
View file

@ -0,0 +1,5 @@
SOURCE_URL=https://github.com/odoo/odoo/archive/d129b0220eb0c76c8677c6ee0f60306f57cf2c8f.tar.gz
SOURCE_SUM=2e209236c56b78bb410639f3f0c102479c37fdb293cb51d3f6fdd6ad20fa610f
SOURCE_FILENAME=odoo-11.tar.gz
SOURCE_FORMAT=tar.gz
SOURCE_SUM_PRG=sha256sum

5
conf/12.src Normal file
View file

@ -0,0 +1,5 @@
SOURCE_URL=https://github.com/odoo/odoo/archive/206e0b71ac74147a989db60cddae801534b97bdc.tar.gz
SOURCE_SUM=a6d8d28bb7f20ac88fd149c652d7e4ce0f35241e46e7a3a347265dae0d7535fe
SOURCE_FILENAME=odoo-12.tar.gz
SOURCE_FORMAT=tar.gz
SOURCE_SUM_PRG=sha256sum

5
conf/8.src Normal file
View file

@ -0,0 +1,5 @@
SOURCE_URL=https://github.com/odoo/odoo/archive/9e8f70e4849b0eeaca8b5cf51372ecfa23dc561b.tar.gz
SOURCE_SUM=51d5db432364d272efe8c7b8f93757a63d762393a9163307f52a2f4f950ec4e6
SOURCE_FILENAME=odoo-8.tar.gz
SOURCE_FORMAT=tar.gz
SOURCE_SUM_PRG=sha256sum

5
conf/9.src Normal file
View file

@ -0,0 +1,5 @@
SOURCE_URL=https://github.com/odoo/odoo/archive/a25432cd357124242cc6e8ead19b09d58ba530ae.tar.gz
SOURCE_SUM=2e85eaaeb2609223ddda38877715aca5afb7fb8f794bef85e147e7e18e285e05
SOURCE_FILENAME=odoo-9.tar.gz
SOURCE_FORMAT=tar.gz
SOURCE_SUM_PRG=sha256sum

19
conf/app.service.j2 Normal file
View file

@ -0,0 +1,19 @@
[Unit]
Description={{ app }}
Requires=postgresql.service
After=network.target postgresql.service
[Service]
Type=simple
SyslogIdentifier={{ app }}
PermissionsStartOnly=true
User={{ app }}
Group={{ app }}
Environment=PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
ExecStart={{ bin_file }} --config {{ conf_file }} --logfile /var/log/{{ app }}.log
Restart=always
RestartSec=3
StandardOutput=journal+console
[Install]
WantedBy=multi-user.target

BIN
conf/logo_type.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

14
conf/server.conf.j2 Normal file
View file

@ -0,0 +1,14 @@
[options]
; This is the password that allows database operations:
without_demo = all
admin_passwd = {{ admin_password }}
db_host = localhost
db_port = 5432
db_user = {{ db_name }}
db_password = {{ db_pass }}
addons_path = {{ final_path }}/{{ APPNAME }}/addons,{{ final_path }}/custom-addons
proxy_mode = true
dbfilter = ^{{ db_name }}$
logfile = /var/log/{{ app }}.log
xmlrpc_interface = 127.0.0.1
netrpc_interface = 127.0.0.1

File diff suppressed because one or more lines are too long

View file

@ -2,7 +2,8 @@
# Common variables
#
export APPNAME="odoo"
export APPNAME="libreerp"
export FORKNAME="odoo"
DEPENDENCIES="curl postgresql xfonts-75dpi xfonts-base wkhtmltopdf node-less python3-dev gcc libldap2-dev libssl-dev libsasl2-dev python3-pip python3-dev python3-venv python3-wheel libxslt-dev libzip-dev python3-setuptools python-virtualenv python-wheel python-setuptools libjpeg-dev zlib1g-dev"
# Install dependencies
@ -15,7 +16,7 @@ function install_dependencies() {
ynh_setup_source /usr/
fi
pushd $final_path
if grep "python3" $final_path/$APPNAME/$APPNAME-bin ; then
if grep "python3" $final_path/$APPNAME/$FORKNAME-bin ; then
python3 -m venv venv
venv/bin/pip3 install wheel
venv/bin/pip3 install -r $APPNAME/requirements.txt

View file

@ -22,5 +22,8 @@ ynh_backup "$conf_file"
# Copy NGINX configuration
ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf"
# Backup services
ynh_backup "/etc/systemd/system/${app}.service"
# Copy database
sudo su -c "pg_dump $app" postgres > ./dump.sql

View file

@ -11,16 +11,16 @@ ynh_abort_if_errors
# Arguments from manifest
export app=$YNH_APP_INSTANCE_NAME
ynh_export domain oca admin_password lang tz
export odoo_version=$YNH_APP_ARG_VERSION
export app_version=$YNH_APP_ARG_VERSION
export is_public=0
export final_path="/var/www/$app"
export conf_file=/etc/$app/main.conf
export bin_file="$final_path/venv/bin/python $final_path/$APPNAME/$APPNAME-bin"
if [ "$odoo_version" = "9" ]; then
bin_file="$final_path/venv/bin/python $final_path/$APPNAME/$APPNAME.py"
export bin_file="$final_path/venv/bin/python $final_path/$APPNAME/$FORKNAME-bin"
if [ "$app_version" = "9" ]; then
bin_file="$final_path/venv/bin/python $final_path/$APPNAME/$FORKNAME.py"
fi
if [ "$odoo_version" = "8" ]; then
bin_file="$final_path/venv/bin/python $final_path/$APPNAME/$APPNAME.py"
if [ "$app_version" = "8" ]; then
bin_file="$final_path/venv/bin/python $final_path/$APPNAME/$FORKNAME.py"
fi
export db_name=$(ynh_sanitize_dbid $app)
export port=$(ynh_find_port 8069)
@ -39,14 +39,29 @@ ynh_webpath_register $app $domain "/"
#=================================================
function setup_files() {
ynh_setup_source $final_path/$APPNAME $odoo_version
ynh_setup_source $final_path/$APPNAME $app_version
# Remove Odoo references to avoid trademark issue
if [ -d $final_path/$APPNAME/$FORKNAME ]; then
python_app=$final_path/$APPNAME/$FORKNAME
else
python_app=$final_path/$APPNAME/openerp
fi
find $final_path/$APPNAME -type f \( -iname '*.xml' -o -iname '*.po' \) -exec sed -i 's/Powered by <a[^>]*>Odoo<\/a>//g' {} \;
find $final_path/$APPNAME -type f \( -iname '*.xml' -o -iname '*.po' \) -exec sed -i 's/<a[^>]*>Powered by <[^>]*>Odoo<\/[^>]*><\/a>//g' {} \;
find $final_path/$APPNAME -type f \( -iname '*.xml' -o -iname '*.po' \) -exec sed -i 's/Powered by <[^>]*>Odoo<\/[^>]*>//g' {} \;
find $final_path/$APPNAME -type f \( -iname '*.xml' -o -iname '*.po' \) -exec sed -i 's/Powered by <[^>]*><img[^>]*Odoo[^>]*><\/a>//g' {} \;
sed -i 's/<a[^>]*>My Odoo.com account<\/a>//g' $final_path/$APPNAME/addons/web/static/src/xml/base.xml
sed -i 's/<a[^>]*>Documentation<\/a>//g' $final_path/$APPNAME/addons/web/static/src/xml/base.xml
sed -i 's/<a[^>]*>Support<\/a>//g' $final_path/$APPNAME/addons/web/static/src/xml/base.xml
cp ../conf/logo_type.png $python_app/addons/base/static/img/logo_white.png
mkdir -p $final_path/custom-addons
chown -R $app:$app $final_path
ynh_configure server.conf $conf_file
chown $app:$app $conf_file
# Autoinstall the LDAP auth module
if ls $final_path/$APPNAME/$APPNAME-bin > /dev/null ; then
if ls $final_path/$APPNAME/$FORKNAME-bin > /dev/null ; then
ynh_replace_string "^{$" "{'auto_install': True," ${final_path}/$APPNAME/addons/auth_ldap/__manifest__.py
else
ynh_replace_string "'auto_install': False" "'auto_install': True" ${final_path}/$APPNAME/addons/auth_ldap/__openerp__.py
@ -55,7 +70,6 @@ function setup_files() {
touch /var/log/$app.log
chown $app:$app /var/log/$app.log
ynh_configure_nginx
}
function setup_database() {
@ -91,13 +105,14 @@ self.company_id.ldaps.create({
self.env.cr.commit()
"
}
ynh_save_args domain odoo_version oca lang tz final_path conf_file db_name port port_chat
ynh_save_args domain app_version oca lang tz final_path conf_file db_name port port_chat
ynh_psql_test_if_first_run
ynh_psql_setup_db $db_name $db_name
export db_pass=$(ynh_app_setting_get $app psqlpwd)
ynh_system_user_create $app $final_path
setup_files
install_dependencies
ynh_configure_nginx
add_services
setup_database
ssowat_and_restart

View file

@ -11,7 +11,6 @@ app=$YNH_APP_INSTANCE_NAME
# Retrieve app settings
domain=$(ynh_app_setting_get "$app" domain)
final_path=$(ynh_app_setting_get "$app" final_path)
database=${domain//./-}
yunohost service stop $app
yunohost service remove $app

View file

@ -10,7 +10,7 @@ ynh_abort_if_errors
export app=$YNH_APP_INSTANCE_NAME
export domain=$(ynh_app_setting_get $app domain)
export odoo_version=$(ynh_app_setting_get $app odoo_version)
export app_version=$(ynh_app_setting_get $app app_version)
export oca=$(ynh_app_setting_get $app oca)
export port=$(ynh_app_setting_get $app port)
export port_chat=$(ynh_app_setting_get $app port_chat)

View file

@ -18,7 +18,7 @@ source _common.sh
# Retrieve arguments
export app=$YNH_APP_INSTANCE_NAME
export domain=$(ynh_app_setting_get "$app" domain)
export odoo_version=$(ynh_app_setting_get "$app" odoo_version)
export app_version=$(ynh_app_setting_get "$app" app_version)
export is_master=$(ynh_app_setting_get "$app" is_master)
export oca=$(ynh_app_setting_get "$app" oca)
export port=$(ynh_app_setting_get $app port)
@ -53,10 +53,10 @@ ynh_abort_if_errors
# Zamentur version https://github.com/zamentur/odoo_ynh/commit/cdeb9afbf218431781f752dedfbf4247afbd5b44
if ynh_version_le "9.0-0" ; then
# set new args
odoo_version=${odoo_version:-$(ynh_app_setting_get "$app" version)}
app_version=${app_version:-$(ynh_app_setting_get "$app" version)}
port=${port:-8069}
oca=${oca:-false}
ynh_save_args odoo_version oca is_master port
ynh_save_args app_version oca is_master port
# Install official debian package
install_dependencies
@ -69,7 +69,7 @@ if ynh_version_le "11.0-1" ; then
fi
ynh_system_user_create $app
ynh_setup_source "$final_path/$APPNAME" $odoo_version
ynh_setup_source "$final_path/$APPNAME" $app_version
mkdir -p $final_path/custom-addons
chown -R $app:$app $final_path
ynh_configure server.conf $conf_file

View file

@ -0,0 +1,52 @@
diff --cc addons/web_settings_dashboard/static/src/xml/dashboard.xml
index f7b12769459,8509f725f97..00000000000
--- a/addons/web_settings_dashboard/static/src/xml/dashboard.xml
+++ b/addons/web_settings_dashboard/static/src/xml/dashboard.xml
@@@ -134,34 -91,19 +134,20 @@@
<t t-name="DashboardShare">
<div class="text-center o_web_settings_dashboard_share">
- <i class="fa fa-share-alt fa-4x text-muted"/>
- <div class="o_web_settings_dashboard_header">Share the Love</div>
- <div>
- <small class="text-muted text-center o_web_settings_dashboard_compact_subtitle">
- Help us spread the word: Share Odoo's awesomeness with your friends!
- </small>
- </div>
- <div class="row mt16">
- <div class="col-xs-4"><a href="#"><i class="fa fa-twitter-square fa-4x tw_share"/></a></div>
- <div class="col-xs-4"><a href="#"><i class="fa fa-facebook-square fa-4x fb_share"/></a></div>
- <div class="col-xs-4"><a href="#"><i class="fa fa-linkedin-square fa-4x li_share"/></a></div>
- </div>
- <hr/>
<t t-set="server_version" t-value="widget.data.server_version"/>
<t t-set="debug" t-value="widget.data.debug"/>
- <t t-set="demo_active" t-value="widget.data.demo_active"/>
- <div class="text-center">
- <div class="user-heading">
- <h3>
- LibreERP <t t-esc="server_version"/> <i>fork from Odoo CE</i>
- </h3>
- </div>
- <div>
- <div class="tab-content">
- <div role="tabpanel" id="settings" class="tab-pane active text-muted text-center o_web_settings_dashboard_compact_subtitle">
- <a target="_blank" href="http://www.gnu.org/licenses/lgpl.html" style="text-decoration: underline;">GNU LGPL Licensed</a></small>
+ <div class="row">
+ <div class="text-center">
+ <div class="user-heading">
+ <h3>
- Odoo <t t-esc="server_version"/>
- (Community Edition)
++ LibreERP <t t-esc="server_version"/>
+ </h3>
+ </div>
+ <div>
+ <div class="tab-content">
+ <div id="settings" class="tab-pane active text-muted text-center o_web_settings_dashboard_compact_subtitle">
- <small>Copyright © 2004-2016 <a target="_blank" href="https://www.odoo.com" style="text-decoration: underline;">Odoo S.A.</a> <a target="_blank" href="http://www.gnu.org/licenses/lgpl.html" style="text-decoration: underline;">GNU LGPL Licensed</a></small>
++ forked from Odoo CE - <a target="_blank" href="http://www.gnu.org/licenses/lgpl.html" style="text-decoration: underline;">GNU LGPL Licensed</a>
+ </div>
</div>
</div>
</div>

View file

@ -0,0 +1,13 @@
diff --git a/addons/web/static/src/js/chrome/abstract_web_client.js b/addons/web/static/src/js/chrome/abstract_web_client.js
index 20576a168f9..e64f1a5b336 100644
--- a/addons/web/static/src/js/chrome/abstract_web_client.js
+++ b/addons/web/static/src/js/chrome/abstract_web_client.js
@@ -93,7 +93,7 @@ var AbstractWebClient = Widget.extend(mixins.ServiceProvider, {
this._current_state = null;
this.menu_dm = new concurrency.DropMisordered();
this.action_mutex = new concurrency.Mutex();
- this.set('title_part', {"zopenerp": "Odoo"});
+ this.set('title_part', {"zopenerp": "LibreERP"});
},
start: function () {
var self = this;

View file

@ -0,0 +1,40 @@
diff --git a/addons/web_settings_dashboard/static/src/xml/dashboard.xml b/addons/web_settings_dashboard/static/src/xml/dashboard.xml
index b8c8f339ebd..8509f725f97 100644
--- a/addons/web_settings_dashboard/static/src/xml/dashboard.xml
+++ b/addons/web_settings_dashboard/static/src/xml/dashboard.xml
@@ -91,33 +91,19 @@
<t t-name="DashboardShare">
<div class="text-center o_web_settings_dashboard_share">
- <i class="fa fa-share-alt fa-4x text-muted" role="img" aria-label="Share" title="Share"/>
- <div class="o_web_settings_dashboard_header">Share the Love</div>
- <div>
- <small class="text-muted text-center o_web_settings_dashboard_compact_subtitle">
- Help us spread the word: Share Odoo's awesomeness with your friends!
- </small>
- </div>
- <div class="row mt16">
- <div class="col-4"><a href="#" aria-label="Twitter" title="Twitter"><i class="fa fa-twitter-square fa-4x tw_share"/></a></div>
- <div class="col-4"><a href="#" aria-label="Facebook" title="Facebook"><i class="fa fa-facebook-square fa-4x fb_share"/></a></div>
- <div class="col-4"><a href="#" aria-label="LinkedIn" title="LinkedIn"><i class="fa fa-linkedin-square fa-4x li_share"/></a></div>
- </div>
- <hr/>
<t t-set="server_version" t-value="widget.data.server_version"/>
<t t-set="debug" t-value="widget.data.debug"/>
<t t-set="demo_active" t-value="widget.data.demo_active"/>
<div class="text-center">
<div class="user-heading">
<h3>
- Odoo <t t-esc="server_version"/>
- (Community Edition)
+ LibreERP <t t-esc="server_version"/>
</h3>
</div>
<div>
<div class="tab-content">
<div role="tabpanel" id="settings" class="tab-pane active text-muted text-center o_web_settings_dashboard_compact_subtitle">
- <small>Copyright © 2004 <a target="_blank" href="https://www.odoo.com" style="text-decoration: underline;">Odoo S.A.</a> <a target="_blank" href="http://www.gnu.org/licenses/lgpl.html" style="text-decoration: underline;">GNU LGPL Licensed</a></small>
+ forked from Odoo CE - <a target="_blank" href="http://www.gnu.org/licenses/lgpl.html" style="text-decoration: underline;">GNU LGPL Licensed</a>
</div>
</div>
</div>

View file

@ -0,0 +1,13 @@
diff --git a/addons/web/static/src/js/chrome/abstract_web_client.js b/addons/web/static/src/js/chrome/abstract_web_client.js
index 80711fd24ed..1e98bc1d1db 100644
--- a/addons/web/static/src/js/chrome/abstract_web_client.js
+++ b/addons/web/static/src/js/chrome/abstract_web_client.js
@@ -98,7 +98,7 @@ var AbstractWebClient = Widget.extend(ServiceProviderMixin, KeyboardNavigationMi
this._current_state = null;
this.menu_dm = new concurrency.DropMisordered();
this.action_mutex = new concurrency.Mutex();
- this.set('title_part', {"zopenerp": "Odoo"});
+ this.set('title_part', {"zopenerp": "LibreERP"});
},
start: function () {
var self = this;