diff --git a/README.md b/README.md index ba02fbd..41c6ef3 100644 --- a/README.md +++ b/README.md @@ -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 Open Source CRM, Website Builder, eCommerce, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management, ... +The main LibreERP 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. +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. diff --git a/check_process b/check_process index 9a165a4..d5961ec 100644 --- a/check_process +++ b/check_process @@ -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 diff --git a/conf/10.src b/conf/10.src new file mode 100644 index 0000000..295d69e --- /dev/null +++ b/conf/10.src @@ -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 diff --git a/conf/11.src b/conf/11.src new file mode 100644 index 0000000..1414a9d --- /dev/null +++ b/conf/11.src @@ -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 diff --git a/conf/12.src b/conf/12.src new file mode 100644 index 0000000..da62001 --- /dev/null +++ b/conf/12.src @@ -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 diff --git a/conf/8.src b/conf/8.src new file mode 100644 index 0000000..134e002 --- /dev/null +++ b/conf/8.src @@ -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 diff --git a/conf/9.src b/conf/9.src new file mode 100644 index 0000000..d8d3ddc --- /dev/null +++ b/conf/9.src @@ -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 diff --git a/conf/app.service.j2 b/conf/app.service.j2 new file mode 100644 index 0000000..600de12 --- /dev/null +++ b/conf/app.service.j2 @@ -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 diff --git a/conf/logo_type.png b/conf/logo_type.png new file mode 100644 index 0000000..99a0afa Binary files /dev/null and b/conf/logo_type.png differ diff --git a/conf/server.conf.j2 b/conf/server.conf.j2 new file mode 100644 index 0000000..65721fa --- /dev/null +++ b/conf/server.conf.j2 @@ -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 diff --git a/manifest.json b/manifest.json index 3ead0e8..0233b0f 100644 --- a/manifest.json +++ b/manifest.json @@ -1,20 +1,20 @@ { - "name": "Odoo", - "id": "odoo", + "name": "LibreERP", + "id": "libreerp", "packaging_format": 1, "description": { - "en": "Odoo is a suite of business apps (ERP: CRM, Accounting, Point of Sale, HR, Purchases...).", - "fr": "Odoo est une collection d'apps de gestion d'entreprise (ERP : CRM, Comptabilité, Point de Vente, RH, Achats, ...)." + "en": "LibreERP is a suite of business apps (ERP: CRM, Accounting, Point of Sale, HR, Purchases...).", + "fr": "LibreERP est une collection d'apps de gestion d'entreprise (ERP : CRM, Comptabilité, Point de Vente, RH, Achats, ...)." }, "maintainer": { "name": "ljf", - "email": "ljf+odoo_ynh@reflexlibre.net" + "email": "ljf+libreerp_ynh@reflexlibre.net" }, "previous_maintainers": { "name": "scith" }, - "version": "12.0-0", - "url": "https://www.odoo.com", + "version": "12.0-1", + "url": "https://github.com/YunoHost-Apps/libreerp_ynh", "license": "LGPL-3.0,AGPL-3.0", "requirements": { "yunohost": ">= 3.3.0" @@ -28,16 +28,12 @@ "name": "domain", "type": "domain", "ask": { - "en": "Choose a domain for Odoo (Odoo will be installed on its root!)", - "fr": "Choisissez un domaine pour Odoo (Odoo sera installé dans sa racine !)" + "en": "Choose a domain for LibreERP (LibreERP will be installed on its root!)", + "fr": "Choisissez un domaine pour LibreERP (LibreERP sera installé dans sa racine !)" }, - "example": "odoo.domain.org" + "example": "erp.domain.org" }, { "name": "version", - "ask": { - "en": "Which version of Odoo do you want to install?", - "fr": "Quelle version d'Odoo souhaitez-vous installer ?" - }, "choices": ["8", "9", "10", "11", "12"], "default": "12" }, { @@ -54,16 +50,16 @@ }, { "name": "lang", "ask": { - "en": "Choose a language for Odoo", - "fr": "Choisissez une langue pour Odoo" + "en": "Choose a language", + "fr": "Choisissez une langue" }, "choices": ["sq_AL", "am_ET", "ar_SY", "eu_ES", "bs_BA", "bg_BG", "my_MM", "ca_ES", "zh_CN", "zh_HK", "zh_TW", "hr_HR", "cs_CZ", "da_DK", "nl_BE", "nl_NL", "en_AU", "en_GB", "en_US", "et_EE", "fi_FI", "fr_BE", "fr_CA", "fr_CH", "fr_FR", "gl_ES", "ka_GE", "de_CH", "de_DE", "el_GR", "gu_IN", "he_IL", "hi_IN", "hu_HU", "id_ID", "it_IT", "ja_JP", "kab_DZ", "ko_KP", "ko_KR", "lo_LA", "lv_LV", "lt_LT", "mk_MK", "mn_MN", "nb_NO", "fa_IR", "pl_PL", "pt_BR", "pt_PT", "ro_RO", "ru_RU", "sr_RS", "sr@latin", "sk_SK", "sl_SI", "es_AR", "es_BO", "es_CL", "es_CO", "es_CR", "es_DO", "es_EC", "es_GT", "es_MX", "es_PA", "es_PE", "es_PY", "es_UY", "es_VE", "es_ES", "sv_SE", "te_IN", "th_TH", "tr_TR", "uk_UA", "vi_VN"], "default": "en_US" }, { "name": "tz", "ask": { - "en": "Choose a time zone for Odoo", - "fr": "Choisissez un fuseau horaire pour Odoo" + "en": "Choose a time zone", + "fr": "Choisissez un fuseau horaire" }, "choices": ["Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmara","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Timbuktu","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/Buenos_Aires","America/Argentina/Catamarca","America/Argentina/ComodRivadavia","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La_Rioja","America/Argentina/Mendoza","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Atikokan","America/Atka","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Buenos_Aires","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Catamarca","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Coral_Harbour","America/Cordoba","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Ensenada","America/Fort_Wayne","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Indianapolis","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis","America/Inuvik","America/Iqaluit","America/Jamaica","America/Jujuy","America/Juneau","America/Kentucky/Louisville","America/Kentucky/Monticello","America/Knox_IN","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Louisville","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Mendoza","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montreal","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Acre","America/Porto_Velho","America/Puerto_Rico","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Rosario","America/Santa_Isabel","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Shiprock","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Virgin","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/South_Pole","Antarctica/Syowa","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Ashkhabad","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Calcutta","Asia/Choibalsan","Asia/Chongqing","Asia/Chungking","Asia/Colombo","Asia/Dacca","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Gaza","Asia/Harbin","Asia/Hebron","Asia/Ho_Chi_Minh","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Istanbul","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kashgar","Asia/Kathmandu","Asia/Katmandu","Asia/Kolkata","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macao","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qyzylorda","Asia/Rangoon","Asia/Riyadh","Asia/Saigon","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Tel_Aviv","Asia/Thimbu","Asia/Thimphu","Asia/Tokyo","Asia/Ujung_Pandang","Asia/Ulaanbaatar","Asia/Ulan_Bator","Asia/Urumqi","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faeroe","Atlantic/Faroe","Atlantic/Jan_Mayen","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/ACT","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Canberra","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/LHI","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/NSW","Australia/North","Australia/Perth","Australia/Queensland","Australia/South","Australia/Sydney","Australia/Tasmania","Australia/Victoria","Australia/West","Australia/Yancowinna","Brazil/Acre","Brazil/DeNoronha","Brazil/East","Brazil/West","CET","CST6CDT","Canada/Atlantic","Canada/Central","Canada/East-Saskatchewan","Canada/Eastern","Canada/Mountain","Canada/Newfoundland","Canada/Pacific","Canada/Saskatchewan","Canada/Yukon","Chile/Continental","Chile/EasterIsland","Cuba","EET","EST","EST5EDT","Egypt","Eire","Europe/Amsterdam","Europe/Andorra","Europe/Athens","Europe/Belfast","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Nicosia","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Tiraspol","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","GB","GB-Eire","GMT","GMT+0","GMT-0","GMT0","Greenwich","HST","Hongkong","Iceland","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Iran","Israel","Jamaica","Japan","Kwajalein","Libya","MET","MST","MST7MDT","Mexico/BajaNorte","Mexico/BajaSur","Mexico/General","NZ","NZ-CHAT","Navajo","PRC","PST8PDT","Pacific/Apia","Pacific/Auckland","Pacific/Chatham","Pacific/Chuuk","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Johnston","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Pohnpei","Pacific/Ponape","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Samoa","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Truk","Pacific/Wake","Pacific/Wallis","Pacific/Yap","Poland","Portugal","ROC","ROK","Singapore","Turkey","UCT","US/Alaska","US/Aleutian","US/Arizona","US/Central","US/East-Indiana","US/Eastern","US/Hawaii","US/Indiana-Starke","US/Michigan","US/Mountain","US/Pacific","US/Pacific-New","US/Samoa","UTC","Universal","W-SU","WET","Zulu","Etc/GMT","Etc/GMT+0","Etc/GMT+1","Etc/GMT+10","Etc/GMT+11","Etc/GMT+12","Etc/GMT+2","Etc/GMT+3","Etc/GMT+4","Etc/GMT+5","Etc/GMT+6","Etc/GMT+7","Etc/GMT+8","Etc/GMT+9","Etc/GMT-0","Etc/GMT-1","Etc/GMT-10","Etc/GMT-11","Etc/GMT-12","Etc/GMT-13","Etc/GMT-14","Etc/GMT-2","Etc/GMT-3","Etc/GMT-4","Etc/GMT-5","Etc/GMT-6","Etc/GMT-7","Etc/GMT-8","Etc/GMT-9","Etc/GMT0","Etc/Greenwich","Etc/UCT","Etc/UTC","Etc/Universal","Etc/Zulu", "Etc/Zulu"], "default": "UTC", diff --git a/scripts/_common.sh b/scripts/_common.sh index 2f36b61..04c1b4f 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -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 diff --git a/scripts/backup b/scripts/backup index c5c2d22..9256a36 100644 --- a/scripts/backup +++ b/scripts/backup @@ -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 diff --git a/scripts/install b/scripts/install index 4a2f336..ae969a4 100644 --- a/scripts/install +++ b/scripts/install @@ -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 ]*>Odoo<\/a>//g' {} \; + find $final_path/$APPNAME -type f \( -iname '*.xml' -o -iname '*.po' \) -exec sed -i 's/]*>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 <[^>]*>]*Odoo[^>]*><\/a>//g' {} \; + sed -i 's/]*>My Odoo.com account<\/a>//g' $final_path/$APPNAME/addons/web/static/src/xml/base.xml + sed -i 's/]*>Documentation<\/a>//g' $final_path/$APPNAME/addons/web/static/src/xml/base.xml + sed -i 's/]*>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 diff --git a/scripts/remove b/scripts/remove index 47a4418..83843ec 100644 --- a/scripts/remove +++ b/scripts/remove @@ -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 diff --git a/scripts/restore b/scripts/restore index 2ef7bae..1ac555a 100644 --- a/scripts/restore +++ b/scripts/restore @@ -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) diff --git a/scripts/upgrade b/scripts/upgrade index bb5bcee..3cb3989 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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 diff --git a/.README.md.swp b/sources/patches/.11-00-remove-share-dashboard.patch.swp similarity index 69% rename from .README.md.swp rename to sources/patches/.11-00-remove-share-dashboard.patch.swp index 20a7e42..8507800 100644 Binary files a/.README.md.swp and b/sources/patches/.11-00-remove-share-dashboard.patch.swp differ diff --git a/sources/patches/11-00-remove-share-dashboard.patch b/sources/patches/11-00-remove-share-dashboard.patch new file mode 100644 index 0000000..ad4500d --- /dev/null +++ b/sources/patches/11-00-remove-share-dashboard.patch @@ -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 @@@ + + +
+- +-
Share the Love
+-
+- +- Help us spread the word: Share Odoo's awesomeness with your friends! +- +-
+-
+-
+-
+-
+-
+-
+ + + - + -
+ -
+ -

+ - LibreERP fork from Odoo CE + -

+ -
+ -
+ -
+ -
+ - GNU LGPL Licensed + +
+ +
+ +
+ +

+- Odoo +- (Community Edition) +++ LibreERP + +

+ +
+ +
+ +
+ +
+- Copyright © 2004-2016 Odoo S.A. GNU LGPL Licensed +++ forked from Odoo CE - GNU LGPL Licensed + +
+
+
+
diff --git a/sources/patches/11-01-replace-title.patch b/sources/patches/11-01-replace-title.patch new file mode 100644 index 0000000..c5b95e4 --- /dev/null +++ b/sources/patches/11-01-replace-title.patch @@ -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; diff --git a/sources/patches/12-00-remove-share-dashboard.patch b/sources/patches/12-00-remove-share-dashboard.patch new file mode 100644 index 0000000..4f95344 --- /dev/null +++ b/sources/patches/12-00-remove-share-dashboard.patch @@ -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 @@ + + +
+- +-
Share the Love
+-
+- +- Help us spread the word: Share Odoo's awesomeness with your friends! +- +-
+-
+-
+-
+-
+-
+-
+ + + +
+
+

+- Odoo +- (Community Edition) ++ LibreERP +

+
+
+
+
+- Copyright © 2004 Odoo S.A. GNU LGPL Licensed ++ forked from Odoo CE - GNU LGPL Licensed +
+
+
diff --git a/sources/patches/12-01-replace-title.patch b/sources/patches/12-01-replace-title.patch new file mode 100644 index 0000000..7ee6256 --- /dev/null +++ b/sources/patches/12-01-replace-title.patch @@ -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;