From a2d3aa2a7836fbb9d7be406e08c4a0a631b67cb0 Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Sun, 15 Feb 2026 06:07:25 +0000 Subject: [PATCH] [ADD] Multilingual translation of all documentation (EN/FR) Added 30 .base.md files using the mmg (Multilingual Markdown Generator) format to automatically generate English (.md) and French (.fr.md) versions of all project documentation. Updated conf/make.documentation.Makefile to process all .base.md files via `make doc_markdown`. --- .github/ISSUE_TEMPLATE/bug_report.base.md | 55 + .github/ISSUE_TEMPLATE/bug_report.fr.md | 28 + .github/ISSUE_TEMPLATE/bug_report.md | 2 + .../ISSUE_TEMPLATE/feature_request.base.md | 40 + .github/ISSUE_TEMPLATE/feature_request.fr.md | 21 + .github/ISSUE_TEMPLATE/feature_request.md | 1 + CHANGELOG.base.md | 1143 +++++++++++++++++ CHANGELOG.fr.md | 518 ++++++++ CHANGELOG.md | 20 +- README.base.md | 426 ++++++ README.fr.md | 187 +++ README.md | 156 ++- TODO.base.md | 79 ++ TODO.fr.md | 36 + TODO.md | 2 + conf/make.documentation.Makefile | 4 +- doc/CODE_GENERATOR.fr.md | 3 +- doc/CODE_GENERATOR.md | 3 +- doc/CONTRIBUTION.base.md | 58 + doc/CONTRIBUTION.fr.md | 26 + doc/CONTRIBUTION.md | 1 + doc/DEVELOPMENT.base.md | 544 ++++++++ doc/DEVELOPMENT.fr.md | 288 +++++ doc/DEVELOPMENT.md | 1 + doc/DISCOVER.base.md | 80 ++ doc/DISCOVER.fr.md | 42 + doc/DISCOVER.md | 1 + doc/FAQ.base.md | 434 +++++++ doc/FAQ.fr.md | 244 ++++ doc/FAQ.md | 4 +- doc/GIT_REPO.base.md | 231 ++++ doc/GIT_REPO.fr.md | 127 ++ doc/GIT_REPO.md | 3 +- doc/HOWTO.base.md | 18 + doc/HOWTO.fr.md | 6 + doc/HOWTO.md | 1 + doc/MIGRATION.base.md | 129 ++ doc/MIGRATION.fr.md | 65 + doc/MIGRATION.md | 3 +- doc/POETRY.base.md | 167 +++ doc/POETRY.fr.md | 91 ++ doc/POETRY.md | 4 +- doc/PRODUCTION.base.md | 442 +++++++ doc/PRODUCTION.fr.md | 243 ++++ doc/PRODUCTION.md | 4 +- doc/RELEASE.base.md | 391 ++++++ doc/RELEASE.fr.md | 209 +++ doc/RELEASE.md | 3 +- doc/RUN.base.md | 127 ++ doc/RUN.fr.md | 66 + doc/RUN.md | 3 +- doc/TODO.base.md | 35 + doc/TODO.fr.md | 14 + doc/TODO.md | 11 +- doc/UPDATE.base.md | 61 + doc/UPDATE.fr.md | 29 + doc/UPDATE.md | 1 + doc/WINDOWS_INSTALLATION.base.md | 609 +++++++++ doc/WINDOWS_INSTALLATION.fr.md | 325 +++++ doc/WINDOWS_INSTALLATION.md | 620 ++++----- docker/README.base.md | 270 ++++ docker/README.fr.md | 148 +++ docker/README.md | 16 +- script/database/README.base.md | 35 + script/database/README.fr.md | 16 + script/database/README.md | 4 +- script/deployment/README.base.md | 18 + script/deployment/README.fr.md | 6 + script/deployment/README.md | 1 + script/fork_github_repo/README.base.md | 16 + script/fork_github_repo/README.fr.md | 5 + script/fork_github_repo/README.md | 3 +- script/nginx/README.base.md | 75 ++ script/nginx/README.fr.md | 39 + script/nginx/README.md | 4 +- script/odoo/migration/README.base.md | 25 + script/odoo/migration/README.fr.md | 10 + script/odoo/migration/README.md | 1 + script/restful/README.base.md | 52 + script/restful/README.fr.md | 26 + script/restful/README.md | 3 +- script/selenium/README.base.md | 13 + script/selenium/README.fr.md | 4 + script/selenium/README.md | 3 +- script/selenium/install.base.md | 29 + script/selenium/install.fr.md | 16 + script/selenium/install.md | 7 +- script/todo/README.base.md | 16 + script/todo/README.fr.md | 5 + script/todo/README.md | 1 + 90 files changed, 9010 insertions(+), 342 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.base.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.fr.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.base.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.fr.md create mode 100644 CHANGELOG.base.md create mode 100644 CHANGELOG.fr.md create mode 100644 README.base.md create mode 100644 README.fr.md create mode 100644 TODO.base.md create mode 100644 TODO.fr.md create mode 100644 doc/CONTRIBUTION.base.md create mode 100644 doc/CONTRIBUTION.fr.md create mode 100644 doc/DEVELOPMENT.base.md create mode 100644 doc/DEVELOPMENT.fr.md create mode 100644 doc/DISCOVER.base.md create mode 100644 doc/DISCOVER.fr.md create mode 100644 doc/FAQ.base.md create mode 100644 doc/FAQ.fr.md create mode 100644 doc/GIT_REPO.base.md create mode 100644 doc/GIT_REPO.fr.md create mode 100644 doc/HOWTO.base.md create mode 100644 doc/HOWTO.fr.md create mode 100644 doc/MIGRATION.base.md create mode 100644 doc/MIGRATION.fr.md create mode 100644 doc/POETRY.base.md create mode 100644 doc/POETRY.fr.md create mode 100644 doc/PRODUCTION.base.md create mode 100644 doc/PRODUCTION.fr.md create mode 100644 doc/RELEASE.base.md create mode 100644 doc/RELEASE.fr.md create mode 100644 doc/RUN.base.md create mode 100644 doc/RUN.fr.md create mode 100644 doc/TODO.base.md create mode 100644 doc/TODO.fr.md create mode 100644 doc/UPDATE.base.md create mode 100644 doc/UPDATE.fr.md create mode 100644 doc/WINDOWS_INSTALLATION.base.md create mode 100644 doc/WINDOWS_INSTALLATION.fr.md create mode 100644 docker/README.base.md create mode 100644 docker/README.fr.md create mode 100644 script/database/README.base.md create mode 100644 script/database/README.fr.md create mode 100644 script/deployment/README.base.md create mode 100644 script/deployment/README.fr.md create mode 100644 script/fork_github_repo/README.base.md create mode 100644 script/fork_github_repo/README.fr.md create mode 100644 script/nginx/README.base.md create mode 100644 script/nginx/README.fr.md create mode 100644 script/odoo/migration/README.base.md create mode 100644 script/odoo/migration/README.fr.md create mode 100644 script/restful/README.base.md create mode 100644 script/restful/README.fr.md create mode 100644 script/selenium/README.base.md create mode 100644 script/selenium/README.fr.md create mode 100644 script/selenium/install.base.md create mode 100644 script/selenium/install.fr.md create mode 100644 script/todo/README.base.md create mode 100644 script/todo/README.fr.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.base.md b/.github/ISSUE_TEMPLATE/bug_report.base.md new file mode 100644 index 0000000..6bed74c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.base.md @@ -0,0 +1,55 @@ + + + + + + +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**ERPLibre version** + + +**Décrivez le bogue** +Une description claire et concise du bogue. + +**Pour reproduire** +Étapes pour reproduire le comportement : + +**Comportement attendu** +Une description claire et concise de ce que vous attendiez. + +**Captures d'écran** +Si applicable, ajoutez des captures d'écran pour aider à expliquer votre problème. + +**Version d'ERPLibre** + + +- show `make version` + + +**Additional context** +Add any other context about the problem here. + + +**Contexte supplémentaire** +Ajoutez tout autre contexte concernant le problème ici. diff --git a/.github/ISSUE_TEMPLATE/bug_report.fr.md b/.github/ISSUE_TEMPLATE/bug_report.fr.md new file mode 100644 index 0000000..74f5f42 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.fr.md @@ -0,0 +1,28 @@ + +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Décrivez le bogue** +Une description claire et concise du bogue. + +**Pour reproduire** +Étapes pour reproduire le comportement : + +**Comportement attendu** +Une description claire et concise de ce que vous attendiez. + +**Captures d'écran** +Si applicable, ajoutez des captures d'écran pour aider à expliquer votre problème. + +**Version d'ERPLibre** + +- show `make version` + +**Contexte supplémentaire** +Ajoutez tout autre contexte concernant le problème ici. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 602c229..8e400b7 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,3 +1,4 @@ + --- name: Bug report about: Create a report to help us improve @@ -20,6 +21,7 @@ A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem. **ERPLibre version** + - show `make version` **Additional context** diff --git a/.github/ISSUE_TEMPLATE/feature_request.base.md b/.github/ISSUE_TEMPLATE/feature_request.base.md new file mode 100644 index 0000000..b9e1de9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.base.md @@ -0,0 +1,40 @@ + + + + + + +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. + + +**Votre demande de fonctionnalité est-elle liée à un problème ? Veuillez décrire.** +Une description claire et concise du problème. Ex. Je suis toujours frustré quand [...] + +**Décrivez la solution que vous aimeriez** +Une description claire et concise de ce que vous souhaitez voir se produire. + +**Décrivez les alternatives que vous avez envisagées** +Une description claire et concise de toutes les solutions ou fonctionnalités alternatives que vous avez envisagées. + +**Contexte supplémentaire** +Ajoutez tout autre contexte ou capture d'écran concernant la demande de fonctionnalité ici. diff --git a/.github/ISSUE_TEMPLATE/feature_request.fr.md b/.github/ISSUE_TEMPLATE/feature_request.fr.md new file mode 100644 index 0000000..41a7535 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.fr.md @@ -0,0 +1,21 @@ + +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Votre demande de fonctionnalité est-elle liée à un problème ? Veuillez décrire.** +Une description claire et concise du problème. Ex. Je suis toujours frustré quand [...] + +**Décrivez la solution que vous aimeriez** +Une description claire et concise de ce que vous souhaitez voir se produire. + +**Décrivez les alternatives que vous avez envisagées** +Une description claire et concise de toutes les solutions ou fonctionnalités alternatives que vous avez envisagées. + +**Contexte supplémentaire** +Ajoutez tout autre contexte ou capture d'écran concernant la demande de fonctionnalité ici. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index bbcbbe7..5265a64 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,3 +1,4 @@ + --- name: Feature request about: Suggest an idea for this project diff --git a/CHANGELOG.base.md b/CHANGELOG.base.md new file mode 100644 index 0000000..683f1f9 --- /dev/null +++ b/CHANGELOG.base.md @@ -0,0 +1,1143 @@ + + + + + + +# Changelog + +# Journal des modifications + + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com). This project adheres +to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + + + +Tous les changements notables de ce projet seront documentés dans ce fichier. + +Le format est basé sur [Keep a Changelog](https://keepachangelog.com). Ce projet adhère +au [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + + + +## [Unreleased] + + +**Migration notes** + +Recreating the virtual environment, use installation guide from tool `make`. + + +**Notes de migration** + +Recréer l'environnement virtuel, utiliser le guide d'installation depuis l'outil `make`. + + +## Added + +## Ajouté + + +- Support Odoo migration database and module with TODO +- Support multi version odoo switch on same workspace +- Script for hardening the installation +- Support Odoo versions 12.0 to 18.0 +- Separate ERPLibre python installation from Odoo python with .venv.erplibre and .venv.odoo18 +- Implement auto-installation with TODO.py +- TODO show documentation, download database, help with code formatting +- Performance script to mesure request per second +- Support Mainframe architecture 390x +- Deployment with Cloudflare and Nginx +- Support Apache configuration like Nginx +- Support RobotLibre code generator +- Support ERPLibre DevOps, automation procedure about DevOps +- ERPLibre Home Mobile Application, use TODO to compile, deploy it and personalize it +- Support Selenium grid from selenium_lib.py +- Add addons OnlyOffice, Cetmix, OCA automation, OCA shopfloor + + + +- Support de la migration de base de données et de modules Odoo avec TODO +- Support du changement multi-version Odoo sur le même espace de travail +- Script pour le renforcement de la sécurité de l'installation +- Support des versions Odoo 12.0 à 18.0 +- Séparation de l'installation Python ERPLibre de celle d'Odoo avec .venv.erplibre et .venv.odoo18 +- Implémentation de l'auto-installation avec TODO.py +- TODO affiche la documentation, télécharge la base de données, aide au formatage du code +- Script de performance pour mesurer les requêtes par seconde +- Support de l'architecture Mainframe 390x +- Déploiement avec Cloudflare et Nginx +- Support de la configuration Apache comme Nginx +- Support du générateur de code RobotLibre +- Support d'ERPLibre DevOps, procédure d'automatisation DevOps +- Application mobile ERPLibre Home, utiliser TODO pour compiler, déployer et personnaliser +- Support de la grille Selenium depuis selenium_lib.py +- Ajout des addons OnlyOffice, Cetmix, OCA automation, OCA shopfloor + + +## Changed + +## Modifié + + +- Docker support postgresql 18 +- Format script search diff file into each repository +- Support neutralize database from Odoo + + + +- Support Docker postgresql 18 +- Script de formatage recherche les fichiers diff dans chaque dépôt +- Support de la neutralisation de base de données depuis Odoo + + + +## [1.6.0] - 2025-04-25 + + +## Added + +## Ajouté + + +- Support multiple Odoo versions (12.0, 14.0, 16.0) in same workspace + - This will help for the migration of modules +- Selenium script for increasing open software client interface and automating some actions. + - Video recording + - Support scrolling and word generating +- FAQ about kill git-daemon +- Supports Arch Linux, Ubuntu 23.10 to 25.04 +- ADD repo JayVora-SerpentCS_SerpentCS_Contributions +- ADD repo CybroOdoo_CybroAddons + + + +- Support de plusieurs versions Odoo (12.0, 14.0, 16.0) dans le même espace de travail + - Cela aidera pour la migration des modules +- Script Selenium pour augmenter l'interface client logiciel libre et automatiser certaines actions. + - Enregistrement vidéo + - Support du défilement et de la génération de mots +- FAQ sur comment tuer git-daemon +- Support d'Arch Linux, Ubuntu 23.10 à 25.04 +- AJOUT du dépôt JayVora-SerpentCS_SerpentCS_Contributions +- AJOUT du dépôt CybroOdoo_CybroAddons + + +## Changed + +## Modifié + + +- Refactor image_db regeneration, use configuration JSON to build image +- Guide for moving dev to prod +- Update Docker buster to bullseye +- Improve format script to help code-generator +- Improve PyCharm script +- Support OSX for open-terminal +- Remove docker-compose and replace by docker compose +- Update Poetry 1.3.1 to 1.5.1 +- Test can be launched with a json configuration and support log/result individually +- Script to search docker compose into the system +- Script search class model can output into json format and support field information +- Improve Docker minimal installation docs in README for Ubuntu, test with + Debian (https://github.com/ERPLibre/ERPLibre/issues/73) +- Statistic script showing evolution module into ERPLibre supporting Odoo 17 and Odoo 18 +- Latest version wkhtmltopdf 0.12.6.1-3 + + + +- Refactorisation de la régénération image_db, utilisation de la configuration JSON pour construire l'image +- Guide pour le passage de dev à prod +- Mise à jour Docker buster vers bullseye +- Amélioration du script de formatage pour aider le code-generator +- Amélioration du script PyCharm +- Support d'OSX pour open-terminal +- Suppression de docker-compose et remplacement par docker compose +- Mise à jour de Poetry 1.3.1 vers 1.5.1 +- Les tests peuvent être lancés avec une configuration JSON et supportent les logs/résultats individuellement +- Script pour rechercher docker compose dans le système +- Le script de recherche de modèle de classe peut produire en format JSON et supporte les informations de champ +- Amélioration de la documentation d'installation Docker minimale dans le README pour Ubuntu, test avec + Debian (https://github.com/ERPLibre/ERPLibre/issues/73) +- Script de statistiques montrant l'évolution des modules dans ERPLibre supportant Odoo 17 et Odoo 18 +- Dernière version wkhtmltopdf 0.12.6.1-3 + + +### Fixed + +### Corrigé + + +- NPM installed locally and not globally +- Improve python code writer efficiency +- Config generator supporting space into ERPLibre directory +- Script to update Poetry to support @ URL +- OSX and recent Ubuntu installation +- Cloudflare script integration + + + +- NPM installé localement et non globalement +- Amélioration de l'efficacité du générateur de code Python +- Le générateur de configuration supporte les espaces dans le répertoire ERPLibre +- Script de mise à jour de Poetry pour supporter les URL avec @ +- Installation OSX et Ubuntu récent +- Intégration du script Cloudflare + + + +## [1.5.0] - 2023-07-07 + + +**Migration notes** + +Recreating the virtual environment + + +**Notes de migration** + +Recréer l'environnement virtuel + + + +```bash +rm -rf ~/.poetry +rm -rf ~/.pyenv + +rm ./get-poetry.py +rm -rf ./.venv + +make install +``` + + + +Do a backup of your database and update all modules : + + + +Faire une sauvegarde de votre base de données et mettre à jour tous les modules : + + + +```bash +./run.sh --no-http --stop-after-init -d DATABASE -u all +``` + + +## Added + +## Ajouté + + +- Support Ubuntu 22.04 with installation script +- Module mail_history and fetchmail_thread_default in base image DB +- Makefile can generate image DB in parallel with `image_db_create_all_parallel` +- Makefile can run all code_generator with `run_parallel_cg` and `run_parallel_cg_template` +- Script to generate Pycharm configuration and exclude directory +- Support docker alpha+beta +- Limit memory execution when install in develop +- Template nginx configuration +- Script code count statistic +- Script show OCA evolution module statistic +- Windows development support, check documentation installation +- New project (code generator to create module) support params configuration +- Module sync_external_model to synchronise Odoo models with module + + + +- Support d'Ubuntu 22.04 avec script d'installation +- Module mail_history et fetchmail_thread_default dans l'image DB de base +- Le Makefile peut générer l'image DB en parallèle avec `image_db_create_all_parallel` +- Le Makefile peut exécuter tous les code_generator avec `run_parallel_cg` et `run_parallel_cg_template` +- Script pour générer la configuration PyCharm et exclure les répertoires +- Support docker alpha+beta +- Limitation de la mémoire d'exécution lors de l'installation en développement +- Template de configuration nginx +- Script de statistiques de comptage de code +- Script montrant l'évolution des modules OCA +- Support du développement Windows, consulter la documentation d'installation +- Nouveau projet (code generator pour créer un module) supporte la configuration par paramètres +- Module sync_external_model pour synchroniser les modèles Odoo avec un module + + +## Changed + +## Modifié + + +- Odoo 12.0 update from 22-07-2020 to 01-01-2023 +- Update pip dependency with security update + - Pillow==9.3.0 + - psycopg2==2.9.5 + - Werkzeug==0.16.1 + - check diff of file pyproject.toml for all information +- Update to Python==3.7.16 +- Update poetry==1.3.1 +- Update multilingual-markdown==1.0.3 +- Update imagedb with all Odoo update +- Repo documentation-user from Odoo change to documentation +- Repo odooaktiv/QuotationRevision is deleted +- Update all repo (91) to end of 2022 +- Rename module project_task_subtask_time_range => project_time_budget +- Rename module project_task_time_range => project_time_range +- Refactor script emplacement, create directory in ./script/ per subject +- Use command parallel in Makefile +- Update sphinx version +- Improve script location + + + +- Mise à jour Odoo 12.0 du 22-07-2020 au 01-01-2023 +- Mise à jour des dépendances pip avec correctif de sécurité + - Pillow==9.3.0 + - psycopg2==2.9.5 + - Werkzeug==0.16.1 + - vérifier le diff du fichier pyproject.toml pour toutes les informations +- Mise à jour vers Python==3.7.16 +- Mise à jour poetry==1.3.1 +- Mise à jour multilingual-markdown==1.0.3 +- Mise à jour imagedb avec toutes les mises à jour Odoo +- Le dépôt documentation-user d'Odoo change pour documentation +- Le dépôt odooaktiv/QuotationRevision est supprimé +- Mise à jour de tous les dépôts (91) à fin 2022 +- Renommage du module project_task_subtask_time_range => project_time_budget +- Renommage du module project_task_time_range => project_time_range +- Refactorisation de l'emplacement des scripts, création de répertoires dans ./script/ par sujet +- Utilisation de la commande parallel dans le Makefile +- Mise à jour de la version sphinx +- Amélioration de l'emplacement des scripts + + +### Fixed + +### Corrigé + + +- Debian 11 installation script +- Test result +- OSX installation (not finish to support) +- Poetry update support '~=' + + + +- Script d'installation Debian 11 +- Résultats de tests +- Installation OSX (support non terminé) +- La mise à jour de Poetry supporte '~=' + + +### Removed + +### Supprimé + + +- Ubuntu 18.04 is broken, need to install manually nodejs and npm +- Module contract_portal and remove signature in portal contract, need an update +- Downgrade module helpdesk_mgmt to remove email team and tracking field + - Module helpdesk_partner + - Module helpdesk_service_call + - Module helpdesk_supplier + - Module helpdesk_mrp + - Module helpdesk_mailing_list + - Module helpdesk_join_team +- Module project_time_management +- Support of vatnumber, too old +- Deprecated python dependency like pycrypto + + + +- Ubuntu 18.04 est cassé, besoin d'installer manuellement nodejs et npm +- Module contract_portal et suppression de la signature dans le portail de contrat, nécessite une mise à jour +- Rétrogradation du module helpdesk_mgmt pour supprimer l'équipe email et le champ de suivi + - Module helpdesk_partner + - Module helpdesk_service_call + - Module helpdesk_supplier + - Module helpdesk_mrp + - Module helpdesk_mailing_list + - Module helpdesk_join_team +- Module project_time_management +- Support de vatnumber, trop ancien +- Dépendances Python dépréciées comme pycrypto + + + +## [1.4.0] - 2022-10-05 + + +**Migration note** + +- Update module `website`,`website_form_builder`. +- For dev, run `poetry cache clear --all pypi` + + +**Note de migration** + +- Mettre à jour les modules `website`,`website_form_builder`. +- Pour le développement, exécuter `poetry cache clear --all pypi` + + +### Added + +### Ajouté + + +- Script run_parallel_test.sh to execute all tests in parallel for better execution speed +- Documentation to use docker in production +- Add repo: + - Ajepe odoo-addons to support restful + - OmniaGIT Odoo PLM + - MathBenTech family-management + - erplibre-3D-printing-addons +- Add module: + - iohub_connector to support mqtt + - website_snippet_all to install all snippets, extracted from all themes + - website_blog_snippet_all to install website_snippet_all with website_blog and associated snippet + - sinerkia_jitsi_meet to integrate Jitsi + - erplibre_website_snippets_jitsi to integrate Jitsi in snippet, work in progress +- Add module by default: + - auto_backup + - muk_website_branding + - website_snippet_anchor + - website_anchor_smooth_scroll + - crm_team_quebec + - partner_no_vat +- Documentation Odoo dev +- Format command supported addons +- Install theme with Odoo command +- Script to install theme addons +- Image website with default theme +- Image erplibre demo +- Test with coverage + + + +- Script run_parallel_test.sh pour exécuter tous les tests en parallèle pour une meilleure vitesse d'exécution +- Documentation pour utiliser Docker en production +- Ajout de dépôts : + - Ajepe odoo-addons pour supporter restful + - OmniaGIT Odoo PLM + - MathBenTech family-management + - erplibre-3D-printing-addons +- Ajout de modules : + - iohub_connector pour supporter mqtt + - website_snippet_all pour installer tous les snippets, extraits de tous les thèmes + - website_blog_snippet_all pour installer website_snippet_all avec website_blog et les snippets associés + - sinerkia_jitsi_meet pour intégrer Jitsi + - erplibre_website_snippets_jitsi pour intégrer Jitsi dans les snippets, travail en cours +- Ajout de modules par défaut : + - auto_backup + - muk_website_branding + - website_snippet_anchor + - website_anchor_smooth_scroll + - crm_team_quebec + - partner_no_vat +- Documentation Odoo dev +- Commande de formatage pour les addons supportés +- Installation de thème avec la commande Odoo +- Script pour installer les addons de thème +- Image du site web avec thème par défaut +- Image démo erplibre +- Tests avec couverture + + +### Changed + +### Modifié + + +- Downgrade sphinx to 1.6.7 to support Odoo dev documentation +- Update to poetry==1.1.14 +- Update pip dependency with security update + - Pillow==9.0.1 + - PyPDF2==1.27.8 + - lxml==4.9.1 +- Code generator export website with attachments and scss design file with documentation +- Code generator support multiple snippets +- Into repo Numigi_odoo-project-addons rename module project_template to project_template_numigi +- Into repo Numigi_odoo-product-addons rename module product_dimension to product_dimension_numigi +- Into repo Numigi_odoo-partner-addons, re-enable auto-install module +- Into repo muk-it_muk_website, re-enable auto-install module + + + +- Rétrogradation de sphinx à 1.6.7 pour supporter la documentation Odoo dev +- Mise à jour vers poetry==1.1.14 +- Mise à jour des dépendances pip avec correctif de sécurité + - Pillow==9.0.1 + - PyPDF2==1.27.8 + - lxml==4.9.1 +- Le code generator exporte le site web avec les pièces jointes et le fichier de design scss avec documentation +- Le code generator supporte les snippets multiples +- Dans le dépôt Numigi_odoo-project-addons, renommage du module project_template en project_template_numigi +- Dans le dépôt Numigi_odoo-product-addons, renommage du module product_dimension en product_dimension_numigi +- Dans le dépôt Numigi_odoo-partner-addons, réactivation du module auto-install +- Dans le dépôt muk-it_muk_website, réactivation du module auto-install + + +### Fixed + +### Corrigé + + +- Poetry supports insensitive python dependency +- Code generator new project supports relative path and check duplicated paths +- Muk web theme table header background-color and on hover for Many2many +- Script docker-compose use lowercase name +- website_form_builder HTML support and allow option to align send button +- Odoo cherry-pick 2 commits bus fix +- Minor fix css color into module hr_theme from repo CybroOdoo_OpenHRMS +- Typo in project task when logging time + + + +- Poetry supporte les dépendances Python insensibles à la casse +- Le nouveau projet du code generator supporte les chemins relatifs et vérifie les chemins dupliqués +- Couleur d'arrière-plan de l'en-tête de tableau du thème web Muk et survol pour Many2many +- Le script docker-compose utilise des noms en minuscules +- website_form_builder support HTML et option pour aligner le bouton d'envoi +- Cherry-pick Odoo de 2 commits correctif bus +- Correction mineure de couleur CSS dans le module hr_theme du dépôt CybroOdoo_OpenHRMS +- Faute de frappe dans la tâche de projet lors de la saisie du temps + + +### Removed + +### Supprimé + + +- Module package erplibre from ERPLibre_erplibre_addons and use instead image creation, check Makefile + + + +- Paquet de module erplibre de ERPLibre_erplibre_addons, utiliser à la place la création d'image, voir le Makefile + + + +## [1.3.0] - 2022-01-25 + + +**Migration note** + +With new version of poetry, a bug occurs in the update. The solution is to delete the directory to let it +recreate. `rm -rf ~/.poetry` + + +**Note de migration** + +Avec la nouvelle version de poetry, un bogue survient lors de la mise à jour. La solution est de supprimer le répertoire pour le laisser +se recréer. `rm -rf ~/.poetry` + + +### Added + +### Ajouté + + +- Code generator supports view : activity, calendar, diagram, form, graph, kanban, pivot, search, timeline and tree +- Code generator supports portal view field and form creation +- Code generator generates generic snippets for demo_portal +- Code generator generates code_generator with code_generator_code_generator +- Code generator tests mariadb migrator +- Code generator supports javascript interpretation for snippet +- Code generator supports inheritance +- Code generator new project to create the suite of generation code +- Script to test the generation of module `code_generator` +- Make test_full_fast to run all test in parallel +- Module `web_timeline` and `web_diagram_position` in base image. +- Module `odoo-formio` from novacode-nl +- Module `design_themes` from Odoo +- Format python header with isort + + + +- Le code generator supporte les vues : activity, calendar, diagram, form, graph, kanban, pivot, search, timeline et tree +- Le code generator supporte la création de champs de vue portail et de formulaires +- Le code generator génère des snippets génériques pour demo_portal +- Le code generator génère code_generator avec code_generator_code_generator +- Le code generator teste le migrateur mariadb +- Le code generator supporte l'interprétation javascript pour les snippets +- Le code generator supporte l'héritage +- Nouveau projet du code generator pour créer la suite de génération de code +- Script pour tester la génération du module `code_generator` +- Make test_full_fast pour exécuter tous les tests en parallèle +- Module `web_timeline` et `web_diagram_position` dans l'image de base. +- Module `odoo-formio` de novacode-nl +- Module `design_themes` d'Odoo +- Formatage de l'en-tête Python avec isort + + +### Changed + +### Modifié + + +- Update to Python==3.7.12 +- Update to poetry==1.1.12 +- Update pip dependency with security update + - Pillow==9.0.0 + - lxml==4.7.1 + - babel==2.9.1 + - pyyaml==6.0 + - reportlab==3.6.5 +- Web diagram module has all color of the rainbow in option +- Refactor and simplify code of code_generator, better support of code reader + + + +- Mise à jour vers Python==3.7.12 +- Mise à jour vers poetry==1.1.12 +- Mise à jour des dépendances pip avec correctif de sécurité + - Pillow==9.0.0 + - lxml==4.7.1 + - babel==2.9.1 + - pyyaml==6.0 + - reportlab==3.6.5 +- Le module web diagram a toutes les couleurs de l'arc-en-ciel en option +- Refactorisation et simplification du code du code_generator, meilleur support du lecteur de code + + +### Fixed + +### Corrigé + + +- Downgrade Werkzeug==0.11.15, only this version is supported by Odoo 12.0. This fixes some http request behind a proxy. + + + +- Rétrogradation Werkzeug==0.11.15, seule cette version est supportée par Odoo 12.0. Cela corrige certaines requêtes HTTP derrière un proxy. + + + +## [1.2.1] - 2021-09-28 + + +### Added + +### Ajouté + + +- doc/migration.md + + + +- doc/migration.md + + +### Changed + +### Modifié + + +- Update pip dependency with security update + - Jinja2==2.11.3 + - lxml==4.6.3 + - cryptography==3.4.8 + - psutil==5.6.6 + - Pillow==8.3.2 + - Werkzeug==0.15.3 +- Script separate generate_config.sh from install_locally.sh +- Improve developer documentation +- More Docker script + + + +- Mise à jour des dépendances pip avec correctif de sécurité + - Jinja2==2.11.3 + - lxml==4.6.3 + - cryptography==3.4.8 + - psutil==5.6.6 + - Pillow==8.3.2 + - Werkzeug==0.15.3 +- Séparation du script generate_config.sh de install_locally.sh +- Amélioration de la documentation développeur +- Plus de scripts Docker + + +#### Code generator + +#### Code generator + + +- Improve db_servers generation code +- Improve wizard generate UI menu + + + +- Amélioration du code de génération db_servers +- Amélioration du menu UI de l'assistant de génération + + +### Fixed + +### Corrigé + + +- Mobile view menu item in Web interface from muk_web_theme + + + +- Élément de menu vue mobile dans l'interface Web de muk_web_theme + + + +## [1.2.0] - 2021-07-21 + + +**Migration note** + +Because addons repository has change, config file need to be updated. + +- When upgrading to version 1.2.0: + - From docker + - Clone project if only download docker-compose + +**Note de migration** + +Parce que le dépôt d'addons a changé, le fichier de configuration doit être mis à jour. + +- Lors de la mise à niveau vers la version 1.2.0 : + - Depuis docker + - Cloner le projet si vous avez seulement téléchargé docker-compose + + - `git init` + - `git remote add origin https://github.com/erplibre/erplibre` + - `git fetch` + - `mv ./docker-compose.yml /tmp/temp_docker-compose.yml` + - `git checkout master` + - `mv /tmp/temp_docker-compose.yml ./docker-compose.yml` + + - Update `./docker-compose.yml` depending of difference with git. + - Run script `make docker_exec_erplibre_gen_config` + - Restart the docker `make docker_restart_daemon` + - From vanilla + - Run script `make install_dev` + - Restart your daemon + - Regenerate master password manually + + + - Mettre à jour `./docker-compose.yml` selon les différences avec git. + - Exécuter le script `make docker_exec_erplibre_gen_config` + - Redémarrer le docker `make docker_restart_daemon` + - Depuis une installation vanilla + - Exécuter le script `make install_dev` + - Redémarrer votre daemon + - Régénérer le mot de passe maître manuellement + + +### Added + +### Ajouté + + +- Adapt script to give an execution status +- Multilingual markdown +- Guide to use Cloudflare with DDNS +- Script to check git diff and ignore date +- Repo with ERPLibre image +- Improve git repo usage, filter repo by use case +- ERPLibre theme website of TechnoLibre +- ERPLibre website snippet + - Basic HTML snippets + - Snippet card + - Snippet timelines +- Module contract_digitized_signature with contract_portal +- Module disable auto_backup +- Odoo cli db command to manipulate restoration db +- Odoo cli i18n command to generate i18n pot files + + + +- Adaptation du script pour donner un statut d'exécution +- Markdown multilingue +- Guide pour utiliser Cloudflare avec DDNS +- Script pour vérifier le diff git et ignorer la date +- Dépôt avec l'image ERPLibre +- Amélioration de l'utilisation du dépôt git, filtrer les dépôts par cas d'utilisation +- Thème de site web ERPLibre de TechnoLibre +- Snippet de site web ERPLibre + - Snippets HTML de base + - Snippet carte + - Snippets chronologie +- Module contract_digitized_signature avec contract_portal +- Module disable auto_backup +- Commande CLI Odoo db pour manipuler la restauration de base de données +- Commande CLI Odoo i18n pour générer les fichiers pot i18n + + +#### Makefile + +#### Makefile + + +- Format code +- Code generator test +- Addons installation +- OS installation +- Restore database +- Docker execution + + + +- Formatage du code +- Test du code generator +- Installation des addons +- Installation du système d'exploitation +- Restauration de base de données +- Exécution Docker + + +#### Code generator + +#### Code generator + + +- Code generator for Odoo module, depending of ERPLibre +- Support map geospatial +- Support i18n +- Script to transform Python and XML to Python code writer script to regenerate themselves + + + +- Code generator pour les modules Odoo, dépendant d'ERPLibre +- Support des cartes géospatiales +- Support i18n +- Script pour transformer Python et XML en script d'écriture de code Python pour se régénérer eux-mêmes + + +### Changed + +### Modifié + + +- Update Python dependency with Poetry +- Format all Python code with black +- Module auto_backup with sftp host key +- Module muk_website_branding use ERPLibre branding +- Update docs with vscode support, custom document layout, custom email template and trick to use params to share + variable + + + +- Mise à jour des dépendances Python avec Poetry +- Formatage de tout le code Python avec black +- Module auto_backup avec clé d'hôte sftp +- Le module muk_website_branding utilise le branding ERPLibre +- Mise à jour de la documentation avec le support vscode, mise en page de document personnalisée, modèle d'email personnalisé et astuce pour utiliser les paramètres de partage + de variables + + +#### Docker + +#### Docker + + +- Use buster python 3.7.7 image to remove pyenv +- Update Postgresql to support Postgis +- Support volume addons /ERPLibre/addons/addons + + + +- Utilisation de l'image buster python 3.7.7 pour supprimer pyenv +- Mise à jour de PostgreSQL pour supporter PostGIS +- Support du volume addons /ERPLibre/addons/addons + + +### Fixed + +### Corrigé + + +- Ubuntu installation +- Poetry installation +- Geospatial with postgis can be installed + + + +- Installation Ubuntu +- Installation de Poetry +- Le géospatial avec PostGIS peut être installé + + + +## [1.1.1] - 2020-12-11 + + +### Added + +### Ajouté + + +- Developer, test, migration and user documentation +- Branding ERPLibre with muk_branding +- Uninstall module from parameter Odoo +- Makefile to generate ERPLibre documentation WIP +- Docker support volume on /etc/odoo +- Docker support update database + + + +- Documentation développeur, test, migration et utilisateur +- Branding ERPLibre avec muk_branding +- Désinstallation de module depuis les paramètres Odoo +- Makefile pour générer la documentation ERPLibre (travail en cours) +- Support Docker du volume sur /etc/odoo +- Support Docker de la mise à jour de base de données + + +### Changed + +### Modifié + + +- Better documentation on how to use ERPLibre and release +- Support wkhtmltox_0.12.6-1 + + + +- Meilleure documentation sur l'utilisation d'ERPLibre et les versions +- Support de wkhtmltox_0.12.6-1 + + +### Fixed + +### Corrigé + + +- db_backup to accept public host key on sftp +- Docker dependency +- Freeze poetry version 1.0.10 + + + +- db_backup pour accepter la clé d'hôte publique sur sftp +- Dépendances Docker +- Gel de la version poetry 1.0.10 + + + +## [1.1.0] - 2020-09-30 + + +### Added + +### Ajouté + + +- Docker +- Pyenv to manage python version +- Poetry to manage python dependencies + - Script poetry_update to search all dependencies in addons +- Travis CI WIP +- TODO.md +- Guide to update all repositories with community +- Update manifest + - Add missing OCA repos + - Add medical, property management and more + - Add cloud/saas repo + + + +- Docker +- Pyenv pour gérer les versions Python +- Poetry pour gérer les dépendances Python + - Script poetry_update pour rechercher toutes les dépendances dans les addons +- Travis CI (travail en cours) +- TODO.md +- Guide pour mettre à jour tous les dépôts avec la communauté +- Mise à jour du manifeste + - Ajout des dépôts OCA manquants + - Ajout de médical, gestion immobilière et plus + - Ajout du dépôt cloud/saas + + +### Changed + +### Modifié + + +- Update to Odoo Community 12.0 and all addons +- Rename venv to .venv +- More documentation on how to use ERPLibre + + + +- Mise à jour vers Odoo Community 12.0 et tous les addons +- Renommage de venv en .venv +- Plus de documentation sur l'utilisation d'ERPLibre + + + +## [1.0.1] - 2020-07-14 + + +### Added + +### Ajouté + + +- Improved documentation with development and production environment +- Improved documentation with git repo +- Move default.xml manifest to root, the default location +- Support default.staged.xml to update prod with dev +- Feature to show diff between manifests or between repo of different manifests +- Update manifest + - Muk theme in erplibre_base + - Add draft account invoice approbation in portal + - New module sale_fix_update_price_unit_when_update_qty + - New module account_invoice_approbation + - New module sale_margin_editor + + + +- Amélioration de la documentation avec l'environnement de développement et de production +- Amélioration de la documentation avec le dépôt git +- Déplacement du manifeste default.xml à la racine, l'emplacement par défaut +- Support de default.staged.xml pour mettre à jour la prod avec le dev +- Fonctionnalité pour afficher le diff entre les manifestes ou entre les dépôts de différents manifestes +- Mise à jour du manifeste + - Thème Muk dans erplibre_base + - Ajout du brouillon d'approbation de facture dans le portail + - Nouveau module sale_fix_update_price_unit_when_update_qty + - Nouveau module account_invoice_approbation + - Nouveau module sale_margin_editor + + +### Fixed + +### Corrigé + + +- Production installation with git_repo + + + +- Installation de production avec git_repo + + + +## [1.0.0] - 2020-07-04 + + +### Added + +### Ajouté + + +- Environment of development, discovery and production with documentation and script. +- Google git-repo to support addons repository instead of using Git submodule. + + + +- Environnement de développement, découverte et production avec documentation et scripts. +- Google git-repo pour supporter le dépôt d'addons au lieu d'utiliser les sous-modules Git. + + +### Removed + +### Supprimé + + +- Git submodule + + + +- Sous-modules Git + + + +## [0.1.1] - 2020-04-28 + + +### Added + +### Ajouté + + +- Support helpdesk supplier, helper, employee and services +- Support [SanteLibre.ca](https://santelibre.ca) with MRP, website, hr, ecommerce +- Donation module with thermometer for website +- Script to fork project and all repos in submodule to create ERPLibre + + + +- Support du helpdesk fournisseur, assistant, employé et services +- Support de [SanteLibre.ca](https://santelibre.ca) avec MRP, site web, RH, commerce en ligne +- Module de don avec thermomètre pour le site web +- Script pour forker le projet et tous les dépôts en sous-module pour créer ERPLibre + + + +## [0.1.0] - 2020-04-20 + + +### Added + +### Ajouté + + +- Move project from https://github.com/mathbentech/InstallScript to ERPLibre. +- Support of Odoo Community 12.0 2019-11-19 94bcbc92e5e5a6fd3de7267e3c01f8c11fb045f4. + + + +- Déplacement du projet de https://github.com/mathbentech/InstallScript vers ERPLibre. +- Support d'Odoo Community 12.0 2019-11-19 94bcbc92e5e5a6fd3de7267e3c01f8c11fb045f4. + + +### Changed + +### Modifié + + +- Support scrummer, project, sale, website, helpdesk and hr +- Support Nginx and improve installation + + + +- Support de scrummer, projet, vente, site web, helpdesk et RH +- Support de Nginx et amélioration de l'installation + + +### Fixed + +### Corrigé + + +- Support only python3.6 and python3.7, python3.8 causes error in runtime. + + + +- Support uniquement de python3.6 et python3.7, python3.8 cause des erreurs à l'exécution. + + + +[Unreleased]: https://github.com/ERPLibre/ERPLibre/compare/v1.6.0...HEAD + +[1.6.0]: https://github.com/ERPLibre/ERPLibre/compare/v1.5.0...v1.6.0 + +[1.5.0]: https://github.com/ERPLibre/ERPLibre/compare/v1.4.0...v1.5.0 + +[1.4.0]: https://github.com/ERPLibre/ERPLibre/compare/v1.3.0...v1.4.0 + +[1.3.0]: https://github.com/ERPLibre/ERPLibre/compare/v1.2.1...v1.3.0 + +[1.2.1]: https://github.com/ERPLibre/ERPLibre/compare/v1.2.0...v1.2.1 + +[1.2.0]: https://github.com/ERPLibre/ERPLibre/compare/v1.1.1...v1.2.0 + +[1.1.1]: https://github.com/ERPLibre/ERPLibre/compare/v1.0.1...v1.1.1 + +[1.1.0]: https://github.com/ERPLibre/ERPLibre/compare/v1.0.1...v1.1.0 + +[1.0.1]: https://github.com/ERPLibre/ERPLibre/compare/v1.0.0...v1.0.1 + +[1.0.0]: https://github.com/ERPLibre/ERPLibre/compare/v0.1.1...v1.0.0 + +[0.1.1]: https://github.com/ERPLibre/ERPLibre/compare/v0.1.0...v0.1.1 + +[0.1.0]: https://github.com/ERPLibre/ERPLibre/releases/tag/v0.1.0 diff --git a/CHANGELOG.fr.md b/CHANGELOG.fr.md new file mode 100644 index 0000000..00007ae --- /dev/null +++ b/CHANGELOG.fr.md @@ -0,0 +1,518 @@ + +# Journal des modifications + +Tous les changements notables de ce projet seront documentés dans ce fichier. + +Le format est basé sur [Keep a Changelog](https://keepachangelog.com). Ce projet adhère +au [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + + +## [Unreleased] + +**Notes de migration** + +Recréer l'environnement virtuel, utiliser le guide d'installation depuis l'outil `make`. + +## Ajouté + +- Support de la migration de base de données et de modules Odoo avec TODO +- Support du changement multi-version Odoo sur le même espace de travail +- Script pour le renforcement de la sécurité de l'installation +- Support des versions Odoo 12.0 à 18.0 +- Séparation de l'installation Python ERPLibre de celle d'Odoo avec .venv.erplibre et .venv.odoo18 +- Implémentation de l'auto-installation avec TODO.py +- TODO affiche la documentation, télécharge la base de données, aide au formatage du code +- Script de performance pour mesurer les requêtes par seconde +- Support de l'architecture Mainframe 390x +- Déploiement avec Cloudflare et Nginx +- Support de la configuration Apache comme Nginx +- Support du générateur de code RobotLibre +- Support d'ERPLibre DevOps, procédure d'automatisation DevOps +- Application mobile ERPLibre Home, utiliser TODO pour compiler, déployer et personnaliser +- Support de la grille Selenium depuis selenium_lib.py +- Ajout des addons OnlyOffice, Cetmix, OCA automation, OCA shopfloor + +## Modifié + +- Support Docker postgresql 18 +- Script de formatage recherche les fichiers diff dans chaque dépôt +- Support de la neutralisation de base de données depuis Odoo + + +## [1.6.0] - 2025-04-25 + +## Ajouté + +- Support de plusieurs versions Odoo (12.0, 14.0, 16.0) dans le même espace de travail + - Cela aidera pour la migration des modules +- Script Selenium pour augmenter l'interface client logiciel libre et automatiser certaines actions. + - Enregistrement vidéo + - Support du défilement et de la génération de mots +- FAQ sur comment tuer git-daemon +- Support d'Arch Linux, Ubuntu 23.10 à 25.04 +- AJOUT du dépôt JayVora-SerpentCS_SerpentCS_Contributions +- AJOUT du dépôt CybroOdoo_CybroAddons + +## Modifié + +- Refactorisation de la régénération image_db, utilisation de la configuration JSON pour construire l'image +- Guide pour le passage de dev à prod +- Mise à jour Docker buster vers bullseye +- Amélioration du script de formatage pour aider le code-generator +- Amélioration du script PyCharm +- Support d'OSX pour open-terminal +- Suppression de docker-compose et remplacement par docker compose +- Mise à jour de Poetry 1.3.1 vers 1.5.1 +- Les tests peuvent être lancés avec une configuration JSON et supportent les logs/résultats individuellement +- Script pour rechercher docker compose dans le système +- Le script de recherche de modèle de classe peut produire en format JSON et supporte les informations de champ +- Amélioration de la documentation d'installation Docker minimale dans le README pour Ubuntu, test avec + Debian (https://github.com/ERPLibre/ERPLibre/issues/73) +- Script de statistiques montrant l'évolution des modules dans ERPLibre supportant Odoo 17 et Odoo 18 +- Dernière version wkhtmltopdf 0.12.6.1-3 + +### Corrigé + +- NPM installé localement et non globalement +- Amélioration de l'efficacité du générateur de code Python +- Le générateur de configuration supporte les espaces dans le répertoire ERPLibre +- Script de mise à jour de Poetry pour supporter les URL avec @ +- Installation OSX et Ubuntu récent +- Intégration du script Cloudflare + + +## [1.5.0] - 2023-07-07 + +**Notes de migration** + +Recréer l'environnement virtuel + + +```bash +rm -rf ~/.poetry +rm -rf ~/.pyenv + +rm ./get-poetry.py +rm -rf ./.venv + +make install +``` + + +Faire une sauvegarde de votre base de données et mettre à jour tous les modules : + + +```bash +./run.sh --no-http --stop-after-init -d DATABASE -u all +``` + +## Ajouté + +- Support d'Ubuntu 22.04 avec script d'installation +- Module mail_history et fetchmail_thread_default dans l'image DB de base +- Le Makefile peut générer l'image DB en parallèle avec `image_db_create_all_parallel` +- Le Makefile peut exécuter tous les code_generator avec `run_parallel_cg` et `run_parallel_cg_template` +- Script pour générer la configuration PyCharm et exclure les répertoires +- Support docker alpha+beta +- Limitation de la mémoire d'exécution lors de l'installation en développement +- Template de configuration nginx +- Script de statistiques de comptage de code +- Script montrant l'évolution des modules OCA +- Support du développement Windows, consulter la documentation d'installation +- Nouveau projet (code generator pour créer un module) supporte la configuration par paramètres +- Module sync_external_model pour synchroniser les modèles Odoo avec un module + +## Modifié + +- Mise à jour Odoo 12.0 du 22-07-2020 au 01-01-2023 +- Mise à jour des dépendances pip avec correctif de sécurité + - Pillow==9.3.0 + - psycopg2==2.9.5 + - Werkzeug==0.16.1 + - vérifier le diff du fichier pyproject.toml pour toutes les informations +- Mise à jour vers Python==3.7.16 +- Mise à jour poetry==1.3.1 +- Mise à jour multilingual-markdown==1.0.3 +- Mise à jour imagedb avec toutes les mises à jour Odoo +- Le dépôt documentation-user d'Odoo change pour documentation +- Le dépôt odooaktiv/QuotationRevision est supprimé +- Mise à jour de tous les dépôts (91) à fin 2022 +- Renommage du module project_task_subtask_time_range => project_time_budget +- Renommage du module project_task_time_range => project_time_range +- Refactorisation de l'emplacement des scripts, création de répertoires dans ./script/ par sujet +- Utilisation de la commande parallel dans le Makefile +- Mise à jour de la version sphinx +- Amélioration de l'emplacement des scripts + +### Corrigé + +- Script d'installation Debian 11 +- Résultats de tests +- Installation OSX (support non terminé) +- La mise à jour de Poetry supporte '~=' + +### Supprimé + +- Ubuntu 18.04 est cassé, besoin d'installer manuellement nodejs et npm +- Module contract_portal et suppression de la signature dans le portail de contrat, nécessite une mise à jour +- Rétrogradation du module helpdesk_mgmt pour supprimer l'équipe email et le champ de suivi + - Module helpdesk_partner + - Module helpdesk_service_call + - Module helpdesk_supplier + - Module helpdesk_mrp + - Module helpdesk_mailing_list + - Module helpdesk_join_team +- Module project_time_management +- Support de vatnumber, trop ancien +- Dépendances Python dépréciées comme pycrypto + + +## [1.4.0] - 2022-10-05 + +**Note de migration** + +- Mettre à jour les modules `website`,`website_form_builder`. +- Pour le développement, exécuter `poetry cache clear --all pypi` + +### Ajouté + +- Script run_parallel_test.sh pour exécuter tous les tests en parallèle pour une meilleure vitesse d'exécution +- Documentation pour utiliser Docker en production +- Ajout de dépôts : + - Ajepe odoo-addons pour supporter restful + - OmniaGIT Odoo PLM + - MathBenTech family-management + - erplibre-3D-printing-addons +- Ajout de modules : + - iohub_connector pour supporter mqtt + - website_snippet_all pour installer tous les snippets, extraits de tous les thèmes + - website_blog_snippet_all pour installer website_snippet_all avec website_blog et les snippets associés + - sinerkia_jitsi_meet pour intégrer Jitsi + - erplibre_website_snippets_jitsi pour intégrer Jitsi dans les snippets, travail en cours +- Ajout de modules par défaut : + - auto_backup + - muk_website_branding + - website_snippet_anchor + - website_anchor_smooth_scroll + - crm_team_quebec + - partner_no_vat +- Documentation Odoo dev +- Commande de formatage pour les addons supportés +- Installation de thème avec la commande Odoo +- Script pour installer les addons de thème +- Image du site web avec thème par défaut +- Image démo erplibre +- Tests avec couverture + +### Modifié + +- Rétrogradation de sphinx à 1.6.7 pour supporter la documentation Odoo dev +- Mise à jour vers poetry==1.1.14 +- Mise à jour des dépendances pip avec correctif de sécurité + - Pillow==9.0.1 + - PyPDF2==1.27.8 + - lxml==4.9.1 +- Le code generator exporte le site web avec les pièces jointes et le fichier de design scss avec documentation +- Le code generator supporte les snippets multiples +- Dans le dépôt Numigi_odoo-project-addons, renommage du module project_template en project_template_numigi +- Dans le dépôt Numigi_odoo-product-addons, renommage du module product_dimension en product_dimension_numigi +- Dans le dépôt Numigi_odoo-partner-addons, réactivation du module auto-install +- Dans le dépôt muk-it_muk_website, réactivation du module auto-install + +### Corrigé + +- Poetry supporte les dépendances Python insensibles à la casse +- Le nouveau projet du code generator supporte les chemins relatifs et vérifie les chemins dupliqués +- Couleur d'arrière-plan de l'en-tête de tableau du thème web Muk et survol pour Many2many +- Le script docker-compose utilise des noms en minuscules +- website_form_builder support HTML et option pour aligner le bouton d'envoi +- Cherry-pick Odoo de 2 commits correctif bus +- Correction mineure de couleur CSS dans le module hr_theme du dépôt CybroOdoo_OpenHRMS +- Faute de frappe dans la tâche de projet lors de la saisie du temps + +### Supprimé + +- Paquet de module erplibre de ERPLibre_erplibre_addons, utiliser à la place la création d'image, voir le Makefile + + +## [1.3.0] - 2022-01-25 + +**Note de migration** + +Avec la nouvelle version de poetry, un bogue survient lors de la mise à jour. La solution est de supprimer le répertoire pour le laisser +se recréer. `rm -rf ~/.poetry` + +### Ajouté + +- Le code generator supporte les vues : activity, calendar, diagram, form, graph, kanban, pivot, search, timeline et tree +- Le code generator supporte la création de champs de vue portail et de formulaires +- Le code generator génère des snippets génériques pour demo_portal +- Le code generator génère code_generator avec code_generator_code_generator +- Le code generator teste le migrateur mariadb +- Le code generator supporte l'interprétation javascript pour les snippets +- Le code generator supporte l'héritage +- Nouveau projet du code generator pour créer la suite de génération de code +- Script pour tester la génération du module `code_generator` +- Make test_full_fast pour exécuter tous les tests en parallèle +- Module `web_timeline` et `web_diagram_position` dans l'image de base. +- Module `odoo-formio` de novacode-nl +- Module `design_themes` d'Odoo +- Formatage de l'en-tête Python avec isort + +### Modifié + +- Mise à jour vers Python==3.7.12 +- Mise à jour vers poetry==1.1.12 +- Mise à jour des dépendances pip avec correctif de sécurité + - Pillow==9.0.0 + - lxml==4.7.1 + - babel==2.9.1 + - pyyaml==6.0 + - reportlab==3.6.5 +- Le module web diagram a toutes les couleurs de l'arc-en-ciel en option +- Refactorisation et simplification du code du code_generator, meilleur support du lecteur de code + +### Corrigé + +- Rétrogradation Werkzeug==0.11.15, seule cette version est supportée par Odoo 12.0. Cela corrige certaines requêtes HTTP derrière un proxy. + + +## [1.2.1] - 2021-09-28 + +### Ajouté + +- doc/migration.md + +### Modifié + +- Mise à jour des dépendances pip avec correctif de sécurité + - Jinja2==2.11.3 + - lxml==4.6.3 + - cryptography==3.4.8 + - psutil==5.6.6 + - Pillow==8.3.2 + - Werkzeug==0.15.3 +- Séparation du script generate_config.sh de install_locally.sh +- Amélioration de la documentation développeur +- Plus de scripts Docker + +#### Code generator + +- Amélioration du code de génération db_servers +- Amélioration du menu UI de l'assistant de génération + +### Corrigé + +- Élément de menu vue mobile dans l'interface Web de muk_web_theme + + +## [1.2.0] - 2021-07-21 + +**Note de migration** + +Parce que le dépôt d'addons a changé, le fichier de configuration doit être mis à jour. + +- Lors de la mise à niveau vers la version 1.2.0 : + - Depuis docker + - Cloner le projet si vous avez seulement téléchargé docker-compose + - `git init` + - `git remote add origin https://github.com/erplibre/erplibre` + - `git fetch` + - `mv ./docker-compose.yml /tmp/temp_docker-compose.yml` + - `git checkout master` + - `mv /tmp/temp_docker-compose.yml ./docker-compose.yml` + - Mettre à jour `./docker-compose.yml` selon les différences avec git. + - Exécuter le script `make docker_exec_erplibre_gen_config` + - Redémarrer le docker `make docker_restart_daemon` + - Depuis une installation vanilla + - Exécuter le script `make install_dev` + - Redémarrer votre daemon + - Régénérer le mot de passe maître manuellement + +### Ajouté + +- Adaptation du script pour donner un statut d'exécution +- Markdown multilingue +- Guide pour utiliser Cloudflare avec DDNS +- Script pour vérifier le diff git et ignorer la date +- Dépôt avec l'image ERPLibre +- Amélioration de l'utilisation du dépôt git, filtrer les dépôts par cas d'utilisation +- Thème de site web ERPLibre de TechnoLibre +- Snippet de site web ERPLibre + - Snippets HTML de base + - Snippet carte + - Snippets chronologie +- Module contract_digitized_signature avec contract_portal +- Module disable auto_backup +- Commande CLI Odoo db pour manipuler la restauration de base de données +- Commande CLI Odoo i18n pour générer les fichiers pot i18n + +#### Makefile + +- Formatage du code +- Test du code generator +- Installation des addons +- Installation du système d'exploitation +- Restauration de base de données +- Exécution Docker + +#### Code generator + +- Code generator pour les modules Odoo, dépendant d'ERPLibre +- Support des cartes géospatiales +- Support i18n +- Script pour transformer Python et XML en script d'écriture de code Python pour se régénérer eux-mêmes + +### Modifié + +- Mise à jour des dépendances Python avec Poetry +- Formatage de tout le code Python avec black +- Module auto_backup avec clé d'hôte sftp +- Le module muk_website_branding utilise le branding ERPLibre +- Mise à jour de la documentation avec le support vscode, mise en page de document personnalisée, modèle d'email personnalisé et astuce pour utiliser les paramètres de partage + de variables + +#### Docker + +- Utilisation de l'image buster python 3.7.7 pour supprimer pyenv +- Mise à jour de PostgreSQL pour supporter PostGIS +- Support du volume addons /ERPLibre/addons/addons + +### Corrigé + +- Installation Ubuntu +- Installation de Poetry +- Le géospatial avec PostGIS peut être installé + + +## [1.1.1] - 2020-12-11 + +### Ajouté + +- Documentation développeur, test, migration et utilisateur +- Branding ERPLibre avec muk_branding +- Désinstallation de module depuis les paramètres Odoo +- Makefile pour générer la documentation ERPLibre (travail en cours) +- Support Docker du volume sur /etc/odoo +- Support Docker de la mise à jour de base de données + +### Modifié + +- Meilleure documentation sur l'utilisation d'ERPLibre et les versions +- Support de wkhtmltox_0.12.6-1 + +### Corrigé + +- db_backup pour accepter la clé d'hôte publique sur sftp +- Dépendances Docker +- Gel de la version poetry 1.0.10 + + +## [1.1.0] - 2020-09-30 + +### Ajouté + +- Docker +- Pyenv pour gérer les versions Python +- Poetry pour gérer les dépendances Python + - Script poetry_update pour rechercher toutes les dépendances dans les addons +- Travis CI (travail en cours) +- TODO.md +- Guide pour mettre à jour tous les dépôts avec la communauté +- Mise à jour du manifeste + - Ajout des dépôts OCA manquants + - Ajout de médical, gestion immobilière et plus + - Ajout du dépôt cloud/saas + +### Modifié + +- Mise à jour vers Odoo Community 12.0 et tous les addons +- Renommage de venv en .venv +- Plus de documentation sur l'utilisation d'ERPLibre + + +## [1.0.1] - 2020-07-14 + +### Ajouté + +- Amélioration de la documentation avec l'environnement de développement et de production +- Amélioration de la documentation avec le dépôt git +- Déplacement du manifeste default.xml à la racine, l'emplacement par défaut +- Support de default.staged.xml pour mettre à jour la prod avec le dev +- Fonctionnalité pour afficher le diff entre les manifestes ou entre les dépôts de différents manifestes +- Mise à jour du manifeste + - Thème Muk dans erplibre_base + - Ajout du brouillon d'approbation de facture dans le portail + - Nouveau module sale_fix_update_price_unit_when_update_qty + - Nouveau module account_invoice_approbation + - Nouveau module sale_margin_editor + +### Corrigé + +- Installation de production avec git_repo + + +## [1.0.0] - 2020-07-04 + +### Ajouté + +- Environnement de développement, découverte et production avec documentation et scripts. +- Google git-repo pour supporter le dépôt d'addons au lieu d'utiliser les sous-modules Git. + +### Supprimé + +- Sous-modules Git + + +## [0.1.1] - 2020-04-28 + +### Ajouté + +- Support du helpdesk fournisseur, assistant, employé et services +- Support de [SanteLibre.ca](https://santelibre.ca) avec MRP, site web, RH, commerce en ligne +- Module de don avec thermomètre pour le site web +- Script pour forker le projet et tous les dépôts en sous-module pour créer ERPLibre + + +## [0.1.0] - 2020-04-20 + +### Ajouté + +- Déplacement du projet de https://github.com/mathbentech/InstallScript vers ERPLibre. +- Support d'Odoo Community 12.0 2019-11-19 94bcbc92e5e5a6fd3de7267e3c01f8c11fb045f4. + +### Modifié + +- Support de scrummer, projet, vente, site web, helpdesk et RH +- Support de Nginx et amélioration de l'installation + +### Corrigé + +- Support uniquement de python3.6 et python3.7, python3.8 cause des erreurs à l'exécution. + + +[Unreleased]: https://github.com/ERPLibre/ERPLibre/compare/v1.6.0...HEAD + +[1.6.0]: https://github.com/ERPLibre/ERPLibre/compare/v1.5.0...v1.6.0 + +[1.5.0]: https://github.com/ERPLibre/ERPLibre/compare/v1.4.0...v1.5.0 + +[1.4.0]: https://github.com/ERPLibre/ERPLibre/compare/v1.3.0...v1.4.0 + +[1.3.0]: https://github.com/ERPLibre/ERPLibre/compare/v1.2.1...v1.3.0 + +[1.2.1]: https://github.com/ERPLibre/ERPLibre/compare/v1.2.0...v1.2.1 + +[1.2.0]: https://github.com/ERPLibre/ERPLibre/compare/v1.1.1...v1.2.0 + +[1.1.1]: https://github.com/ERPLibre/ERPLibre/compare/v1.0.1...v1.1.1 + +[1.1.0]: https://github.com/ERPLibre/ERPLibre/compare/v1.0.1...v1.1.0 + +[1.0.1]: https://github.com/ERPLibre/ERPLibre/compare/v1.0.0...v1.0.1 + +[1.0.0]: https://github.com/ERPLibre/ERPLibre/compare/v0.1.1...v1.0.0 + +[0.1.1]: https://github.com/ERPLibre/ERPLibre/compare/v0.1.0...v0.1.1 + +[0.1.0]: https://github.com/ERPLibre/ERPLibre/releases/tag/v0.1.0 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 581c532..2e5ef15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ + # Changelog All notable changes to this project will be documented in this file. @@ -5,6 +6,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com). This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + ## [Unreleased] **Migration notes** @@ -36,6 +38,7 @@ Recreating the virtual environment, use installation guide from tool `make`. - Format script search diff file into each repository - Support neutralize database from Odoo + ## [1.6.0] - 2025-04-25 ## Added @@ -77,12 +80,14 @@ Recreating the virtual environment, use installation guide from tool `make`. - OSX and recent Ubuntu installation - Cloudflare script integration + ## [1.5.0] - 2023-07-07 **Migration notes** Recreating the virtual environment + ```bash rm -rf ~/.poetry rm -rf ~/.pyenv @@ -93,8 +98,10 @@ rm -rf ./.venv make install ``` + Do a backup of your database and update all modules : + ```bash ./run.sh --no-http --stop-after-init -d DATABASE -u all ``` @@ -159,6 +166,7 @@ Do a backup of your database and update all modules : - Support of vatnumber, too old - Deprecated python dependency like pycrypto + ## [1.4.0] - 2022-10-05 **Migration note** @@ -226,6 +234,7 @@ Do a backup of your database and update all modules : - Module package erplibre from ERPLibre_erplibre_addons and use instead image creation, check Makefile + ## [1.3.0] - 2022-01-25 **Migration note** @@ -267,6 +276,7 @@ recreate. `rm -rf ~/.poetry` - Downgrade Werkzeug==0.11.15, only this version is supported by Odoo 12.0. This fixes some http request behind a proxy. + ## [1.2.1] - 2021-09-28 ### Added @@ -295,6 +305,7 @@ recreate. `rm -rf ~/.poetry` - Mobile view menu item in Web interface from muk_web_theme + ## [1.2.0] - 2021-07-21 **Migration note** @@ -373,6 +384,7 @@ Because addons repository has change, config file need to be updated. - Poetry installation - Geospatial with postgis can be installed + ## [1.1.1] - 2020-12-11 ### Added @@ -395,6 +407,7 @@ Because addons repository has change, config file need to be updated. - Docker dependency - Freeze poetry version 1.0.10 + ## [1.1.0] - 2020-09-30 ### Added @@ -417,6 +430,7 @@ Because addons repository has change, config file need to be updated. - Rename venv to .venv - More documentation on how to use ERPLibre + ## [1.0.1] - 2020-07-14 ### Added @@ -437,6 +451,7 @@ Because addons repository has change, config file need to be updated. - Production installation with git_repo + ## [1.0.0] - 2020-07-04 ### Added @@ -448,6 +463,7 @@ Because addons repository has change, config file need to be updated. - Git submodule + ## [0.1.1] - 2020-04-28 ### Added @@ -457,6 +473,7 @@ Because addons repository has change, config file need to be updated. - Donation module with thermometer for website - Script to fork project and all repos in submodule to create ERPLibre + ## [0.1.0] - 2020-04-20 ### Added @@ -473,6 +490,7 @@ Because addons repository has change, config file need to be updated. - Support only python3.6 and python3.7, python3.8 causes error in runtime. + [Unreleased]: https://github.com/ERPLibre/ERPLibre/compare/v1.6.0...HEAD [1.6.0]: https://github.com/ERPLibre/ERPLibre/compare/v1.5.0...v1.6.0 @@ -497,4 +515,4 @@ Because addons repository has change, config file need to be updated. [0.1.1]: https://github.com/ERPLibre/ERPLibre/compare/v0.1.0...v0.1.1 -[0.1.0]: https://github.com/ERPLibre/ERPLibre/releases/tag/v0.1.0 +[0.1.0]: https://github.com/ERPLibre/ERPLibre/releases/tag/v0.1.0 \ No newline at end of file diff --git a/README.base.md b/README.base.md new file mode 100644 index 0000000..13bd9ab --- /dev/null +++ b/README.base.md @@ -0,0 +1,426 @@ + + + + + + + +# ERPLibre + + + +ERPLibre is a CRM/ERP platform including automated installation, maintenance, and development of open source modules of +the Odoo community version. It is a "soft-fork" of the Odoo Community Edition (OCE), meaning it aims at contributing +back upstream. +It is based on a set of production-ready modules, supported by the Odoo Community Association (OCA) and an +ecosystem of specialized companies. This solution ensures digital sovereignty in a local environment while integrating +pre-trained Generative Transformers (GPT), bringing an additional dimension to data management and automation. + + + +ERPLibre est une plateforme CRM/ERP incluant l'installation, la maintenance et le developpement automatises de modules +open source de la version communautaire d'Odoo. C'est un "soft-fork" de l'Odoo Community Edition (OCE), ce qui signifie +qu'il vise a contribuer en amont. +Il est base sur un ensemble de modules prets pour la production, supportes par l'Odoo Community Association (OCA) et un +ecosysteme d'entreprises specialisees. Cette solution assure la souverainete numerique dans un environnement local tout +en integrant des Transformers Generatifs Pre-entraines (GPT), apportant une dimension supplementaire a la gestion des +donnees et a l'automatisation. + + + +Follow us on Mastodon : https://fosstodon.org/@erplibre + + + +Suivez-nous sur Mastodon : https://fosstodon.org/@erplibre + + + +# Features + +- **Multi-version Odoo support** : run Odoo 12.0, 13.0, 14.0, 15.0, 16.0, 17.0 and 18.0 in the same workspace, with independent Python virtual environments (`.venv.erplibre` and `.venv.odooXX`) +- **Interactive CLI (TODO.py)** : guided interactive tool for installation, execution, database management, code formatting, mobile compilation, and more. Launch it with `make` +- **Code generator** : generate Odoo modules automatically with support for views, portal, snippets, inheritance, i18n, and JavaScript +- **Selenium automation** : web testing and automation with Selenium Grid, video recording, and login automation +- **Mobile application** : ERPLibre Home Mobile (Owl + Capacitor), compiled and deployed via TODO.py +- **Docker deployment** : production-ready Docker images with PostgreSQL 18 and PostGIS +- **Deployment tools** : Nginx, Apache, Cloudflare DDNS, Certbot SSL, systemd services +- **Database tools** : backup, restore, clone, migration between versions, production-to-dev migration +- **Performance tools** : request-per-second measurement, parallel test execution, coverage analysis + + + +# Fonctionnalites + +- **Support multi-version Odoo** : executez Odoo 12.0, 13.0, 14.0, 15.0, 16.0, 17.0 et 18.0 dans le meme espace de travail, avec des environnements virtuels Python independants (`.venv.erplibre` et `.venv.odooXX`) +- **CLI interactif (TODO.py)** : outil interactif guide pour l'installation, l'execution, la gestion de bases de donnees, le formatage de code, la compilation mobile, et plus encore. Lancez-le avec `make` +- **Generateur de code** : generez des modules Odoo automatiquement avec support des vues, portail, snippets, heritage, i18n et JavaScript +- **Automatisation Selenium** : tests web et automatisation avec Selenium Grid, enregistrement video et automatisation de connexion +- **Application mobile** : ERPLibre Home Mobile (Owl + Capacitor), compilee et deployee via TODO.py +- **Deploiement Docker** : images Docker pretes pour la production avec PostgreSQL 18 et PostGIS +- **Outils de deploiement** : Nginx, Apache, Cloudflare DDNS, Certbot SSL, services systemd +- **Outils de base de donnees** : sauvegarde, restauration, clonage, migration entre versions, migration production vers developpement +- **Outils de performance** : mesure de requetes par seconde, execution de tests en parallele, analyse de couverture + + + +# Supported Odoo versions + + + +# Versions Odoo supportees + + + +| Odoo version | Python | Status | +|--------------|---------|------------| +| 18.0 | 3.12.10 | Active | +| 17.0 | 3.10.18 | Inactive | +| 16.0 | 3.10.18 | Inactive | +| 15.0 | 3.8.20 | Deprecated | +| 14.0 | 3.8.20 | Deprecated | +| 13.0 | 3.7.17 | Deprecated | +| 12.0 | 3.7.17 | Deprecated | + + + +Switch between versions with `make switch_odoo_18`, `make switch_odoo_16`, etc. + + + +Changez de version avec `make switch_odoo_18`, `make switch_odoo_16`, etc. + + + +# Supported platforms + +- **Linux** : Ubuntu 20.04, 22.04, 24.04, 25.04; Debian 12; Arch Linux +- **macOS** : via pyenv +- **Windows** : via WSL or Docker +- **Mainframe** : 390x architecture + + + +# Plateformes supportees + +- **Linux** : Ubuntu 20.04, 22.04, 24.04, 25.04; Debian 12; Arch Linux +- **macOS** : via pyenv +- **Windows** : via WSL ou Docker +- **Mainframe** : architecture 390x + + + +# Installation + +## Easy installation on Ubuntu or Debian using Docker + +This has been tested in Debian 12 and Ubuntu 24.04 LTS. + +**Note** : This is meant for a test environment, on a local network or similar environment not directly exposed to the +Internet. + + + +# Installation + +## Installation facile sur Ubuntu ou Debian avec Docker + +Ceci a ete teste sur Debian 12 et Ubuntu 24.04 LTS. + +**Note** : Ceci est prevu pour un environnement de test, sur un reseau local ou un environnement similaire non expose +directement a Internet. + + + +1. Make sure Docker and nginx web server are installed:
+ ```sudo apt install docker.io docker-compose-v2 nginx``` +1. Get the latest ERPLibre Docker compose file:
+ ```wget https://raw.githubusercontent.com/ERPLibre/ERPLibre/v1.6.0/docker-compose.yml``` +1. Install and run ERPLibre with Docker running as a daemon (web server):
+ ```sudo docker compose up -d``` +1. Open the final installation step at this web page :
+ ```http://[server IP]:8069```
+ ![odoo_first_installation.png](doc/image/odoo_first_installation.png) +1. Finish the installation by providing a database name, email and password. then click on **Create Database**. + Depending on your system resources **this may take more than 2 minutes without feedback !** Check your browser + loading indicator. +1. Next, the web page will reload itself, and you should see the Applications list in ERPLibre:
+ ![odoo_application_list.png](doc/image/odoo_application_list.png) + + You can now personalize your ERPLibre installation. + + + +1. Assurez-vous que Docker et le serveur web nginx sont installes :
+ ```sudo apt install docker.io docker-compose-v2 nginx``` +1. Obtenez le dernier fichier Docker compose d'ERPLibre :
+ ```wget https://raw.githubusercontent.com/ERPLibre/ERPLibre/v1.6.0/docker-compose.yml``` +1. Installez et lancez ERPLibre avec Docker en mode daemon (serveur web) :
+ ```sudo docker compose up -d``` +1. Ouvrez l'etape finale d'installation a cette page web :
+ ```http://[server IP]:8069```
+ ![odoo_first_installation.png](doc/image/odoo_first_installation.png) +1. Terminez l'installation en fournissant un nom de base de donnees, un courriel et un mot de passe, puis cliquez sur **Create Database**. + Selon les ressources de votre systeme, **cela peut prendre plus de 2 minutes sans retour visuel !** Verifiez + l'indicateur de chargement de votre navigateur. +1. Ensuite, la page web se rechargera automatiquement et vous devriez voir la liste des applications dans ERPLibre :
+ ![odoo_application_list.png](doc/image/odoo_application_list.png) + + Vous pouvez maintenant personnaliser votre installation ERPLibre. + + + +For more information, read [Docker guide](./docker/README.md). + +## Install from source code + +### Automated installation + + + +Pour plus d'informations, consultez le [guide Docker](./docker/README.md). + +## Installation depuis le code source + +### Installation automatisee + + + +For Debian/Ubuntu + + + +Pour Debian/Ubuntu + + + +```bash +sudo apt install make python3 +``` + + + +Clone the project: + + + +Clonez le projet : + + + +```bash +git clone https://github.com/ERPLibre/ERPLibre.git +cd ERPLibre +``` + + + +Follow the instruction on the following script, it will try to detect your environment. + + + +Suivez les instructions du script suivant, il essaiera de detecter votre environnement. + + + +```bash +make +``` + + + +### Manually + +Into Ubuntu, minimal dependency: + + + +### Manuellement + +Sous Ubuntu, dependance minimale : + + + +```bash +sudo apt install make git curl +``` + + + +Into Ubuntu, developer dependency: + + + +Sous Ubuntu, dependance developpeur : + + + +```bash +sudo apt install make build-essential libssl-dev zlib1g-dev libreadline-dev libsqlite3-dev curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev liblzma-dev libbz2-dev libldap2-dev libsasl2-dev +``` + + + +Clone the project: + + + +Clonez le projet : + + + +```bash +git clone https://github.com/ERPLibre/ERPLibre.git +cd ERPLibre +``` + + + +Support Ubuntu 20.04, 22.04, 24.04, 25.04 and OSX. + + + +Support Ubuntu 20.04, 22.04, 24.04, 25.04 et OSX. + + + +```bash +make install_os +make install_odoo_18 +``` + + + +Install a specific Odoo version: + + + +Installez une version specifique d'Odoo : + + + +```bash +make install_odoo_16 +make install_odoo_17 +make install_odoo_18 +``` + + + +Update your configuration if you need to run from another interface than 127.0.0.1, file `config.conf` + + + +Mettez a jour votre configuration si vous devez executer depuis une autre interface que 127.0.0.1, fichier `config.conf` + + + +``` +xmlrpc_interface = 0.0.0.0 +``` + + + +Show version : + + + +Afficher la version : + + + +```bash +make version +``` + + + +Ready to execute: + + + +Pret a executer : + + + +```bash +make run +``` + + + +# Test + +Execute ERPLibre test with his code generator. + + + +# Test + +Executez les tests ERPLibre avec son generateur de code. + + + +```bash +time make test_full_fast +``` + + + +# Documentation + +| Guide | Description | +|-------|-------------| +| [DISCOVER](doc/DISCOVER.md) | Learn and explore ERPLibre | +| [DEVELOPMENT](doc/DEVELOPMENT.md) | Development environment setup | +| [PRODUCTION](doc/PRODUCTION.md) | Production server deployment | +| [RUN](doc/RUN.md) | Execution modes and use cases | +| [CODE_GENERATOR](doc/CODE_GENERATOR.md) | Odoo module code generation | +| [MIGRATION](doc/MIGRATION.md) | Database migration between versions | +| [GIT_REPO](doc/GIT_REPO.md) | Git repository management | +| [POETRY](doc/POETRY.md) | Python dependency management | +| [FAQ](doc/FAQ.md) | Frequently asked questions | +| [HOWTO](doc/HOWTO.md) | How-to guides | +| [WINDOWS_INSTALLATION](doc/WINDOWS_INSTALLATION.md) | Windows installation | + + + +# Documentation + +| Guide | Description | +|-------|-------------| +| [DISCOVER](doc/DISCOVER.md) | Decouvrir et explorer ERPLibre | +| [DEVELOPMENT](doc/DEVELOPMENT.md) | Configuration de l'environnement de developpement | +| [PRODUCTION](doc/PRODUCTION.md) | Deploiement du serveur de production | +| [RUN](doc/RUN.md) | Modes d'execution et cas d'utilisation | +| [CODE_GENERATOR](doc/CODE_GENERATOR.md) | Generation de code de modules Odoo | +| [MIGRATION](doc/MIGRATION.md) | Migration de base de donnees entre versions | +| [GIT_REPO](doc/GIT_REPO.md) | Gestion des depots Git | +| [POETRY](doc/POETRY.md) | Gestion des dependances Python | +| [FAQ](doc/FAQ.md) | Foire aux questions | +| [HOWTO](doc/HOWTO.md) | Guides pratiques | +| [WINDOWS_INSTALLATION](doc/WINDOWS_INSTALLATION.md) | Installation sous Windows | + + + +# Contributing + +See [CONTRIBUTION.md](doc/CONTRIBUTION.md) for guidelines. + + + +# Contribution + +Consultez [CONTRIBUTION.md](doc/CONTRIBUTION.md) pour les directives. + + + +# License + +This project is licensed under the [GNU Affero General Public License v3.0](LICENSE). + + + +# Licence + +Ce projet est sous licence [GNU Affero General Public License v3.0](LICENSE). diff --git a/README.fr.md b/README.fr.md new file mode 100644 index 0000000..a0522e6 --- /dev/null +++ b/README.fr.md @@ -0,0 +1,187 @@ + + +# ERPLibre + + +ERPLibre est une plateforme CRM/ERP incluant l'installation, la maintenance et le developpement automatises de modules +open source de la version communautaire d'Odoo. C'est un "soft-fork" de l'Odoo Community Edition (OCE), ce qui signifie +qu'il vise a contribuer en amont. +Il est base sur un ensemble de modules prets pour la production, supportes par l'Odoo Community Association (OCA) et un +ecosysteme d'entreprises specialisees. Cette solution assure la souverainete numerique dans un environnement local tout +en integrant des Transformers Generatifs Pre-entraines (GPT), apportant une dimension supplementaire a la gestion des +donnees et a l'automatisation. + + +Suivez-nous sur Mastodon : https://fosstodon.org/@erplibre + + +# Fonctionnalites + +- **Support multi-version Odoo** : executez Odoo 12.0, 13.0, 14.0, 15.0, 16.0, 17.0 et 18.0 dans le meme espace de travail, avec des environnements virtuels Python independants (`.venv.erplibre` et `.venv.odooXX`) +- **CLI interactif (TODO.py)** : outil interactif guide pour l'installation, l'execution, la gestion de bases de donnees, le formatage de code, la compilation mobile, et plus encore. Lancez-le avec `make` +- **Generateur de code** : generez des modules Odoo automatiquement avec support des vues, portail, snippets, heritage, i18n et JavaScript +- **Automatisation Selenium** : tests web et automatisation avec Selenium Grid, enregistrement video et automatisation de connexion +- **Application mobile** : ERPLibre Home Mobile (Owl + Capacitor), compilee et deployee via TODO.py +- **Deploiement Docker** : images Docker pretes pour la production avec PostgreSQL 18 et PostGIS +- **Outils de deploiement** : Nginx, Apache, Cloudflare DDNS, Certbot SSL, services systemd +- **Outils de base de donnees** : sauvegarde, restauration, clonage, migration entre versions, migration production vers developpement +- **Outils de performance** : mesure de requetes par seconde, execution de tests en parallele, analyse de couverture + + +# Versions Odoo supportees + + +| Odoo version | Python | Status | +|--------------|---------|------------| +| 18.0 | 3.12.10 | Active | +| 17.0 | 3.10.18 | Inactive | +| 16.0 | 3.10.18 | Inactive | +| 15.0 | 3.8.20 | Deprecated | +| 14.0 | 3.8.20 | Deprecated | +| 13.0 | 3.7.17 | Deprecated | +| 12.0 | 3.7.17 | Deprecated | + + +Changez de version avec `make switch_odoo_18`, `make switch_odoo_16`, etc. + + +# Plateformes supportees + +- **Linux** : Ubuntu 20.04, 22.04, 24.04, 25.04; Debian 12; Arch Linux +- **macOS** : via pyenv +- **Windows** : via WSL ou Docker +- **Mainframe** : architecture 390x + + +# Installation + +## Installation facile sur Ubuntu ou Debian avec Docker + +Ceci a ete teste sur Debian 12 et Ubuntu 24.04 LTS. + +**Note** : Ceci est prevu pour un environnement de test, sur un reseau local ou un environnement similaire non expose +directement a Internet. + + +Clonez le projet : + + +```bash +git clone https://github.com/ERPLibre/ERPLibre.git +cd ERPLibre +``` + + +Suivez les instructions du script suivant, il essaiera de detecter votre environnement. + + +```bash +make +``` + + +### Manuellement + +Sous Ubuntu, dependance minimale : + + +```bash +sudo apt install make git curl +``` + + +Sous Ubuntu, dependance developpeur : + + +```bash +sudo apt install make build-essential libssl-dev zlib1g-dev libreadline-dev libsqlite3-dev curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev liblzma-dev libbz2-dev libldap2-dev libsasl2-dev +``` + + +Clonez le projet : + + +```bash +git clone https://github.com/ERPLibre/ERPLibre.git +cd ERPLibre +``` + + +Support Ubuntu 20.04, 22.04, 24.04, 25.04 et OSX. + + +```bash +make install_os +make install_odoo_18 +``` + + +Installez une version specifique d'Odoo : + + +```bash +make install_odoo_16 +make install_odoo_17 +make install_odoo_18 +``` + + +Mettez a jour votre configuration si vous devez executer depuis une autre interface que 127.0.0.1, fichier `config.conf` + + +``` +xmlrpc_interface = 0.0.0.0 +``` + + +Afficher la version : + + +```bash +make version +``` + + +Pret a executer : + + +```bash +make run +``` + + +# Test + +Executez les tests ERPLibre avec son generateur de code. + + +```bash +time make test_full_fast +``` + + +# Documentation + +| Guide | Description | +|-------|-------------| +| [DISCOVER](doc/DISCOVER.md) | Decouvrir et explorer ERPLibre | +| [DEVELOPMENT](doc/DEVELOPMENT.md) | Configuration de l'environnement de developpement | +| [PRODUCTION](doc/PRODUCTION.md) | Deploiement du serveur de production | +| [RUN](doc/RUN.md) | Modes d'execution et cas d'utilisation | +| [CODE_GENERATOR](doc/CODE_GENERATOR.md) | Generation de code de modules Odoo | +| [MIGRATION](doc/MIGRATION.md) | Migration de base de donnees entre versions | +| [GIT_REPO](doc/GIT_REPO.md) | Gestion des depots Git | +| [POETRY](doc/POETRY.md) | Gestion des dependances Python | +| [FAQ](doc/FAQ.md) | Foire aux questions | +| [HOWTO](doc/HOWTO.md) | Guides pratiques | +| [WINDOWS_INSTALLATION](doc/WINDOWS_INSTALLATION.md) | Installation sous Windows | + + +# Contribution + +Consultez [CONTRIBUTION.md](doc/CONTRIBUTION.md) pour les directives. + + +# Licence + +Ce projet est sous licence [GNU Affero General Public License v3.0](LICENSE). \ No newline at end of file diff --git a/README.md b/README.md index 15ce7e4..389f516 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ + + # ERPLibre + ERPLibre is a CRM/ERP platform including automated installation, maintenance, and development of open source modules of the Odoo community version. It is a "soft-fork" of the Odoo Community Edition (OCE), meaning it aims at contributing back upstream. @@ -7,8 +10,48 @@ It is based on a set of production-ready modules, supported by the Odoo Communit ecosystem of specialized companies. This solution ensures digital sovereignty in a local environment while integrating pre-trained Generative Transformers (GPT), bringing an additional dimension to data management and automation. + Follow us on Mastodon : https://fosstodon.org/@erplibre + +# Features + +- **Multi-version Odoo support** : run Odoo 12.0, 13.0, 14.0, 15.0, 16.0, 17.0 and 18.0 in the same workspace, with independent Python virtual environments (`.venv.erplibre` and `.venv.odooXX`) +- **Interactive CLI (TODO.py)** : guided interactive tool for installation, execution, database management, code formatting, mobile compilation, and more. Launch it with `make` +- **Code generator** : generate Odoo modules automatically with support for views, portal, snippets, inheritance, i18n, and JavaScript +- **Selenium automation** : web testing and automation with Selenium Grid, video recording, and login automation +- **Mobile application** : ERPLibre Home Mobile (Owl + Capacitor), compiled and deployed via TODO.py +- **Docker deployment** : production-ready Docker images with PostgreSQL 18 and PostGIS +- **Deployment tools** : Nginx, Apache, Cloudflare DDNS, Certbot SSL, systemd services +- **Database tools** : backup, restore, clone, migration between versions, production-to-dev migration +- **Performance tools** : request-per-second measurement, parallel test execution, coverage analysis + + +# Supported Odoo versions + + +| Odoo version | Python | Status | +|--------------|---------|------------| +| 18.0 | 3.12.10 | Active | +| 17.0 | 3.10.18 | Inactive | +| 16.0 | 3.10.18 | Inactive | +| 15.0 | 3.8.20 | Deprecated | +| 14.0 | 3.8.20 | Deprecated | +| 13.0 | 3.7.17 | Deprecated | +| 12.0 | 3.7.17 | Deprecated | + + +Switch between versions with `make switch_odoo_18`, `make switch_odoo_16`, etc. + + +# Supported platforms + +- **Linux** : Ubuntu 20.04, 22.04, 24.04, 25.04; Debian 12; Arch Linux +- **macOS** : via pyenv +- **Windows** : via WSL or Docker +- **Mainframe** : 390x architecture + + # Installation ## Easy installation on Ubuntu or Debian using Docker @@ -18,6 +61,7 @@ This has been tested in Debian 12 and Ubuntu 24.04 LTS. **Note** : This is meant for a test environment, on a local network or similar environment not directly exposed to the Internet. + 1. Make sure Docker and nginx web server are installed:
```sudo apt install docker docker-compose nginx``` 1. Get the latest ERPLibre Docker compose file:
@@ -35,47 +79,94 @@ Internet. You can now personalize your ERPLibre installation. + + +1. Assurez-vous que Docker et le serveur web nginx sont installes :
+ ```sudo apt install docker.io docker-compose-v2 nginx``` +1. Obtenez le dernier fichier Docker compose d'ERPLibre :
+ ```wget https://raw.githubusercontent.com/ERPLibre/ERPLibre/v1.6.0/docker-compose.yml``` +1. Installez et lancez ERPLibre avec Docker en mode daemon (serveur web) :
+ ```sudo docker compose up -d``` +1. Ouvrez l'etape finale d'installation a cette page web :
+ ```http://[server IP]:8069```
+ ![odoo_first_installation.png](doc/image/odoo_first_installation.png) +1. Terminez l'installation en fournissant un nom de base de donnees, un courriel et un mot de passe, puis cliquez sur **Create Database**. + Selon les ressources de votre systeme, **cela peut prendre plus de 2 minutes sans retour visuel !** Verifiez + l'indicateur de chargement de votre navigateur. +1. Ensuite, la page web se rechargera automatiquement et vous devriez voir la liste des applications dans ERPLibre :
+ ![odoo_application_list.png](doc/image/odoo_application_list.png) + + Vous pouvez maintenant personnaliser votre installation ERPLibre. + + + For more information, read [Docker guide](./docker/README.md). ## Install from source code ### Automated installation + + +Pour plus d'informations, consultez le [guide Docker](./docker/README.md). + +## Installation depuis le code source + +### Installation automatisee + + + For Debian/Ubuntu + + +Pour Debian/Ubuntu + + + ```bash sudo apt install make python ``` + Clone the project: + ```bash git clone https://github.com/ERPLibre/ERPLibre.git cd ERPLibre ``` + Follow the instruction on the following script, it will try to detect your environment. + ```bash make ``` + ### Manually Into Ubuntu, minimal dependency: + ```bash sudo apt install make git curl ``` + Into Ubuntu, developer dependency: + ```bash sudo apt install make build-essential libssl-dev zlib1g-dev libreadline-dev libsqlite3-dev curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev liblzma-dev libbz2-dev libldap2-dev libsasl2-dev ``` + Clone the project: + ```bash git clone https://github.com/ERPLibre/ERPLibre.git cd ERPLibre @@ -83,57 +174,76 @@ cd ERPLibre Support Ubuntu 20.04, 22.04, 24.04, 25.04 and OSX. + ```bash make install_os make install_odoo_18 ``` + +Install a specific Odoo version: + +```bash +make install_odoo_16 +``` + + Update your configuration if you need to run from another interface than 127.0.0.1, file `config.conf` + ``` xmlrpc_interface = 0.0.0.0 ``` + Show version : + ```bash make version ``` + Ready to execute: + ```bash make run ``` -### For Windows - -For Windows, read [WINDOWS_INSTALLATION.md](doc/WINDOWS_INSTALLATION.md) - -## Discover guide - -[Guide to run ERPLibre in discover to learn it](./doc/DISCOVER.md). - -## Production guide - -[Guide to run ERPLibre in production server](./doc/PRODUCTION.md). - -## Development guide - -[Guide to run ERPLibre in development environment](./doc/DEVELOPMENT.md). - -# Execution - -[Guide to run ERPLibre with different case](./doc/RUN.md). - -# git-repo - -To change repository like addons, see [GIT_REPO.md](doc/GIT_REPO.md) # Test Execute ERPLibre test with his code generator. + ```bash time make test_full_fast ``` + + +# Documentation + +| Guide | Description | +|-------|-------------| +| [DISCOVER](doc/DISCOVER.md) | Learn and explore ERPLibre | +| [DEVELOPMENT](doc/DEVELOPMENT.md) | Development environment setup | +| [PRODUCTION](doc/PRODUCTION.md) | Production server deployment | +| [RUN](doc/RUN.md) | Execution modes and use cases | +| [CODE_GENERATOR](doc/CODE_GENERATOR.md) | Odoo module code generation | +| [MIGRATION](doc/MIGRATION.md) | Database migration between versions | +| [GIT_REPO](doc/GIT_REPO.md) | Git repository management | +| [POETRY](doc/POETRY.md) | Python dependency management | +| [FAQ](doc/FAQ.md) | Frequently asked questions | +| [HOWTO](doc/HOWTO.md) | How-to guides | +| [WINDOWS_INSTALLATION](doc/WINDOWS_INSTALLATION.md) | Windows installation | + + +# Contributing + +See [CONTRIBUTION.md](doc/CONTRIBUTION.md) for guidelines. + + +# License + +This project is licensed under the [GNU Affero General Public License v3.0](LICENSE). diff --git a/TODO.base.md b/TODO.base.md new file mode 100644 index 0000000..f2d4aaa --- /dev/null +++ b/TODO.base.md @@ -0,0 +1,79 @@ + + + + + + +# TODO + +## Deb installation +devops_erplibre need sshpass + +## Simplify push tag +For RELEASE.md, replace next value by a script to select all remote by manifest file. +Actually, need to push manually all different remote. + + +# À FAIRE + +## Installation Deb +devops_erplibre a besoin de sshpass + +## Simplifier le push des tags +Pour RELEASE.md, remplacer la valeur suivante par un script pour sélectionner tous les dépôts distants par fichier manifest. +Actuellement, il faut pousser manuellement tous les différents dépôts distants. + + +> .venv.erplibre/bin/repo forall -pc "git push ERPLibre --tags" + + +## Funding +- Add funding for MathBenTech and TechnoLibre + +## Improve repo init usage +- Support run repo init without human interaction. Do we need to create a temporary user name? + +## Improve repo sync usage +- Test repo sync with argument -d +- Test repo sync with argument -t SMART_TAG, like tag ERPLibre/v1.0.0 + +## Git diff +### Between 2 commits +- Show all modified file, files list. +- Show if probably has conflict if cherry-pick in wrong order, +- Show modify same line in different commit + +## Development +### Run with another address ip than local +- Remove xmlrpc_interface in config file when running dev installation +- Improve config builder with a Python script + +### Variable in new instance +- Add technique to add variable when create a new instance from config files +- Documentation for adding mail server, a guide for every one + + +## Financement +- Ajouter du financement pour MathBenTech et TechnoLibre + +## Améliorer l'utilisation de repo init +- Supporter l'exécution de repo init sans interaction humaine. Faut-il créer un nom d'utilisateur temporaire ? + +## Améliorer l'utilisation de repo sync +- Tester repo sync avec l'argument -d +- Tester repo sync avec l'argument -t SMART_TAG, comme le tag ERPLibre/v1.0.0 + +## Git diff +### Entre 2 commits +- Afficher tous les fichiers modifiés, liste des fichiers. +- Montrer s'il y a probablement un conflit si le cherry-pick est dans le mauvais ordre, +- Montrer les modifications sur la même ligne dans différents commits + +## Développement +### Exécuter avec une autre adresse IP que locale +- Supprimer xmlrpc_interface dans le fichier de configuration lors de l'installation dev +- Améliorer le constructeur de configuration avec un script Python + +### Variable dans une nouvelle instance +- Ajouter une technique pour ajouter des variables lors de la création d'une nouvelle instance depuis les fichiers de configuration +- Documentation pour ajouter un serveur de messagerie, un guide pour tout le monde diff --git a/TODO.fr.md b/TODO.fr.md new file mode 100644 index 0000000..54a6831 --- /dev/null +++ b/TODO.fr.md @@ -0,0 +1,36 @@ + +# À FAIRE + +## Installation Deb +devops_erplibre a besoin de sshpass + +## Simplifier le push des tags +Pour RELEASE.md, remplacer la valeur suivante par un script pour sélectionner tous les dépôts distants par fichier manifest. +Actuellement, il faut pousser manuellement tous les différents dépôts distants. + +> .venv.erplibre/bin/repo forall -pc "git push ERPLibre --tags" + +## Financement +- Ajouter du financement pour MathBenTech et TechnoLibre + +## Améliorer l'utilisation de repo init +- Supporter l'exécution de repo init sans interaction humaine. Faut-il créer un nom d'utilisateur temporaire ? + +## Améliorer l'utilisation de repo sync +- Tester repo sync avec l'argument -d +- Tester repo sync avec l'argument -t SMART_TAG, comme le tag ERPLibre/v1.0.0 + +## Git diff +### Entre 2 commits +- Afficher tous les fichiers modifiés, liste des fichiers. +- Montrer s'il y a probablement un conflit si le cherry-pick est dans le mauvais ordre, +- Montrer les modifications sur la même ligne dans différents commits + +## Développement +### Exécuter avec une autre adresse IP que locale +- Supprimer xmlrpc_interface dans le fichier de configuration lors de l'installation dev +- Améliorer le constructeur de configuration avec un script Python + +### Variable dans une nouvelle instance +- Ajouter une technique pour ajouter des variables lors de la création d'une nouvelle instance depuis les fichiers de configuration +- Documentation pour ajouter un serveur de messagerie, un guide pour tout le monde \ No newline at end of file diff --git a/TODO.md b/TODO.md index 4866dce..bf278f8 100644 --- a/TODO.md +++ b/TODO.md @@ -1,3 +1,4 @@ + # TODO ## Deb installation @@ -6,6 +7,7 @@ devops_erplibre need sshpass ## Simplify push tag For RELEASE.md, replace next value by a script to select all remote by manifest file. Actually, need to push manually all different remote. + > .venv.erplibre/bin/repo forall -pc "git push ERPLibre --tags" ## Funding diff --git a/conf/make.documentation.Makefile b/conf/make.documentation.Makefile index ab2569f..20f69bb 100644 --- a/conf/make.documentation.Makefile +++ b/conf/make.documentation.Makefile @@ -81,7 +81,7 @@ open_doc_user: doc_clean_user: make -C doc/odoo_documentation-user clean -# documentation markdown +# documentation markdown - generate multilingual documentation (en + fr) .PHONY: doc_markdown doc_markdown: - ./.venv.erplibre/bin/mmg --verbose --yes ./doc/CODE_GENERATOR.base.md + source ./.venv.erplibre/bin/activate && find . -name "*.base.md" -not -path "./.venv*" -not -path "./addons/*" -not -path "./odoo*" -not -path "./.repo/*" -not -path "./node_modules/*" -exec mmg --verbose --yes {} \; diff --git a/doc/CODE_GENERATOR.fr.md b/doc/CODE_GENERATOR.fr.md index f89746c..14da37d 100644 --- a/doc/CODE_GENERATOR.fr.md +++ b/doc/CODE_GENERATOR.fr.md @@ -1,3 +1,4 @@ + # Comment générer du code Ne jamais exécuter le générateur de code dans un environnement de production, il y a création de dépendances circulaires pouvant causer de la frustration à nettoyer tous les dommages. D'ailleurs, il est nécessaire d'exécuter en mode développement, avec l'argument `--dev cg`. @@ -647,4 +648,4 @@ Tester les générations des templates : ```bash make test_code_generator_template -``` +``` \ No newline at end of file diff --git a/doc/CODE_GENERATOR.md b/doc/CODE_GENERATOR.md index d55049a..e18d3db 100644 --- a/doc/CODE_GENERATOR.md +++ b/doc/CODE_GENERATOR.md @@ -1,3 +1,4 @@ + # How to generate code Never run this on production environment, this create circular dependencies and will cause frustration to clean damage. @@ -412,4 +413,4 @@ TODO ```bash make test_code_generator_template -``` +``` \ No newline at end of file diff --git a/doc/CONTRIBUTION.base.md b/doc/CONTRIBUTION.base.md new file mode 100644 index 0000000..2123088 --- /dev/null +++ b/doc/CONTRIBUTION.base.md @@ -0,0 +1,58 @@ + + + + + + +# Thanks + +## AGILE OPS + +Thanks to [Agile OPS](https://www.linkedin.com/in/michaelfaille/) for contributing to GIT_REPO and docker. + +## MathBenTech + +Thanks to [MathBenTech](https://mathben.tech) for creating ERPLibre project. + +## Marieplume + +Thanks to [Marieplume](https://marieplume.ca) for keeping the language in check. + +## OCA + +Thanks to [Odoo Community Association](https://odoo-community.org) for the collaborative development of Odoo features. + +## TechnoLibre + +Thanks to [TechnoLibre](https://technolibre.ca) for making this enterprise edition of ERPLibre. + +## Yenthe Van Ginneken + +Thanks [Yenthe666 InstallScript](https://github.com/Yenthe666/InstallScript) for your scripting guides and tutorials. + + +# Remerciements + +## AGILE OPS + +Merci à [Agile OPS](https://www.linkedin.com/in/michaelfaille/) pour ses contributions à GIT_REPO et docker. + +## MathBenTech + +Merci à [MathBenTech](https://mathben.tech) pour avoir créé le projet ERPLibre. + +## Marieplume + +Merci à [Marieplume](https://marieplume.ca) pour la révision linguistique. + +## OCA + +Merci à [Odoo Community Association](https://odoo-community.org) pour le développement collaboratif des fonctionnalités Odoo. + +## TechnoLibre + +Merci à [TechnoLibre](https://technolibre.ca) pour avoir fait cette édition entreprise d'ERPLibre. + +## Yenthe Van Ginneken + +Merci à [Yenthe666 InstallScript](https://github.com/Yenthe666/InstallScript) pour vos guides de scripts et tutoriels. diff --git a/doc/CONTRIBUTION.fr.md b/doc/CONTRIBUTION.fr.md new file mode 100644 index 0000000..31253ac --- /dev/null +++ b/doc/CONTRIBUTION.fr.md @@ -0,0 +1,26 @@ + +# Remerciements + +## AGILE OPS + +Merci à [Agile OPS](https://www.linkedin.com/in/michaelfaille/) pour ses contributions à GIT_REPO et docker. + +## MathBenTech + +Merci à [MathBenTech](https://mathben.tech) pour avoir créé le projet ERPLibre. + +## Marieplume + +Merci à [Marieplume](https://marieplume.ca) pour la révision linguistique. + +## OCA + +Merci à [Odoo Community Association](https://odoo-community.org) pour le développement collaboratif des fonctionnalités Odoo. + +## TechnoLibre + +Merci à [TechnoLibre](https://technolibre.ca) pour avoir fait cette édition entreprise d'ERPLibre. + +## Yenthe Van Ginneken + +Merci à [Yenthe666 InstallScript](https://github.com/Yenthe666/InstallScript) pour vos guides de scripts et tutoriels. \ No newline at end of file diff --git a/doc/CONTRIBUTION.md b/doc/CONTRIBUTION.md index 51484e4..0d038fb 100644 --- a/doc/CONTRIBUTION.md +++ b/doc/CONTRIBUTION.md @@ -1,3 +1,4 @@ + # Thanks ## AGILE OPS diff --git a/doc/DEVELOPMENT.base.md b/doc/DEVELOPMENT.base.md new file mode 100644 index 0000000..4df3930 --- /dev/null +++ b/doc/DEVELOPMENT.base.md @@ -0,0 +1,544 @@ + + + + + + +# Development guide + +Setup your environment to develop modules and debug the platform. + +## Local installation procedure + +### 1. Clone the project: + + +# Guide de developpement + +Configurez votre environnement pour developper des modules et deboguer la plateforme. + +## Procedure d'installation locale + +### 1. Cloner le projet : + + +```bash +git clone https://github.com/ERPLibre/ERPLibre.git +``` + + +### 2. Execute the script: + + +### 2. Executer le script : + + +```bash +cd ERPLibre +./script/install/install_dev.sh +./script/install/install_locally_dev.sh +``` + + +### 3. Run ERPLibre + + +### 3. Lancer ERPLibre + + +```bash +./run.sh +``` + + +## Develop in Odoo repository + +You need to remove `clone-depth="10"` from `./manifest/default.dev.xml` in order to be able to commit and push. Make a +temporary commit and regenerate with `./script/install/install_locally_dev.sh` + +## Fork project to create a new project independent of ERPLibre (deprecated) + +ERPLibre was created with this script. It's now deprecated. Use this script when you need to fork directly from the +original source. Don't use this script if you want to update from ERPLibre and follow mainstream development. + + +## Developper dans le depot Odoo + +Vous devez supprimer `clone-depth="10"` de `./manifest/default.dev.xml` afin de pouvoir faire des commits et des pushs. Faites un +commit temporaire et regenerez avec `./script/install/install_locally_dev.sh` + +## Forker le projet pour creer un nouveau projet independant d'ERPLibre (obsolete) + +ERPLibre a ete cree avec ce script. Il est maintenant obsolete. Utilisez ce script lorsque vous devez forker directement depuis la +source originale. N'utilisez pas ce script si vous voulez recevoir les mises a jour d'ERPLibre et suivre le developpement principal. + + +```bash +./script/git/fork_project.py --github_token GITHUB_KEY --organization NAME +``` + + +# Fork all repos for you own organization + +Go to your Github account and generate a token to access fork option with your user. Create an organization or use your +personal account and choose your user name. + +This command will fork all repos and ERPLibre to your own organization. It keeps track of ERPLibre. + + +# Forker tous les depots pour votre propre organisation + +Allez dans votre compte Github et generez un jeton pour acceder a l'option de fork avec votre utilisateur. Creez une organisation ou utilisez votre +compte personnel et choisissez votre nom d'utilisateur. + +Cette commande va forker tous les depots et ERPLibre vers votre propre organisation. Elle garde le suivi d'ERPLibre. + + +```bash +./script/git/fork_project_ERPLibre.py --github_token GITHUB_KEY --organization NAME +``` + + +## Generate manifest from csv repo + +Add repo in file [./source_repo_addons.csv](./source_repo_addons.csv) + +Execute to generate Repo manifest + + +## Generer le manifeste a partir du csv des depots + +Ajoutez le depot dans le fichier [./source_repo_addons.csv](./source_repo_addons.csv) + +Executez pour generer le manifeste Repo + + +```bash +./script/git/fork_project_ERPLibre.py --skip_fork +``` + + +## Move database from prod to dev + +Copy the database image into `./image_db/prod_client.zip` and run `make db_restore_prod_client`. This will create a +database +named `prod_client` ready to test. + +When moving database from prod to your dev environment, you want to remove email servers, backups and install user test +in order to test the database. Run: + + +## Deplacer une base de donnees de la prod vers le dev + +Copiez l'image de la base de donnees dans `./image_db/prod_client.zip` et executez `make db_restore_prod_client`. Cela va creer une +base de donnees +nommee `prod_client` prete a tester. + +Lorsque vous deplacez une base de donnees de la prod vers votre environnement de dev, vous voulez supprimer les serveurs de courriel, les sauvegardes et installer l'utilisateur de test +afin de tester la base de donnees. Executez : + + +```bash +./script/database/migrate_prod_to_test.sh DATABASE +``` + + +## Change git url https to Git + +This will update all urls in Git format: + + +## Changer les urls git de https vers Git + +Cela va mettre a jour toutes les urls au format Git : + + +```bash +./script/git/git_change_remote_https_to_git.py +``` + + +## Showing repo differences between projects + +Tools to display the differences between the repo and another project. + + +## Afficher les differences de depots entre les projets + +Outils pour afficher les differences entre le depot et un autre projet. + + +```bash +./script/git/git_change_remote.py --sync_to /path/to/project/erplibre --dry_sync +``` + + +## Showing repo differences with manifest develop + +To understand the divergences with the dev manifest. + + +## Afficher les differences de depots avec le manifeste de developpement + +Pour comprendre les divergences avec le manifeste de dev. + + +```bash +./script/git/git_show_code_diff_repo_manifest.py -m ./manifest/default.dev.xml +``` + + +## Sync repo with another project + +Tools to synchronise the repo with another project. This will show differences and try to checkout on the same commit in +all repos. + + +## Synchroniser les depots avec un autre projet + +Outils pour synchroniser le depot avec un autre projet. Cela va afficher les differences et essayer de se positionner sur le meme commit dans +tous les depots. + + +```bash +./script/git/git_change_remote.py --sync_to /path/to/project/erplibre +``` + + +## Compare two files manifests + +To show differences between commits in different manifests + + +## Comparer deux fichiers manifestes + +Pour afficher les differences entre les commits dans differents manifestes + + +```bash +./script/git/git_diff_repo_manifest.py --input1 ./manifest/MANIFEST1.xml --input2 ./manifest/MANIFEST2.xml +``` + + +## Differences between code and manifest + +To show differences between actual code and manifest + + +## Differences entre le code et le manifeste + +Pour afficher les differences entre le code actuel et le manifeste + + +```bash +./script/git/git_show_code_diff_repo_manifest.py --manifest ./manifest/MANIFEST1.xml +``` + + +## Add repo + +To access a new repo, add your URL to file [source_repo_addons.csv](../source_repo_addons.csv) + +Fork the repo to be able to push new code: + + +## Ajouter un depot + +Pour acceder a un nouveau depot, ajoutez votre URL dans le fichier [source_repo_addons.csv](../source_repo_addons.csv) + +Forkez le depot pour pouvoir pousser du nouveau code : + + +```bash +./script/git/fork_project_ERPLibre.py +``` + + +To regenerate only manifest.xml. + + +Pour regenerer uniquement le manifest.xml. + + +```bash +./script/git/fork_project_ERPLibre.py --skip_fork +``` + + +Check if manifest contains "auto_install" and change the value to False. + + +Verifier si le manifeste contient "auto_install" et changer la valeur a False. + + +```bash +./script/git/repo_remove_auto_install.py +``` + + +## Filter repo by group + +Only keep repo tagged by group 'base' and 'code_generator' + + +## Filtrer les depots par groupe + +Garder uniquement les depots etiquetes par le groupe 'base' et 'code_generator' + + +```bash +./script/manifest/update_manifest_local_dev_code_generator.sh +``` + + +# Execution + +## Config file + +You can limit your addons in ERPlibre config file depending on a group of your actual manifest. + + +# Execution + +## Fichier de configuration + +Vous pouvez limiter vos addons dans le fichier de configuration ERPLibre en fonction d'un groupe de votre manifeste actuel. + + +```bash +./script/git/git_repo_update_group.py --group base,code_generator +./script/generate_config.sh +``` + + +Or go back to normal + + +Ou revenir a la normale + + +```bash +./script/git/git_repo_update_group.py +./script/generate_config.sh +``` + + +# Database + +## Clean database PostgreSQL + +Sometime, it's not possible to delete a database from the database manager `http://127.0.0.1:8069/web/database/manager`, +so you can do it manually. Replace `database_name` by your database name: + + +# Base de donnees + +## Nettoyer une base de donnees PostgreSQL + +Parfois, il n'est pas possible de supprimer une base de donnees depuis le gestionnaire de base de donnees `http://127.0.0.1:8069/web/database/manager`, +vous pouvez donc le faire manuellement. Remplacez `database_name` par le nom de votre base de donnees : + + +```bash +sudo -iu postgres +psql +``` + + +And run: + + +Et executez : + + +```postgres-sql +DROP DATABASE database_name; +``` + + +Exit and delete filestore: + + +Quittez et supprimez le filestore : + + +```bash +rm -r ~/.local/share/Odoo/filestore/database_name +``` + + +# Coding + +## Create module scaffold + + +# Developpement + +## Creer un squelette de module + + +```bash +source ./.venv.erplibre/bin/activate +python odoo/odoo-bin scaffold MODULE_NAME addons/REPO_NAME/ +``` + + +## Use Code generator + +Read CODE_GENERATOR.md. + +# Version + +Read GIT_REPO.md to understand how changer version. + +## Python version + +Your actual version is in file .python-odoo-version. Use script `./script/version/change_python_version.sh 3.7.16` to change +to version 3.7.16 . + +Run the installation, `make install_dev`. + +Update poetry, `./script/poetry/poetry_update.py`. + +Create docker, `make docker_build`. + +### Python version major change + +When you need to change python 3.7.17 to 3.8.10, do : + + +## Utiliser le generateur de code + +Lisez CODE_GENERATOR.md. + +# Version + +Lisez GIT_REPO.md pour comprendre comment changer de version. + +## Version Python + +Votre version actuelle est dans le fichier .python-odoo-version. Utilisez le script `./script/version/change_python_version.sh 3.7.16` pour changer +a la version 3.7.16 . + +Lancez l'installation, `make install_dev`. + +Mettez a jour poetry, `./script/poetry/poetry_update.py`. + +Creez le docker, `make docker_build`. + +### Changement majeur de version Python + +Lorsque vous devez changer de python 3.7.17 a 3.8.10, faites : + + +```bash +rm -r .venv +make install_dev +./.venv.$(cat ".erplibre-version" | xargs)/bin/poetry lock --no-update +``` + + +# Pull request + +## Show all pull requests from organization + + +# Demande de tirage (Pull request) + +## Afficher toutes les demandes de tirage d'une organisation + + +```bash +/script/git/pull_request_ERPLibre.py --github_token ### --organization ERPLibre +``` + + +# Commit + +Use this commit format: + + +# Commit + +Utilisez ce format de commit : + + +```bash +git commit -am "[#ticket] subject: short sentence" +``` + + +# Format code + +## Python + +Use [black](https://github.com/psf/black) + + +# Formatage du code + +## Python + +Utilisez [black](https://github.com/psf/black) + + +```bash +./script/maintenance/black.sh ./addons/TechnoLibre_odoo-code-generator +``` + + +Or if you prefer [oca-autopep8](https://github.com/psf/black) + + +Ou si vous preferez [oca-autopep8](https://github.com/psf/black) + + +```bash +./script/maintenance/autopep8.sh ./addons/TechnoLibre_odoo-code-generator +``` + + +## HTML and css + +Use [prettier](https://github.com/prettier/prettier) + + +## HTML et css + +Utilisez [prettier](https://github.com/prettier/prettier) + + +```bash +./script/maintenance/prettier.sh ./addons/TechnoLibre_odoo-code-generator +``` + + +## Javascript + +Use [prettier](https://github.com/prettier/prettier) + + +## Javascript + +Utilisez [prettier](https://github.com/prettier/prettier) + + +```bash +./script/maintenance/prettier.sh --tab-width 4 ./addons/TechnoLibre_odoo-code-generator +``` + + +# Pre-commit + +You can install pre-commit to auto-format and check lint with OCA configuration. This +will run before commit with git. + +Check https://github.com/OCA/maintainer-tools/wiki/Install-pre-commit + + +# Pre-commit + +Vous pouvez installer pre-commit pour auto-formater et verifier le lint avec la configuration OCA. Cela +s'executera avant chaque commit avec git. + +Consultez https://github.com/OCA/maintainer-tools/wiki/Install-pre-commit diff --git a/doc/DEVELOPMENT.fr.md b/doc/DEVELOPMENT.fr.md new file mode 100644 index 0000000..48477d4 --- /dev/null +++ b/doc/DEVELOPMENT.fr.md @@ -0,0 +1,288 @@ + +# Guide de developpement + +Configurez votre environnement pour developper des modules et deboguer la plateforme. + +## Procedure d'installation locale + +### 1. Cloner le projet : + +```bash +git clone https://github.com/ERPLibre/ERPLibre.git +``` + +### 2. Executer le script : + +```bash +cd ERPLibre +./script/install/install_dev.sh +./script/install/install_locally_dev.sh +``` + +### 3. Lancer ERPLibre + +```bash +./run.sh +``` + +## Developper dans le depot Odoo + +Vous devez supprimer `clone-depth="10"` de `./manifest/default.dev.xml` afin de pouvoir faire des commits et des pushs. Faites un +commit temporaire et regenerez avec `./script/install/install_locally_dev.sh` + +## Forker le projet pour creer un nouveau projet independant d'ERPLibre (obsolete) + +ERPLibre a ete cree avec ce script. Il est maintenant obsolete. Utilisez ce script lorsque vous devez forker directement depuis la +source originale. N'utilisez pas ce script si vous voulez recevoir les mises a jour d'ERPLibre et suivre le developpement principal. + +```bash +./script/git/fork_project.py --github_token GITHUB_KEY --organization NAME +``` + +# Forker tous les depots pour votre propre organisation + +Allez dans votre compte Github et generez un jeton pour acceder a l'option de fork avec votre utilisateur. Creez une organisation ou utilisez votre +compte personnel et choisissez votre nom d'utilisateur. + +Cette commande va forker tous les depots et ERPLibre vers votre propre organisation. Elle garde le suivi d'ERPLibre. + +```bash +./script/git/fork_project_ERPLibre.py --github_token GITHUB_KEY --organization NAME +``` + +## Generer le manifeste a partir du csv des depots + +Ajoutez le depot dans le fichier [./source_repo_addons.csv](./source_repo_addons.csv) + +Executez pour generer le manifeste Repo + +```bash +./script/git/fork_project_ERPLibre.py --skip_fork +``` + +## Deplacer une base de donnees de la prod vers le dev + +Copiez l'image de la base de donnees dans `./image_db/prod_client.zip` et executez `make db_restore_prod_client`. Cela va creer une +base de donnees +nommee `prod_client` prete a tester. + +Lorsque vous deplacez une base de donnees de la prod vers votre environnement de dev, vous voulez supprimer les serveurs de courriel, les sauvegardes et installer l'utilisateur de test +afin de tester la base de donnees. Executez : + +```bash +./script/database/migrate_prod_to_test.sh DATABASE +``` + +## Changer les urls git de https vers Git + +Cela va mettre a jour toutes les urls au format Git : + +```bash +./script/git/git_change_remote_https_to_git.py +``` + +## Afficher les differences de depots entre les projets + +Outils pour afficher les differences entre le depot et un autre projet. + +```bash +./script/git/git_change_remote.py --sync_to /path/to/project/erplibre --dry_sync +``` + +## Afficher les differences de depots avec le manifeste de developpement + +Pour comprendre les divergences avec le manifeste de dev. + +```bash +./script/git/git_show_code_diff_repo_manifest.py -m ./manifest/default.dev.xml +``` + +## Synchroniser les depots avec un autre projet + +Outils pour synchroniser le depot avec un autre projet. Cela va afficher les differences et essayer de se positionner sur le meme commit dans +tous les depots. + +```bash +./script/git/git_change_remote.py --sync_to /path/to/project/erplibre +``` + +## Comparer deux fichiers manifestes + +Pour afficher les differences entre les commits dans differents manifestes + +```bash +./script/git/git_diff_repo_manifest.py --input1 ./manifest/MANIFEST1.xml --input2 ./manifest/MANIFEST2.xml +``` + +## Differences entre le code et le manifeste + +Pour afficher les differences entre le code actuel et le manifeste + +```bash +./script/git/git_show_code_diff_repo_manifest.py --manifest ./manifest/MANIFEST1.xml +``` + +## Ajouter un depot + +Pour acceder a un nouveau depot, ajoutez votre URL dans le fichier [source_repo_addons.csv](../source_repo_addons.csv) + +Forkez le depot pour pouvoir pousser du nouveau code : + +```bash +./script/git/fork_project_ERPLibre.py +``` + +Pour regenerer uniquement le manifest.xml. + +```bash +./script/git/fork_project_ERPLibre.py --skip_fork +``` + +Verifier si le manifeste contient "auto_install" et changer la valeur a False. + +```bash +./script/git/repo_remove_auto_install.py +``` + +## Filtrer les depots par groupe + +Garder uniquement les depots etiquetes par le groupe 'base' et 'code_generator' + +```bash +./script/manifest/update_manifest_local_dev_code_generator.sh +``` + +# Execution + +## Fichier de configuration + +Vous pouvez limiter vos addons dans le fichier de configuration ERPLibre en fonction d'un groupe de votre manifeste actuel. + +```bash +./script/git/git_repo_update_group.py --group base,code_generator +./script/generate_config.sh +``` + +Ou revenir a la normale + +```bash +./script/git/git_repo_update_group.py +./script/generate_config.sh +``` + +# Base de donnees + +## Nettoyer une base de donnees PostgreSQL + +Parfois, il n'est pas possible de supprimer une base de donnees depuis le gestionnaire de base de donnees `http://127.0.0.1:8069/web/database/manager`, +vous pouvez donc le faire manuellement. Remplacez `database_name` par le nom de votre base de donnees : + +```bash +sudo -iu postgres +psql +``` + +Et executez : + +```postgres-sql +DROP DATABASE database_name; +``` + +Quittez et supprimez le filestore : + +```bash +rm -r ~/.local/share/Odoo/filestore/database_name +``` + +# Developpement + +## Creer un squelette de module + +```bash +source ./.venv.erplibre/bin/activate +python odoo/odoo-bin scaffold MODULE_NAME addons/REPO_NAME/ +``` + +## Utiliser le generateur de code + +Lisez CODE_GENERATOR.md. + +# Version + +Lisez GIT_REPO.md pour comprendre comment changer de version. + +## Version Python + +Votre version actuelle est dans le fichier .python-odoo-version. Utilisez le script `./script/version/change_python_version.sh 3.7.16` pour changer +a la version 3.7.16 . + +Lancez l'installation, `make install_dev`. + +Mettez a jour poetry, `./script/poetry/poetry_update.py`. + +Creez le docker, `make docker_build`. + +### Changement majeur de version Python + +Lorsque vous devez changer de python 3.7.17 a 3.8.10, faites : + +```bash +rm -r .venv +make install_dev +./.venv.$(cat ".erplibre-version" | xargs)/bin/poetry lock --no-update +``` + +# Demande de tirage (Pull request) + +## Afficher toutes les demandes de tirage d'une organisation + +```bash +/script/git/pull_request_ERPLibre.py --github_token ### --organization ERPLibre +``` + +# Commit + +Utilisez ce format de commit : + +```bash +git commit -am "[#ticket] subject: short sentence" +``` + +# Formatage du code + +## Python + +Utilisez [black](https://github.com/psf/black) + +```bash +./script/maintenance/black.sh ./addons/TechnoLibre_odoo-code-generator +``` + +Ou si vous preferez [oca-autopep8](https://github.com/psf/black) + +```bash +./script/maintenance/autopep8.sh ./addons/TechnoLibre_odoo-code-generator +``` + +## HTML et css + +Utilisez [prettier](https://github.com/prettier/prettier) + +```bash +./script/maintenance/prettier.sh ./addons/TechnoLibre_odoo-code-generator +``` + +## Javascript + +Utilisez [prettier](https://github.com/prettier/prettier) + +```bash +./script/maintenance/prettier.sh --tab-width 4 ./addons/TechnoLibre_odoo-code-generator +``` + +# Pre-commit + +Vous pouvez installer pre-commit pour auto-formater et verifier le lint avec la configuration OCA. Cela +s'executera avant chaque commit avec git. + +Consultez https://github.com/OCA/maintainer-tools/wiki/Install-pre-commit \ No newline at end of file diff --git a/doc/DEVELOPMENT.md b/doc/DEVELOPMENT.md index 4e89348..2f5b866 100644 --- a/doc/DEVELOPMENT.md +++ b/doc/DEVELOPMENT.md @@ -1,3 +1,4 @@ + # Development guide Setup your environment to develop modules and debug the platform. diff --git a/doc/DISCOVER.base.md b/doc/DISCOVER.base.md new file mode 100644 index 0000000..f66392f --- /dev/null +++ b/doc/DISCOVER.base.md @@ -0,0 +1,80 @@ + + + + + + +# Discover + +Explore the ERPLibre solution. + +## Fast installation + +### 1. Clone the project: + + +# Découverte + +Explorez la solution ERPLibre. + +## Installation rapide + +### 1. Clonez le projet : + + +```bash +git clone https://github.com/ERPLibre/ERPLibre.git +``` + + +### 2. Run installation locally: + + +### 2. Exécutez l'installation localement : + + +```bash +cd ERPLibre +./script/install/install_dev.sh +./script/install/install_locally_dev.sh +``` + + +### 3. Run ERPLibre + + +### 3. Exécutez ERPLibre + + +```bash +./run.sh +``` + + +## Add repo + +To access a new repo, add your URL to file [source_repo_addons.csv](../source_repo_addons.csv) + +Execute script: + + +## Ajouter un dépôt + +Pour accéder à un nouveau dépôt, ajoutez votre URL au fichier [source_repo_addons.csv](../source_repo_addons.csv) + +Exécutez le script : + + +```bash +./script/git/git_repo_manifest.py +git checkout -b NEW_BRANCH +git commit -am "Add new repo" +./script/install/install_locally_dev.sh +./script/poetry/poetry_update.py +``` + + +[Update your repo.](./GIT_REPO.md) + + +[Mettez à jour votre dépôt.](./GIT_REPO.md) diff --git a/doc/DISCOVER.fr.md b/doc/DISCOVER.fr.md new file mode 100644 index 0000000..fbeba14 --- /dev/null +++ b/doc/DISCOVER.fr.md @@ -0,0 +1,42 @@ + +# Découverte + +Explorez la solution ERPLibre. + +## Installation rapide + +### 1. Clonez le projet : + +```bash +git clone https://github.com/ERPLibre/ERPLibre.git +``` + +### 2. Exécutez l'installation localement : + +```bash +cd ERPLibre +./script/install/install_dev.sh +./script/install/install_locally_dev.sh +``` + +### 3. Exécutez ERPLibre + +```bash +./run.sh +``` + +## Ajouter un dépôt + +Pour accéder à un nouveau dépôt, ajoutez votre URL au fichier [source_repo_addons.csv](../source_repo_addons.csv) + +Exécutez le script : + +```bash +./script/git/git_repo_manifest.py +git checkout -b NEW_BRANCH +git commit -am "Add new repo" +./script/install/install_locally_dev.sh +./script/poetry/poetry_update.py +``` + +[Mettez à jour votre dépôt.](./GIT_REPO.md) \ No newline at end of file diff --git a/doc/DISCOVER.md b/doc/DISCOVER.md index 9f1c21b..869cc86 100644 --- a/doc/DISCOVER.md +++ b/doc/DISCOVER.md @@ -1,3 +1,4 @@ + # Discover Explore the ERPLibre solution. diff --git a/doc/FAQ.base.md b/doc/FAQ.base.md new file mode 100644 index 0000000..5a1b3dc --- /dev/null +++ b/doc/FAQ.base.md @@ -0,0 +1,434 @@ + + + + + + +# FAQ + +## Into execution + +### wkthmltopdf TimeoutError + +If you find this bug on server log : +`odoo.addons.base.models.ir_actions_report: wkhtmltopdf: Exit with code 1 due to network error: TimeoutError` + +Into configuration, technique, go to ir.config_parameter (system parameter) and add configuration : + + +# FAQ + +## Lors de l'exécution + +### wkthmltopdf TimeoutError + +Si vous trouvez ce bogue dans le journal du serveur : +`odoo.addons.base.models.ir_actions_report: wkhtmltopdf: Exit with code 1 due to network error: TimeoutError` + +Dans la configuration, technique, allez dans ir.config_parameter (paramètre système) et ajoutez la configuration : + + +``` +key : report.url +value : http://127.0.0.1:8069 +``` + + +## Scripting + +### Search all duplicate file recursively in given directory + + +## Scripts + +### Rechercher tous les fichiers dupliqués récursivement dans un répertoire donné + + +```bash +find . -type f -printf '%p/ %f\n' | sort -k2 | uniq -f1 --all-repeated=separate +``` + + +### Search all duplicate directory recursively in given directory + + +### Rechercher tous les répertoires dupliqués récursivement dans un répertoire donné + + +```bash +find . -type d -printf '%p/ %f\n' | sort -k2 | uniq -f1 --all-repeated=separate +``` + + +## Networking + +Show all open port + + +## Réseau + +Afficher tous les ports ouverts + + +```bash +sudo lsof -i -P -n | grep LISTEN +``` + + +or + + +ou + + +```bash +sudo netstat -lpnt | grep LISTEN +``` + + +or + + +ou + + +```bash +sudo ss -lpnt | grep LISTEN +``` + + +## Git + +### Configuration + +Prefer to use Vim when editing? + + +## Git + +### Configuration + +Préférez-vous utiliser Vim pour l'édition ? + + +```bash +git config --global core.editor "vim" +``` + + +Prefer to use Meld when resolving conflit? + + +Préférez-vous utiliser Meld pour résoudre les conflits ? + + +```bash +git config --global merge.tool meld +``` + + +Prefer to us Meld to show difference? + + +Préférez-vous utiliser Meld pour afficher les différences ? + + +```bash +git config --global diff.tool meld +git config --global difftool.prompt false +``` + + +### Retroactively applying format code to existing branches + +Adapt this command to your situation, this is an example: + + +### Appliquer rétroactivement le formatage du code sur des branches existantes + +Adaptez cette commande à votre situation, ceci est un exemple : + + +```bash +git rebase --strategy-option=theirs --exec 'cd ../../ && ./script/maintenance/black.sh ./addons/ERPLibre_erplibre_theme_addons/website_snippet_all/ && cd - && git add --all && git commit --amend --no-edit' HEAD~47 +``` + + +### Unshallow git + +By example, the repo Odoo use a depth clone. If you need all the clone repo, use this command on right directory: + + +### Récupérer l'historique complet de git (unshallow) + +Par exemple, le dépôt Odoo utilise un clone avec profondeur limitée. Si vous avez besoin du dépôt complet, utilisez cette commande dans le bon répertoire : + + +```bash +git fetch REMOTE --unshallow +``` + + +### Amend several commits in Git to change author + + +### Modifier plusieurs commits dans Git pour changer l'auteur + + +```bash +git rebase -i HEAD~4 -x "git commit --amend --author 'Author Name ' --no-edit" +``` + + +### Cherry-pick a merged commit with conflict + + +### Cherry-pick d'un commit fusionné avec conflit + + +```bash +git cherry-pick -m 1 --strategy-option theirs HASH +``` + + +## git update manifest + +### Service git-daemon already running, error bind or Error fatal: unable to allocate any listen sockets on port 9418 + +This error occur when force stop (ctrl+c) a script like `./script/manifest/update_manifest_local_dev.sh` + +The error into console is similar to `Could not bind to 0.0.0.0: Address already in use` + + +## git update manifest + +### Service git-daemon déjà en cours d'exécution, erreur bind ou Erreur fatale : impossible d'allouer des sockets d'écoute sur le port 9418 + +Cette erreur survient lors de l'arrêt forcé (ctrl+c) d'un script comme `./script/manifest/update_manifest_local_dev.sh` + +L'erreur dans la console ressemble à `Could not bind to 0.0.0.0: Address already in use` + + +```bash +pkill -f git-daemon +``` + + +## git-repo + +### error.GitError fatal bad revision + +Example: + + +## git-repo + +### error.GitError fatal bad revision + +Exemple : + + +``` +error.GitError: manifests rev-list (u'^2736dfd46e8a30cf59a9cd6e93d9e56e87021f2a', 'HEAD', '--'): fatal: bad revision 'HEAD' +``` + + +Did you modify files in .repo? + +To reset files from your branch into .repo: + + +Avez-vous modifié des fichiers dans .repo ? + +Pour réinitialiser les fichiers de votre branche dans .repo : + + +```bash +cd .repo/manifests +git branch -av +> remotes/m/rel/8953/zd552kl/7.1.1-11.40.208 -> origin/rel/8953/zd552kl/7.1.1-11.40.208 +> remotes/origin/dev/ze550kl/asus/5.0.0-20150208 11a37fe set dev/ze550kl/asus/5.0.0-20150208 +> remotes/origin/rel/8953/zd552kl/7.1.1-11.40.208 2736dfd Remove opencv3 from the manifest +# To reset the "remotes/origin" use the same as "remotes/m" +git reset --hard REF_OF_REMOTES/m +> git reset --hard remotes/origin/rel/8953/zd552kl/7.1.1-11.40.208 +``` + + +### fatal: GitCommandError: git command failure + +Example of error after an installation with git-repo: + + +### fatal: GitCommandError: git command failure + +Exemple d'erreur après une installation avec git-repo : + + +``` +raise GitCommandError( +git_command.GitCommandError: GitCommandError: git command failure + Project: manifests + Args: rev-list ^e96a83f03665ecc1b151331776909be32d5e2c7b HEAD -- + Stdout: +None + Stderr: +fatal: bad revision 'HEAD' +Skipped fetching project manifests (already have persistent ref) +fatal: GitCommandError: git command failure + Project: manifests + Args: rev-list ^HEAD c8e64956f188f77abcfa7ff0e764af97162d3071 -- + Stdout: +None + Stderr: +fatal: bad revision '^HEAD' +``` + + +Solution: Check files into directory `cd .repo/manifests` with commande `git status`. If +you +have some differences in stage, you can try `git reset --hard` and redo the +installation. + +If it's not working, re-clone the repo and do a fresh installation. + +## OSX installation + +### Docker installation + +This guide works in the past, but it's now broken + + +Solution : Vérifiez les fichiers dans le répertoire `cd .repo/manifests` avec la commande `git status`. Si +vous +avez des différences en staging, vous pouvez essayer `git reset --hard` et refaire +l'installation. + +Si cela ne fonctionne pas, re-clonez le dépôt et faites une installation fraîche. + +## Installation OSX + +### Installation Docker + +Ce guide fonctionnait dans le passé, mais il est maintenant cassé + + +```bash +echo "\n--- Installing docker --" +brew install minikube docker docker-compose docker-machine +brew cask install virtualbox +docker-machine create --driver virtualbox default +docker-machine env default +eval "$(docker-machine env default)" +``` + + +### Run error `current limit exceeds maximum limit` + +When you got + + +### Erreur d'exécution `current limit exceeds maximum limit` + +Lorsque vous obtenez + + +``` +File "/Users/test/Desktop/ERPLibre/odoo/odoo/service/server.py", line 83, in set_limit_memory_hard +resource.setrlimit(rlimit, (config['limit_memory_hard'], hard)) +ValueError: current limit exceeds maximum limit +``` + + +Add line at the end of config.conf + + +Ajoutez la ligne à la fin de config.conf + + +``` +limit_memory_hard = 0 +``` + + +## Docker - All interface bind docker + +### Error non-overlapping IPv4 address pool + +You got this error when you start a +docker-compose: +`ERROR: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network` + +It's because the subnet is limited, you need to change it. + +Create a subnet : + + +## Docker - Liaison de toutes les interfaces docker + +### Erreur non-overlapping IPv4 address pool + +Vous obtenez cette erreur lorsque vous démarrez un +docker-compose : +`ERROR: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network` + +C'est parce que le sous-réseau est limité, vous devez le changer. + +Créez un sous-réseau : + + +```bash +docker network create localnetwork --subnet 10.0.1.0/24 +``` + + +Create a new file `docker-compose.override.yml` at the root of ERPLibre, at same level of your docker-compose.yml and +fill with: + + +Créez un nouveau fichier `docker-compose.override.yml` à la racine d'ERPLibre, au même niveau que votre docker-compose.yml et +remplissez avec : + + +```yaml +version: '3' +networks: + default: + external: + name: localnetwork +``` + + +## Pycharm inotify watches limit Linux + +Please read this: https://intellij-support.jetbrains.com/hc/en-us/articles/15268113529362-Inotify-Watches-Limit-Linux + +Validate it works: + + +## Limite inotify watches de Pycharm sous Linux + +Veuillez lire ceci : https://intellij-support.jetbrains.com/hc/en-us/articles/15268113529362-Inotify-Watches-Limit-Linux + +Validez que cela fonctionne : + + +```bash +cat /proc/sys/fs/inotify/max_user_watches +``` + + +Tips, when doing `sudo sysctl -p --system`, validate the order of the process, another process can overwrite your new +value. + +## How killing all process from selenium + + +Astuce : lorsque vous exécutez `sudo sysctl -p --system`, validez l'ordre des processus, un autre processus peut écraser votre nouvelle valeur. + +## Comment tuer tous les processus de selenium + + +```bash +pkill -f "firefox.*--marionette" +``` diff --git a/doc/FAQ.fr.md b/doc/FAQ.fr.md new file mode 100644 index 0000000..d4a5fdd --- /dev/null +++ b/doc/FAQ.fr.md @@ -0,0 +1,244 @@ + +# FAQ + +## Lors de l'exécution + +### wkthmltopdf TimeoutError + +Si vous trouvez ce bogue dans le journal du serveur : +`odoo.addons.base.models.ir_actions_report: wkhtmltopdf: Exit with code 1 due to network error: TimeoutError` + +Dans la configuration, technique, allez dans ir.config_parameter (paramètre système) et ajoutez la configuration : + +``` +key : report.url +value : http://127.0.0.1:8069 +``` + +## Scripts + +### Rechercher tous les fichiers dupliqués récursivement dans un répertoire donné + +```bash +find . -type f -printf '%p/ %f\n' | sort -k2 | uniq -f1 --all-repeated=separate +``` + +### Rechercher tous les répertoires dupliqués récursivement dans un répertoire donné + +```bash +find . -type d -printf '%p/ %f\n' | sort -k2 | uniq -f1 --all-repeated=separate +``` + +## Réseau + +Afficher tous les ports ouverts + +```bash +sudo lsof -i -P -n | grep LISTEN +``` + +ou + +```bash +sudo netstat -lpnt | grep LISTEN +``` + +ou + +```bash +sudo ss -lpnt | grep LISTEN +``` + +## Git + +### Configuration + +Préférez-vous utiliser Vim pour l'édition ? + +```bash +git config --global core.editor "vim" +``` + +Préférez-vous utiliser Meld pour résoudre les conflits ? + +```bash +git config --global merge.tool meld +``` + +Préférez-vous utiliser Meld pour afficher les différences ? + +```bash +git config --global diff.tool meld +git config --global difftool.prompt false +``` + +### Appliquer rétroactivement le formatage du code sur des branches existantes + +Adaptez cette commande à votre situation, ceci est un exemple : + +```bash +git rebase --strategy-option=theirs --exec 'cd ../../ && ./script/maintenance/black.sh ./addons/ERPLibre_erplibre_theme_addons/website_snippet_all/ && cd - && git add --all && git commit --amend --no-edit' HEAD~47 +``` + +### Récupérer l'historique complet de git (unshallow) + +Par exemple, le dépôt Odoo utilise un clone avec profondeur limitée. Si vous avez besoin du dépôt complet, utilisez cette commande dans le bon répertoire : + +```bash +git fetch REMOTE --unshallow +``` + +### Modifier plusieurs commits dans Git pour changer l'auteur + +```bash +git rebase -i HEAD~4 -x "git commit --amend --author 'Author Name ' --no-edit" +``` + +### Cherry-pick d'un commit fusionné avec conflit + +```bash +git cherry-pick -m 1 --strategy-option theirs HASH +``` + +## git update manifest + +### Service git-daemon déjà en cours d'exécution, erreur bind ou Erreur fatale : impossible d'allouer des sockets d'écoute sur le port 9418 + +Cette erreur survient lors de l'arrêt forcé (ctrl+c) d'un script comme `./script/manifest/update_manifest_local_dev.sh` + +L'erreur dans la console ressemble à `Could not bind to 0.0.0.0: Address already in use` + +```bash +pkill -f git-daemon +``` + +## git-repo + +### error.GitError fatal bad revision + +Exemple : + +``` +error.GitError: manifests rev-list (u'^2736dfd46e8a30cf59a9cd6e93d9e56e87021f2a', 'HEAD', '--'): fatal: bad revision 'HEAD' +``` + +Avez-vous modifié des fichiers dans .repo ? + +Pour réinitialiser les fichiers de votre branche dans .repo : + +```bash +cd .repo/manifests +git branch -av +> remotes/m/rel/8953/zd552kl/7.1.1-11.40.208 -> origin/rel/8953/zd552kl/7.1.1-11.40.208 +> remotes/origin/dev/ze550kl/asus/5.0.0-20150208 11a37fe set dev/ze550kl/asus/5.0.0-20150208 +> remotes/origin/rel/8953/zd552kl/7.1.1-11.40.208 2736dfd Remove opencv3 from the manifest +# To reset the "remotes/origin" use the same as "remotes/m" +git reset --hard REF_OF_REMOTES/m +> git reset --hard remotes/origin/rel/8953/zd552kl/7.1.1-11.40.208 +``` + +### fatal: GitCommandError: git command failure + +Exemple d'erreur après une installation avec git-repo : + +``` +raise GitCommandError( +git_command.GitCommandError: GitCommandError: git command failure + Project: manifests + Args: rev-list ^e96a83f03665ecc1b151331776909be32d5e2c7b HEAD -- + Stdout: +None + Stderr: +fatal: bad revision 'HEAD' +Skipped fetching project manifests (already have persistent ref) +fatal: GitCommandError: git command failure + Project: manifests + Args: rev-list ^HEAD c8e64956f188f77abcfa7ff0e764af97162d3071 -- + Stdout: +None + Stderr: +fatal: bad revision '^HEAD' +``` + +Solution : Vérifiez les fichiers dans le répertoire `cd .repo/manifests` avec la commande `git status`. Si +vous +avez des différences en staging, vous pouvez essayer `git reset --hard` et refaire +l'installation. + +Si cela ne fonctionne pas, re-clonez le dépôt et faites une installation fraîche. + +## Installation OSX + +### Installation Docker + +Ce guide fonctionnait dans le passé, mais il est maintenant cassé + +```bash +echo "\n--- Installing docker --" +brew install minikube docker docker-compose docker-machine +brew cask install virtualbox +docker-machine create --driver virtualbox default +docker-machine env default +eval "$(docker-machine env default)" +``` + +### Erreur d'exécution `current limit exceeds maximum limit` + +Lorsque vous obtenez + +``` +File "/Users/test/Desktop/ERPLibre/odoo/odoo/service/server.py", line 83, in set_limit_memory_hard +resource.setrlimit(rlimit, (config['limit_memory_hard'], hard)) +ValueError: current limit exceeds maximum limit +``` + +Ajoutez la ligne à la fin de config.conf + +``` +limit_memory_hard = 0 +``` + +## Docker - Liaison de toutes les interfaces docker + +### Erreur non-overlapping IPv4 address pool + +Vous obtenez cette erreur lorsque vous démarrez un +docker-compose : +`ERROR: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network` + +C'est parce que le sous-réseau est limité, vous devez le changer. + +Créez un sous-réseau : + +```bash +docker network create localnetwork --subnet 10.0.1.0/24 +``` + +Créez un nouveau fichier `docker-compose.override.yml` à la racine d'ERPLibre, au même niveau que votre docker-compose.yml et +remplissez avec : + +```yaml +version: '3' +networks: + default: + external: + name: localnetwork +``` + +## Limite inotify watches de Pycharm sous Linux + +Veuillez lire ceci : https://intellij-support.jetbrains.com/hc/en-us/articles/15268113529362-Inotify-Watches-Limit-Linux + +Validez que cela fonctionne : + +```bash +cat /proc/sys/fs/inotify/max_user_watches +``` + +Astuce : lorsque vous exécutez `sudo sysctl -p --system`, validez l'ordre des processus, un autre processus peut écraser votre nouvelle valeur. + +## Comment tuer tous les processus de selenium + +```bash +pkill -f "firefox.*--marionette" +``` \ No newline at end of file diff --git a/doc/FAQ.md b/doc/FAQ.md index 923b36d..db98e6b 100644 --- a/doc/FAQ.md +++ b/doc/FAQ.md @@ -1,3 +1,4 @@ + # FAQ ## Into execution @@ -8,6 +9,7 @@ If you find this bug on server log : `odoo.addons.base.models.ir_actions_report: wkhtmltopdf: Exit with code 1 due to network error: TimeoutError` Into configuration, technique, go to ir.config_parameter (system parameter) and add configuration : + ``` key : report.url value : http://127.0.0.1:8069 @@ -240,4 +242,4 @@ value. ```bash pkill -f "firefox.*--marionette" -``` +``` \ No newline at end of file diff --git a/doc/GIT_REPO.base.md b/doc/GIT_REPO.base.md new file mode 100644 index 0000000..f472506 --- /dev/null +++ b/doc/GIT_REPO.base.md @@ -0,0 +1,231 @@ + + + + + + +# git-repo + +This is a guide to understand git-repo. Scripts in ERPLibre use git-repo automatically. + +[git-repo of Google](https://code.google.com/archive/p/git-repo) is used to manage all git repositories under +licence [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0.html). + +## Setup repo + + +# git-repo + +Ce guide explique le fonctionnement de git-repo. Les scripts dans ERPLibre utilisent git-repo automatiquement. + +[git-repo de Google](https://code.google.com/archive/p/git-repo) est utilisé pour gérer tous les dépôts git sous +licence [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0.html). + +## Configurer repo + + +```bash +curl https://storage.googleapis.com/git-repo-downloads/repo > .venv.erplibre/bin/repo +``` + + +## prod + + +## prod + + +```bash +.venv.erplibre/bin/repo init -u https://github.com/ERPLibre/ERPLibre -b master +.venv.erplibre/bin/repo sync -c -j $(nproc --all) +``` + + +## dev + + +## dev + + +```bash +.venv.erplibre/bin/repo init -u https://github.com/ERPLibre/ERPLibre -b 12.0_repo -m ./manifest/default.dev.xml +.venv.erplibre/bin/repo sync -c -j $(nproc --all) +``` + + +## local dev + +[Guide to setup locally git](https://railsware.com/blog/taming-the-git-daemon-to-quickly-share-git-repository/). + + +## dev local + +[Guide pour configurer git localement](https://railsware.com/blog/taming-the-git-daemon-to-quickly-share-git-repository/). + + +```bash +git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose & + +.venv.erplibre/bin/repo init -u git://127.0.0.1:9418/ -b $(git rev-parse --abbrev-ref HEAD) -m ./manifest/default.dev.xml +.venv.erplibre/bin/repo sync -c -j $(nproc --all) -m ./manifest/default.dev.xml +``` + + +# Create Manifest + +A [Manifest](https://gerrit.googlesource.com/git-repo/+/master/docs/manifest-format.md), is an XML file managed by +git-repo to generate a repo. + +## Make a new version of prod + +It freezes all repo, from dev to prod. + +This will add revision git hash in the manifest. + + +# Créer un Manifest + +Un [Manifest](https://gerrit.googlesource.com/git-repo/+/master/docs/manifest-format.md) est un fichier XML géré par +git-repo pour générer un dépôt. + +## Créer une nouvelle version de prod + +Cela fige tous les dépôts, du dev vers la prod. + +Cela ajoutera le hash de révision git dans le manifest. + + +```bash +.venv.erplibre/bin/repo manifest -r -o ./default.xml +``` + + +Commit. + + +Committez. + + +```bash +git commit -am "[#ticket] subject: short sentence" +``` + + +### Mix prod and dev to create a stage version + +When dev contains specific revision with default revision, you need to replace default revision with prod revision and +keep specific version: + + +### Mélanger prod et dev pour créer une version de staging + +Lorsque dev contient une révision spécifique avec la révision par défaut, vous devez remplacer la révision par défaut par la révision prod et garder la version spécifique : + + +```bash +./script/git/git_merge_repo_manifest.py --input "./manifest/default.dev.xml;./default.xml" --output ./manifest/default.staged.xml +git commit -am "Updated manifest/default.staged.xml" + +git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose & + +.venv.erplibre/bin/repo init -u git://127.0.0.1:9418/ -b $(git rev-parse --abbrev-ref HEAD) -m ./manifest/default.staged.xml +.venv.erplibre/bin/repo sync -c -j $(nproc --all) -m ./manifest/default.staged.xml + +.venv.erplibre/bin/repo manifest -r -o ./default.xml +``` + + +## Create a dev version + + +## Créer une version dev + + +```bash +.venv.erplibre/bin/repo manifest -o ./manifest/default.dev.xml +``` + + +Commit. + + +Committez. + + +```bash +git commit -am "[#ticket] subject: short sentence" +``` + + +## Useful commands + +### Search all repos with a specific branch name + + +## Commandes utiles + +### Rechercher tous les dépôts avec un nom de branche spécifique + + +```bash +.venv.erplibre/bin/repo forall -pc "git branch -a|grep BRANCH" +``` + + +### Search missing branch in all repos + + +### Rechercher les branches manquantes dans tous les dépôts + + +```bash +.venv.erplibre/bin/repo forall -pc 'git branch -a|(grep /BRANCH$||echo "no match")|grep "no match"' +``` + + +### Search changed file in all repos + + +### Rechercher les fichiers modifiés dans tous les dépôts + + +```bash +.venv.erplibre/bin/repo forall -pc "git status -s" +``` + + +### Clean all + +Before cleaning, check changed file in all repos. + + +### Tout nettoyer + +Avant de nettoyer, vérifiez les fichiers modifiés dans tous les dépôts. + + +```bash +.venv.erplibre/bin/repo forall -pc "git status -s" +``` + + +Check the changed branch, and push changed if needed. + + +Vérifiez les branches modifiées, et poussez les changements si nécessaire. + + +```bash +./script/git/git_show_code_diff_repo_manifest.py -m ./manifest/default.dev.xml +``` + + +Maybe, some version diverge from your manifest. Simply clean all and relaunch your installation. + + +Peut-être que certaines versions divergent de votre manifest. Nettoyez simplement tout et relancez votre installation. + + +```bash +./script/git/clean_repo_manifest.sh +``` diff --git a/doc/GIT_REPO.fr.md b/doc/GIT_REPO.fr.md new file mode 100644 index 0000000..f2367e4 --- /dev/null +++ b/doc/GIT_REPO.fr.md @@ -0,0 +1,127 @@ + +# git-repo + +Ce guide explique le fonctionnement de git-repo. Les scripts dans ERPLibre utilisent git-repo automatiquement. + +[git-repo de Google](https://code.google.com/archive/p/git-repo) est utilisé pour gérer tous les dépôts git sous +licence [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0.html). + +## Configurer repo + +```bash +curl https://storage.googleapis.com/git-repo-downloads/repo > .venv.erplibre/bin/repo +``` + +## prod + +```bash +.venv.erplibre/bin/repo init -u https://github.com/ERPLibre/ERPLibre -b master +.venv.erplibre/bin/repo sync -c -j $(nproc --all) +``` + +## dev + +```bash +.venv.erplibre/bin/repo init -u https://github.com/ERPLibre/ERPLibre -b 12.0_repo -m ./manifest/default.dev.xml +.venv.erplibre/bin/repo sync -c -j $(nproc --all) +``` + +## dev local + +[Guide pour configurer git localement](https://railsware.com/blog/taming-the-git-daemon-to-quickly-share-git-repository/). + +```bash +git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose & + +.venv.erplibre/bin/repo init -u git://127.0.0.1:9418/ -b $(git rev-parse --abbrev-ref HEAD) -m ./manifest/default.dev.xml +.venv.erplibre/bin/repo sync -c -j $(nproc --all) -m ./manifest/default.dev.xml +``` + +# Créer un Manifest + +Un [Manifest](https://gerrit.googlesource.com/git-repo/+/master/docs/manifest-format.md) est un fichier XML géré par +git-repo pour générer un dépôt. + +## Créer une nouvelle version de prod + +Cela fige tous les dépôts, du dev vers la prod. + +Cela ajoutera le hash de révision git dans le manifest. + +```bash +.venv.erplibre/bin/repo manifest -r -o ./default.xml +``` + +Committez. + +```bash +git commit -am "[#ticket] subject: short sentence" +``` + +### Mélanger prod et dev pour créer une version de staging + +Lorsque dev contient une révision spécifique avec la révision par défaut, vous devez remplacer la révision par défaut par la révision prod et garder la version spécifique : + +```bash +./script/git/git_merge_repo_manifest.py --input "./manifest/default.dev.xml;./default.xml" --output ./manifest/default.staged.xml +git commit -am "Updated manifest/default.staged.xml" + +git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose & + +.venv.erplibre/bin/repo init -u git://127.0.0.1:9418/ -b $(git rev-parse --abbrev-ref HEAD) -m ./manifest/default.staged.xml +.venv.erplibre/bin/repo sync -c -j $(nproc --all) -m ./manifest/default.staged.xml + +.venv.erplibre/bin/repo manifest -r -o ./default.xml +``` + +## Créer une version dev + +```bash +.venv.erplibre/bin/repo manifest -o ./manifest/default.dev.xml +``` + +Committez. + +```bash +git commit -am "[#ticket] subject: short sentence" +``` + +## Commandes utiles + +### Rechercher tous les dépôts avec un nom de branche spécifique + +```bash +.venv.erplibre/bin/repo forall -pc "git branch -a|grep BRANCH" +``` + +### Rechercher les branches manquantes dans tous les dépôts + +```bash +.venv.erplibre/bin/repo forall -pc 'git branch -a|(grep /BRANCH$||echo "no match")|grep "no match"' +``` + +### Rechercher les fichiers modifiés dans tous les dépôts + +```bash +.venv.erplibre/bin/repo forall -pc "git status -s" +``` + +### Tout nettoyer + +Avant de nettoyer, vérifiez les fichiers modifiés dans tous les dépôts. + +```bash +.venv.erplibre/bin/repo forall -pc "git status -s" +``` + +Vérifiez les branches modifiées, et poussez les changements si nécessaire. + +```bash +./script/git/git_show_code_diff_repo_manifest.py -m ./manifest/default.dev.xml +``` + +Peut-être que certaines versions divergent de votre manifest. Nettoyez simplement tout et relancez votre installation. + +```bash +./script/git/clean_repo_manifest.sh +``` \ No newline at end of file diff --git a/doc/GIT_REPO.md b/doc/GIT_REPO.md index c8c017c..936fb1f 100644 --- a/doc/GIT_REPO.md +++ b/doc/GIT_REPO.md @@ -1,3 +1,4 @@ + # git-repo This is a guide to understand git-repo. Scripts in ERPLibre use git-repo automatically. @@ -124,4 +125,4 @@ Maybe, some version diverge from your manifest. Simply clean all and relaunch yo ```bash ./script/git/clean_repo_manifest.sh -``` +``` \ No newline at end of file diff --git a/doc/HOWTO.base.md b/doc/HOWTO.base.md new file mode 100644 index 0000000..c1b7390 --- /dev/null +++ b/doc/HOWTO.base.md @@ -0,0 +1,18 @@ + + + + + + +# HOW TO + +## Update changelog + +Please read the following documentation [keepachangelog.com](https://keepachangelog.com) + + +# COMMENT FAIRE + +## Mettre à jour le changelog + +Veuillez lire la documentation suivante [keepachangelog.com](https://keepachangelog.com) diff --git a/doc/HOWTO.fr.md b/doc/HOWTO.fr.md new file mode 100644 index 0000000..73f9dcf --- /dev/null +++ b/doc/HOWTO.fr.md @@ -0,0 +1,6 @@ + +# COMMENT FAIRE + +## Mettre à jour le changelog + +Veuillez lire la documentation suivante [keepachangelog.com](https://keepachangelog.com) \ No newline at end of file diff --git a/doc/HOWTO.md b/doc/HOWTO.md index f501c64..fd68572 100644 --- a/doc/HOWTO.md +++ b/doc/HOWTO.md @@ -1,3 +1,4 @@ + # HOW TO ## Update changelog diff --git a/doc/MIGRATION.base.md b/doc/MIGRATION.base.md new file mode 100644 index 0000000..4df100c --- /dev/null +++ b/doc/MIGRATION.base.md @@ -0,0 +1,129 @@ + + + + + + +# Migration + +Guide to help migration with different version. + +## Docker + +- Clone project if only download docker-compose + - `git init` + - `git remote add origin https://github.com/erplibre/erplibre` + - `git fetch` + - `mv ./docker-compose.yml /tmp/temp_docker-compose.yml` + - `git checkout master` + - `mv /tmp/temp_docker-compose.yml ./docker-compose.yml` +- Do manually a backup of ERPLibre database (TODO implement makefile command) +- Update `./docker-compose.yml` depending of difference with git. +- Run script `make docker_exec_erplibre_gen_config` +- Stop the docker `make docker_stop` +- Delete the volume, `docker volume rm ${BASENAME}_erplibre-db-data` +- Start the docker `make docker_run_daemon` +- Restore the backup manually. + +### Database migration, PostgreSQL update 11 to 12 + +TODO not working automatically, check last procedure and do it manually. The command to the docker is missing support +when database is external. + +Easy way, do a backup with ERPLibre, upgrade Postgresql, restore the same backup. + +List all database : + + +# Migration + +Guide pour aider à la migration entre différentes versions. + +## Docker + +- Cloner le projet si vous n'avez téléchargé que docker-compose + - `git init` + - `git remote add origin https://github.com/erplibre/erplibre` + - `git fetch` + - `mv ./docker-compose.yml /tmp/temp_docker-compose.yml` + - `git checkout master` + - `mv /tmp/temp_docker-compose.yml ./docker-compose.yml` +- Faites manuellement une sauvegarde de la base de données ERPLibre (À FAIRE : implémenter une commande makefile) +- Mettez à jour `./docker-compose.yml` en fonction des différences avec git. +- Exécutez le script `make docker_exec_erplibre_gen_config` +- Arrêtez le docker `make docker_stop` +- Supprimez le volume, `docker volume rm ${BASENAME}_erplibre-db-data` +- Démarrez le docker `make docker_run_daemon` +- Restaurez la sauvegarde manuellement. + +### Migration de base de données, mise à jour PostgreSQL 11 vers 12 + +À FAIRE : ne fonctionne pas automatiquement, vérifiez la dernière procédure et faites-le manuellement. La commande docker ne supporte pas le cas où la base de données est externe. + +Méthode facile : faites une sauvegarde avec ERPLibre, mettez à jour PostgreSQL, restaurez la même sauvegarde. + +Lister toutes les bases de données : + + +```bash +make docker_show_databases +``` + + +## Vanilla + +- Run script `make install_dev` +- Restart your daemon +- Regenerate master password manually + +## Migration Odoo 12 to Odoo 13 + +Replace BD to your database name. + +First, be sure all addons is updated with script. + + +## Vanilla + +- Exécutez le script `make install_dev` +- Redémarrez votre démon +- Régénérez le mot de passe maître manuellement + +## Migration Odoo 12 vers Odoo 13 + +Remplacez BD par le nom de votre base de données. + +D'abord, assurez-vous que tous les addons sont mis à jour avec le script. + + +```bash +./script/addons/update_addons_all.sh BD +``` + + +Execute migration with OpenUpgrade. + + +Exécutez la migration avec OpenUpgrade. + + +```bash +make config_gen_migration +./.venv.erplibre/bin/python ./script/OCA_OpenUpgrade/odoo-bin -c ./config.conf --no-http --update all --stop-after-init -d BD +``` + + +## Migration Odoo 13 to Odoo 14 + +Replace BD to your database name. + + +## Migration Odoo 13 vers Odoo 14 + +Remplacez BD par le nom de votre base de données. + + +```bash +make config_gen_migration +./run.sh --upgrade-path=./script/OCA_OpenUpgrade/openupgrade_scripts/scripts --update all --no-http --stop-after-init --load=base,web,openupgrade_framework -d BD +``` diff --git a/doc/MIGRATION.fr.md b/doc/MIGRATION.fr.md new file mode 100644 index 0000000..e06d9b1 --- /dev/null +++ b/doc/MIGRATION.fr.md @@ -0,0 +1,65 @@ + +# Migration + +Guide pour aider à la migration entre différentes versions. + +## Docker + +- Cloner le projet si vous n'avez téléchargé que docker-compose + - `git init` + - `git remote add origin https://github.com/erplibre/erplibre` + - `git fetch` + - `mv ./docker-compose.yml /tmp/temp_docker-compose.yml` + - `git checkout master` + - `mv /tmp/temp_docker-compose.yml ./docker-compose.yml` +- Faites manuellement une sauvegarde de la base de données ERPLibre (À FAIRE : implémenter une commande makefile) +- Mettez à jour `./docker-compose.yml` en fonction des différences avec git. +- Exécutez le script `make docker_exec_erplibre_gen_config` +- Arrêtez le docker `make docker_stop` +- Supprimez le volume, `docker volume rm ${BASENAME}_erplibre-db-data` +- Démarrez le docker `make docker_run_daemon` +- Restaurez la sauvegarde manuellement. + +### Migration de base de données, mise à jour PostgreSQL 11 vers 12 + +À FAIRE : ne fonctionne pas automatiquement, vérifiez la dernière procédure et faites-le manuellement. La commande docker ne supporte pas le cas où la base de données est externe. + +Méthode facile : faites une sauvegarde avec ERPLibre, mettez à jour PostgreSQL, restaurez la même sauvegarde. + +Lister toutes les bases de données : + +```bash +make docker_show_databases +``` + +## Vanilla + +- Exécutez le script `make install_dev` +- Redémarrez votre démon +- Régénérez le mot de passe maître manuellement + +## Migration Odoo 12 vers Odoo 13 + +Remplacez BD par le nom de votre base de données. + +D'abord, assurez-vous que tous les addons sont mis à jour avec le script. + +```bash +./script/addons/update_addons_all.sh BD +``` + +Exécutez la migration avec OpenUpgrade. + +```bash +make config_gen_migration +./.venv.erplibre/bin/python ./script/OCA_OpenUpgrade/odoo-bin -c ./config.conf --no-http --update all --stop-after-init -d BD +``` + +## Migration Odoo 13 vers Odoo 14 + +Remplacez BD par le nom de votre base de données. + +```bash +make config_gen_migration +./run.sh --upgrade-path=./script/OCA_OpenUpgrade/openupgrade_scripts/scripts --update all --no-http --stop-after-init --load=base,web,openupgrade_framework -d BD +``` \ No newline at end of file diff --git a/doc/MIGRATION.md b/doc/MIGRATION.md index 0ad0ddb..46e4cf8 100644 --- a/doc/MIGRATION.md +++ b/doc/MIGRATION.md @@ -1,3 +1,4 @@ + # Migration Guide to help migration with different version. @@ -62,4 +63,4 @@ Replace BD to your database name. ```bash make config_gen_migration ./run.sh --upgrade-path=./script/OCA_OpenUpgrade/openupgrade_scripts/scripts --update all --no-http --stop-after-init --load=base,web,openupgrade_framework -d BD -``` +``` \ No newline at end of file diff --git a/doc/POETRY.base.md b/doc/POETRY.base.md new file mode 100644 index 0000000..b8572c6 --- /dev/null +++ b/doc/POETRY.base.md @@ -0,0 +1,167 @@ + + + + + + +# Poetry + +## Add dependencies automatically + +Add your dependencies in file [requirements.txt](../requirements.txt) and run script + + +# Poetry + +## Ajouter des dépendances automatiquement + +Ajoutez vos dépendances dans le fichier [requirements.txt](../requirements.txt) et exécutez le script + + +```bash +./script/poetry/poetry_update.py +``` + + +This will search all `requirements.txt` files and update `pyproject.toml` and it will update poetry + +Priority dependencies in ./requirements.txt, after it's ./odoo/requirements.txt, after it's highest version values. + +TODO add option to only add missing dependencies and ignore update. + +## Add dependencies manually + +The automatic script will erase this dependency, but you can add it for your local test. + + +Cela va chercher tous les fichiers `requirements.txt` et mettre à jour `pyproject.toml` et mettre à jour poetry + +Les dépendances prioritaires sont dans ./requirements.txt, ensuite ./odoo/requirements.txt, puis les valeurs de version les plus élevées. + +À FAIRE : ajouter une option pour seulement ajouter les dépendances manquantes et ignorer la mise à jour. + +## Ajouter des dépendances manuellement + +Le script automatique va écraser cette dépendance, mais vous pouvez l'ajouter pour vos tests locaux. + + +```bash +poetry add PYTHON_MODULE +``` + + +## Error `relative path can't be expressed as a file URI` + +If you got this error `relative path can't be expressed as a file URI` when executing poetry, delete directory +artifacts: `rm -rf artifacts/` and rerun the update. + +## Upgrade Poetry + +Change version in file `./script/install/install_locally.sh` into constant `POETRY_VERSION`. + +Erase directory `~/.poetry` and `./get-poetry.py`. + +Run installation script for OS, check `./script/install/install_locally.sh`. + +# FAQ + +## Got error "file could not be opened successfully" + +Delete cache at root of the project + + +## Erreur `relative path can't be expressed as a file URI` + +Si vous obtenez cette erreur `relative path can't be expressed as a file URI` lors de l'exécution de poetry, supprimez le répertoire artifacts : `rm -rf artifacts/` et relancez la mise à jour. + +## Mettre à jour Poetry + +Changez la version dans le fichier `./script/install/install_locally.sh` dans la constante `POETRY_VERSION`. + +Supprimez le répertoire `~/.poetry` et `./get-poetry.py`. + +Exécutez le script d'installation pour votre OS, vérifiez `./script/install/install_locally.sh`. + +# FAQ + +## Erreur "file could not be opened successfully" + +Supprimez le cache à la racine du projet + + +```bash +rm -r cache +``` + + +## Configure a proxy with poetry + +The proxy will create a cache of all downloads. + +https://github.com/EpicWink/proxpi + +Install and run the server + + +## Configurer un proxy avec poetry + +Le proxy va créer un cache de tous les téléchargements. + +https://github.com/EpicWink/proxpi + +Installez et exécutez le serveur + + +```bash +pip3 install 'git+https://github.com/EpicWink/proxpi.git' +PROXPI_BINARY_FILE_MIME_TYPE=1 FLASK_APP=proxpi.server flask run +``` + + +Or by docker-compose, add the environment + + +Ou par docker-compose, ajoutez l'environnement + + +``` +services: + proxpi: + restart: unless-stopped + ports: + - '5000:5000' + image: epicwink/proxpi:latest + environment: + - PROXPI_BINARY_FILE_MIME_TYPE=1 +``` + + +Add this configuration into the pyproject.toml + + +Ajoutez cette configuration dans le pyproject.toml + + +```toml +[[tool.poetry.source]] +name = "proxpi" +url = "http://localhost:5000/index/" +default = true +secondary = false +``` + + +TIPS, maybe before `poetry install` into installation script, need to do `poetry lock --no-update` + +In development, a solution without configuring pyproject.toml, update installation script like : + + +ASTUCE : peut-être qu'avant `poetry install` dans le script d'installation, il faut faire `poetry lock --no-update` + +En développement, une solution sans configurer pyproject.toml, mettez à jour le script d'installation comme suit : + + +```bash +${VENV_PATH}/bin/poetry self add git+https://github.com/mathben/poetry-plugin-pypi-proxy.git[plugin] +PIP_INDEX_URL=http://127.0.0.1:5000/index/ ${VENV_PATH}/bin/poetry install +``` diff --git a/doc/POETRY.fr.md b/doc/POETRY.fr.md new file mode 100644 index 0000000..4ee958f --- /dev/null +++ b/doc/POETRY.fr.md @@ -0,0 +1,91 @@ + +# Poetry + +## Ajouter des dépendances automatiquement + +Ajoutez vos dépendances dans le fichier [requirements.txt](../requirements.txt) et exécutez le script + +```bash +./script/poetry/poetry_update.py +``` + +Cela va chercher tous les fichiers `requirements.txt` et mettre à jour `pyproject.toml` et mettre à jour poetry + +Les dépendances prioritaires sont dans ./requirements.txt, ensuite ./odoo/requirements.txt, puis les valeurs de version les plus élevées. + +À FAIRE : ajouter une option pour seulement ajouter les dépendances manquantes et ignorer la mise à jour. + +## Ajouter des dépendances manuellement + +Le script automatique va écraser cette dépendance, mais vous pouvez l'ajouter pour vos tests locaux. + +```bash +poetry add PYTHON_MODULE +``` + +## Erreur `relative path can't be expressed as a file URI` + +Si vous obtenez cette erreur `relative path can't be expressed as a file URI` lors de l'exécution de poetry, supprimez le répertoire artifacts : `rm -rf artifacts/` et relancez la mise à jour. + +## Mettre à jour Poetry + +Changez la version dans le fichier `./script/install/install_locally.sh` dans la constante `POETRY_VERSION`. + +Supprimez le répertoire `~/.poetry` et `./get-poetry.py`. + +Exécutez le script d'installation pour votre OS, vérifiez `./script/install/install_locally.sh`. + +# FAQ + +## Erreur "file could not be opened successfully" + +Supprimez le cache à la racine du projet + +```bash +rm -r cache +``` + +## Configurer un proxy avec poetry + +Le proxy va créer un cache de tous les téléchargements. + +https://github.com/EpicWink/proxpi + +Installez et exécutez le serveur + +```bash +pip3 install 'git+https://github.com/EpicWink/proxpi.git' +PROXPI_BINARY_FILE_MIME_TYPE=1 FLASK_APP=proxpi.server flask run +``` + +Ou par docker-compose, ajoutez l'environnement + +``` +services: + proxpi: + restart: unless-stopped + ports: + - '5000:5000' + image: epicwink/proxpi:latest + environment: + - PROXPI_BINARY_FILE_MIME_TYPE=1 +``` + +Ajoutez cette configuration dans le pyproject.toml + +```toml +[[tool.poetry.source]] +name = "proxpi" +url = "http://localhost:5000/index/" +default = true +secondary = false +``` + +ASTUCE : peut-être qu'avant `poetry install` dans le script d'installation, il faut faire `poetry lock --no-update` + +En développement, une solution sans configurer pyproject.toml, mettez à jour le script d'installation comme suit : + +```bash +${VENV_PATH}/bin/poetry self add git+https://github.com/mathben/poetry-plugin-pypi-proxy.git[plugin] +PIP_INDEX_URL=http://127.0.0.1:5000/index/ ${VENV_PATH}/bin/poetry install +``` \ No newline at end of file diff --git a/doc/POETRY.md b/doc/POETRY.md index 2f36110..38c3ce4 100644 --- a/doc/POETRY.md +++ b/doc/POETRY.md @@ -1,3 +1,4 @@ + # Poetry ## Add dependencies automatically @@ -59,6 +60,7 @@ PROXPI_BINARY_FILE_MIME_TYPE=1 FLASK_APP=proxpi.server flask run ``` Or by docker-compose, add the environment + ``` services: proxpi: @@ -87,4 +89,4 @@ In development, a solution without configuring pyproject.toml, update installati ```bash ${VENV_PATH}/bin/poetry self add git+https://github.com/mathben/poetry-plugin-pypi-proxy.git[plugin] PIP_INDEX_URL=http://127.0.0.1:5000/index/ ${VENV_PATH}/bin/poetry install -``` +``` \ No newline at end of file diff --git a/doc/PRODUCTION.base.md b/doc/PRODUCTION.base.md new file mode 100644 index 0000000..2d6de0d --- /dev/null +++ b/doc/PRODUCTION.base.md @@ -0,0 +1,442 @@ + + + + + + +# ERPLibre production guide + +## Requirement + +- 5Go of disk space + +## Production installation procedure + +### 1. Clone the project: + + +# Guide de production ERPLibre + +## Prérequis + +- 5 Go d'espace disque + +## Procédure d'installation en production + +### 1. Cloner le projet : + + +```bash +git clone https://github.com/ERPLibre/ERPLibre.git +cd ERPLibre +``` + + +### 2. Modify the parameters + +Modify the file env_var.sh for production installation. Enable nginx if you need a proxy with `EL_INSTALL_NGINX` at +True. Redirect your DNS to the proxy's ip and add your A and AAAA into `EL_WEBSITE_NAME` with space between. + +### 3. Execute the scripts: + +#### With proxy nginx production, install certbot before for SSL + + +### 2. Modifier les parametres + +Modifiez le fichier env_var.sh pour l'installation en production. Activez nginx si vous avez besoin d'un proxy avec `EL_INSTALL_NGINX` a +True. Redirigez votre DNS vers l'adresse IP du proxy et ajoutez vos enregistrements A et AAAA dans `EL_WEBSITE_NAME` separes par des espaces. + +### 3. Executer les scripts : + +#### Avec le proxy nginx en production, installer certbot avant pour le SSL + + +```bash +# Snap installation +# https://snapcraft.io/docs/installing-snap-on-debian +sudo apt install -y snapd +sudo snap install core +sudo snap refresh core + +# https://certbot.eff.org/lets-encrypt/debianbuster-nginx +# Certbot +sudo snap install --classic certbot +sudo ln -s /snap/bin/certbot /usr/bin/certbot +``` + + +#### Ubuntu 18.04 server + + +#### Serveur Ubuntu 18.04 + + +```bash +./script/install/install_dev.sh +./script/install/install_production.sh +``` + + +A service is running by SystemD. You can access it with the DNS name found in `env_var.sh` + +#### Ubuntu 20.04 server + +Apply fix libpng12-0: https://www.linuxuprising.com/2018/05/fix-libpng12-0-missing-in-ubuntu-1804.html + + +Un service est en cours d'execution via SystemD. Vous pouvez y acceder avec le nom DNS trouve dans `env_var.sh` + +#### Serveur Ubuntu 20.04 + +Appliquer le correctif libpng12-0 : https://www.linuxuprising.com/2018/05/fix-libpng12-0-missing-in-ubuntu-1804.html + + +```bash +./script/install/install_dev.sh +./script/install/install_production.sh +``` + + +A service is running by SystemD, you can access it with the DNS name found in `env_var.sh` + +### 4. SSL: + +Generate a ssl certificate + + +Un service est en cours d'execution via SystemD, vous pouvez y acceder avec le nom DNS trouve dans `env_var.sh` + +### 4. SSL : + +Generer un certificat SSL + + +```bash +sudo certbot --nginx +``` + + +## Watch log + + +## Consulter les journaux + + +```bash +sudo systemctl -feu [EL_USER] +``` + + +## Run by address ip + +Comment the following line in `/[EL_USER]/erplibre/config.conf` + + +## Executer par adresse IP + +Commentez la ligne suivante dans `/[EL_USER]/erplibre/config.conf` + + +``` +xmlrpc_interface = 0.0.0.0 +proxy_mode = True +``` + + +Add your address ip server_name in nginx config `/etc/nginx/sites-available/[EL_WEBSITE_NAME]` + +Restart daemon: + + +Ajoutez votre adresse IP comme server_name dans la configuration nginx `/etc/nginx/sites-available/[EL_WEBSITE_NAME]` + +Redemarrer le daemon : + + +```bash +sudo systemctl restart nginx +sudo systemctl restart [EL_USER] +``` + + +## Production execution + + +## Execution en production + + +```bash +cd /[EL_USER]/erplibre +./run.sh -d [DATABASE] --no-database-list +``` + + +## Move prod database to dev + +When moving prod database to your dev environment, you want to remove email servers and install user test to test the +database. WARNING, this is not safe for production, you will expose all data. + +1. Copy your database image to directory image_db, exemple the image name is `my_db.zip` +1. Run + + +## Deplacer la base de donnees de production vers le developpement + +Lorsque vous deplacez une base de donnees de production vers votre environnement de developpement, vous souhaitez supprimer les serveurs de messagerie et installer un utilisateur de test pour tester la base de donnees. ATTENTION, ceci n'est pas securitaire pour la production, vous exposerez toutes les donnees. + +1. Copiez votre image de base de donnees dans le repertoire image_db, par exemple le nom de l'image est `my_db.zip` +1. Executez + + +```bash +./script/database/db_restore.py --clean_cache --database test_my_db --image my_db +./script/addons/update_prod_to_dev.sh test_my_db +``` + + +## Update production + +Update all features. + + +## Mise a jour de la production + +Mettre a jour toutes les fonctionnalites. + + +```bash +./run.sh --limit-time-real 99999 --no-http --stop-after-init -u all -d DATABASE +``` + + +# Postgresql + +To show config files: +> psql -U postgres -c 'SHOW config_file' + +Edit this file to accept interface from all networks: +> /var/lib/postgres/data/postgresql.conf + +# Delete an instance in production + +CAUTION, this will delete user's home, it's irrevocable. + + +# Postgresql + +Pour afficher les fichiers de configuration : +> psql -U postgres -c 'SHOW config_file' + +Editez ce fichier pour accepter les interfaces de tous les reseaux : +> /var/lib/postgres/data/postgresql.conf + +# Supprimer une instance en production + +ATTENTION, ceci supprimera le repertoire personnel de l'utilisateur, c'est irrevocable. + + +```bash +./script/database/delete_production.sh +``` + + +# Update ip when public ip change with CloudFlare and crontab + +First you need a valid python3 interpreter running with cloudflare module installed: (make sure your pip3 pointing the right python3) + + +# Mettre a jour l'IP lorsque l'IP publique change avec CloudFlare et crontab + +Vous avez d'abord besoin d'un interpreteur python3 valide avec le module cloudflare installe : (assurez-vous que votre pip3 pointe vers le bon python3) + + +```bash +pip3 install cloudflare==2.20.0 +``` + + +Then you need to create the cfg files with credentials for your cloudflare account. + + +Ensuite, vous devez creer les fichiers cfg avec les identifiants de votre compte cloudflare. + + +```bash +mkdir ~/.cloudflare +``` + + +Edit ~/.cloudflare/cloudflare.cfg + + +Editez ~/.cloudflare/cloudflare.cfg + + +``` +[PROFILE_NAME] +email=EMAIL +token=TOKEN (Use the global API key so that it works) +``` + + +Add your cron and specify the python3 you want to use with it. +- USER is the local user with permissions to execute the script +- PATH is path to inside of ERPLibre/deployment/ folder +- PROFILE_NAME must match the PROFILE_NAME in cloudflare.cfg +- CLOUDFLARE_ZONE_NAME is the name of the website zone on cloudflare +- DNS_NAME is the name of one DNS A record name available on that zone + +Notes: +- Only one crontab is required because the script will automatically research all available zones with outdated ip and update them on all A records. +- For each crontab run, if public IP did not change compared to what is on cloudflare, the script will not do unnecessary changes and let everything as is. + + +Ajoutez votre cron et specifiez le python3 que vous souhaitez utiliser. +- USER est l'utilisateur local avec les permissions pour executer le script +- PATH est le chemin vers l'interieur du dossier ERPLibre/deployment/ +- PROFILE_NAME doit correspondre au PROFILE_NAME dans cloudflare.cfg +- CLOUDFLARE_ZONE_NAME est le nom de la zone du site web sur cloudflare +- DNS_NAME est le nom d'un enregistrement DNS A disponible sur cette zone + +Notes : +- Un seul crontab est necessaire car le script recherchera automatiquement toutes les zones disponibles avec une IP obsolete et les mettra a jour sur tous les enregistrements A. +- A chaque execution du crontab, si l'IP publique n'a pas change par rapport a ce qui est sur cloudflare, le script ne fera pas de changements inutiles et laissera tout en l'etat. + + +```bash +vim /etc/crontab +# Add +*/5 * * * * USER cd PATH && python3 script/deployment/update_dns_cloudflare.py --profile PROFILE_NAME --zone_name CLOUDFLARE_ZONE_NAME --dns_name DNS_NAME --auto_sync +``` + + +Check log with + + +Verifier les journaux avec + + +```bash +sudo journalctl -feu cron +``` + + +If you want to log what is happening and when the script is run, like logging when ip changes, you can add a logging part to your cron + + +Si vous souhaitez journaliser ce qui se passe et quand le script est execute, comme la journalisation des changements d'IP, vous pouvez ajouter une partie de journalisation a votre cron + + +```bash +vim /etc/crontab +# Add +*/5 * * * * USER cd PATH && python3 script/deployment/update_dns_cloudflare.py --profile PROFILE_NAME --zone_name CLOUDFLARE_ZONE_NAME --dns_name DNS_NAME --auto_sync > /home/USER/logs/update_dns_ZONE_NAME.log 2>&1 + +``` + + +You can then read all logs with this command (Need to have ts installed: sudo apt install moreutils) + + +Vous pouvez ensuite lire tous les journaux avec cette commande (Necessite l'installation de ts : sudo apt install moreutils) + + +```bash +tail -f /home/USER/logs/update_dns_ZONE_NAME.log | ts +``` + + +# Docker + +## Update + +When update a docker, you need to update the list of module. + +Run script to update configuration : + + +# Docker + +## Mise a jour + +Lors de la mise a jour d'un docker, vous devez mettre a jour la liste des modules. + +Executez le script pour mettre a jour la configuration : + + +```bash +./script/docker/docker_gen_config.sh +``` + + +Edit the docker-compose.yml and update the command line (change DATABASE) to : + + +Editez le docker-compose.yml et mettez a jour la ligne de commande (changez DATABASE) pour : + + +```yaml + command: odoo --workers 2 -u erplibre_info -d DATABASE +``` + + +Note, the goal is to call `env['ir.module.module'].update_list()`. + +Restart the docker : + + +Note, l'objectif est d'appeler `env['ir.module.module'].update_list()`. + +Redemarrez le docker : + + +```bash +docker compose down +docker compose up -d +``` + + +Revert the command in docker-compose.yml. + +You can validate in log the update, you need to find `odoo.modules.loading: updating modules list`, check + + +Revertez la commande dans docker-compose.yml. + +Vous pouvez valider la mise a jour dans les journaux, vous devez trouver `odoo.modules.loading: updating modules list`, verifiez + + +```bash +docker compose logs -f +``` + + +## Update all + +Do a backup on url https://HOST/web/database/manager + +Edit the docker-compose.yml and update the command line (change DATABASE) to : + + +## Tout mettre a jour + +Faites une sauvegarde a l'URL https://HOST/web/database/manager + +Editez le docker-compose.yml et mettez a jour la ligne de commande (changez DATABASE) pour : + + +```yaml + command: odoo --workers 2 -u all -d DATABASE +``` + + +Watch log to see error, if you got error, you need to do some code to migrate your data, depend the case. + + +Surveillez les journaux pour voir les erreurs, si vous obtenez une erreur, vous devez ecrire du code pour migrer vos donnees, selon le cas. + + +```bash +make docker_show_logs_live +``` diff --git a/doc/PRODUCTION.fr.md b/doc/PRODUCTION.fr.md new file mode 100644 index 0000000..67bb1d2 --- /dev/null +++ b/doc/PRODUCTION.fr.md @@ -0,0 +1,243 @@ + +# Guide de production ERPLibre + +## Prérequis + +- 5 Go d'espace disque + +## Procédure d'installation en production + +### 1. Cloner le projet : + +```bash +git clone https://github.com/ERPLibre/ERPLibre.git +cd ERPLibre +``` + +### 2. Modifier les parametres + +Modifiez le fichier env_var.sh pour l'installation en production. Activez nginx si vous avez besoin d'un proxy avec `EL_INSTALL_NGINX` a +True. Redirigez votre DNS vers l'adresse IP du proxy et ajoutez vos enregistrements A et AAAA dans `EL_WEBSITE_NAME` separes par des espaces. + +### 3. Executer les scripts : + +#### Avec le proxy nginx en production, installer certbot avant pour le SSL + +```bash +# Snap installation +# https://snapcraft.io/docs/installing-snap-on-debian +sudo apt install -y snapd +sudo snap install core +sudo snap refresh core + +# https://certbot.eff.org/lets-encrypt/debianbuster-nginx +# Certbot +sudo snap install --classic certbot +sudo ln -s /snap/bin/certbot /usr/bin/certbot +``` + +#### Serveur Ubuntu 18.04 + +```bash +./script/install/install_dev.sh +./script/install/install_production.sh +``` + +Un service est en cours d'execution via SystemD. Vous pouvez y acceder avec le nom DNS trouve dans `env_var.sh` + +#### Serveur Ubuntu 20.04 + +Appliquer le correctif libpng12-0 : https://www.linuxuprising.com/2018/05/fix-libpng12-0-missing-in-ubuntu-1804.html + +```bash +./script/install/install_dev.sh +./script/install/install_production.sh +``` + +Un service est en cours d'execution via SystemD, vous pouvez y acceder avec le nom DNS trouve dans `env_var.sh` + +### 4. SSL : + +Generer un certificat SSL + +```bash +sudo certbot --nginx +``` + +## Consulter les journaux + +```bash +sudo systemctl -feu [EL_USER] +``` + +## Executer par adresse IP + +Commentez la ligne suivante dans `/[EL_USER]/erplibre/config.conf` + +``` +xmlrpc_interface = 0.0.0.0 +proxy_mode = True +``` + +Ajoutez votre adresse IP comme server_name dans la configuration nginx `/etc/nginx/sites-available/[EL_WEBSITE_NAME]` + +Redemarrer le daemon : + +```bash +sudo systemctl restart nginx +sudo systemctl restart [EL_USER] +``` + +## Execution en production + +```bash +cd /[EL_USER]/erplibre +./run.sh -d [DATABASE] --no-database-list +``` + +## Deplacer la base de donnees de production vers le developpement + +Lorsque vous deplacez une base de donnees de production vers votre environnement de developpement, vous souhaitez supprimer les serveurs de messagerie et installer un utilisateur de test pour tester la base de donnees. ATTENTION, ceci n'est pas securitaire pour la production, vous exposerez toutes les donnees. + +1. Copiez votre image de base de donnees dans le repertoire image_db, par exemple le nom de l'image est `my_db.zip` +1. Executez + +```bash +./script/database/db_restore.py --clean_cache --database test_my_db --image my_db +./script/addons/update_prod_to_dev.sh test_my_db +``` + +## Mise a jour de la production + +Mettre a jour toutes les fonctionnalites. + +```bash +./run.sh --limit-time-real 99999 --no-http --stop-after-init -u all -d DATABASE +``` + +# Postgresql + +Pour afficher les fichiers de configuration : +> psql -U postgres -c 'SHOW config_file' + +Editez ce fichier pour accepter les interfaces de tous les reseaux : +> /var/lib/postgres/data/postgresql.conf + +# Supprimer une instance en production + +ATTENTION, ceci supprimera le repertoire personnel de l'utilisateur, c'est irrevocable. + +```bash +./script/database/delete_production.sh +``` + +# Mettre a jour l'IP lorsque l'IP publique change avec CloudFlare et crontab + +Vous avez d'abord besoin d'un interpreteur python3 valide avec le module cloudflare installe : (assurez-vous que votre pip3 pointe vers le bon python3) + +```bash +pip3 install cloudflare==2.20.0 +``` + +Ensuite, vous devez creer les fichiers cfg avec les identifiants de votre compte cloudflare. + +```bash +mkdir ~/.cloudflare +``` + +Editez ~/.cloudflare/cloudflare.cfg + +``` +[PROFILE_NAME] +email=EMAIL +token=TOKEN (Use the global API key so that it works) +``` + +Ajoutez votre cron et specifiez le python3 que vous souhaitez utiliser. +- USER est l'utilisateur local avec les permissions pour executer le script +- PATH est le chemin vers l'interieur du dossier ERPLibre/deployment/ +- PROFILE_NAME doit correspondre au PROFILE_NAME dans cloudflare.cfg +- CLOUDFLARE_ZONE_NAME est le nom de la zone du site web sur cloudflare +- DNS_NAME est le nom d'un enregistrement DNS A disponible sur cette zone + +Notes : +- Un seul crontab est necessaire car le script recherchera automatiquement toutes les zones disponibles avec une IP obsolete et les mettra a jour sur tous les enregistrements A. +- A chaque execution du crontab, si l'IP publique n'a pas change par rapport a ce qui est sur cloudflare, le script ne fera pas de changements inutiles et laissera tout en l'etat. + +```bash +vim /etc/crontab +# Add +*/5 * * * * USER cd PATH && python3 script/deployment/update_dns_cloudflare.py --profile PROFILE_NAME --zone_name CLOUDFLARE_ZONE_NAME --dns_name DNS_NAME --auto_sync +``` + +Verifier les journaux avec + +```bash +sudo journalctl -feu cron +``` + +Si vous souhaitez journaliser ce qui se passe et quand le script est execute, comme la journalisation des changements d'IP, vous pouvez ajouter une partie de journalisation a votre cron + +```bash +vim /etc/crontab +# Add +*/5 * * * * USER cd PATH && python3 script/deployment/update_dns_cloudflare.py --profile PROFILE_NAME --zone_name CLOUDFLARE_ZONE_NAME --dns_name DNS_NAME --auto_sync > /home/USER/logs/update_dns_ZONE_NAME.log 2>&1 + +``` + +Vous pouvez ensuite lire tous les journaux avec cette commande (Necessite l'installation de ts : sudo apt install moreutils) + +```bash +tail -f /home/USER/logs/update_dns_ZONE_NAME.log | ts +``` + +# Docker + +## Mise a jour + +Lors de la mise a jour d'un docker, vous devez mettre a jour la liste des modules. + +Executez le script pour mettre a jour la configuration : + +```bash +./script/docker/docker_gen_config.sh +``` + +Editez le docker-compose.yml et mettez a jour la ligne de commande (changez DATABASE) pour : + +```yaml + command: odoo --workers 2 -u erplibre_info -d DATABASE +``` + +Note, l'objectif est d'appeler `env['ir.module.module'].update_list()`. + +Redemarrez le docker : + +```bash +docker compose down +docker compose up -d +``` + +Revertez la commande dans docker-compose.yml. + +Vous pouvez valider la mise a jour dans les journaux, vous devez trouver `odoo.modules.loading: updating modules list`, verifiez + +```bash +docker compose logs -f +``` + +## Tout mettre a jour + +Faites une sauvegarde a l'URL https://HOST/web/database/manager + +Editez le docker-compose.yml et mettez a jour la ligne de commande (changez DATABASE) pour : + +```yaml + command: odoo --workers 2 -u all -d DATABASE +``` + +Surveillez les journaux pour voir les erreurs, si vous obtenez une erreur, vous devez ecrire du code pour migrer vos donnees, selon le cas. + +```bash +make docker_show_logs_live +``` \ No newline at end of file diff --git a/doc/PRODUCTION.md b/doc/PRODUCTION.md index ebec76a..151bf89 100644 --- a/doc/PRODUCTION.md +++ b/doc/PRODUCTION.md @@ -1,3 +1,4 @@ + # ERPLibre production guide ## Requirement @@ -144,6 +145,7 @@ Then you need to create the cfg files with credentials for your cloudflare accou ```bash mkdir ~/.cloudflare ``` + Edit ~/.cloudflare/cloudflare.cfg ``` @@ -239,4 +241,4 @@ Watch log to see error, if you got error, you need to do some code to migrate yo ```bash make docker_show_logs_live -``` +``` \ No newline at end of file diff --git a/doc/RELEASE.base.md b/doc/RELEASE.base.md new file mode 100644 index 0000000..fb80198 --- /dev/null +++ b/doc/RELEASE.base.md @@ -0,0 +1,391 @@ + + + + + + +# Release + +A guide on how to generate a release. + + +# Publication + +Un guide sur la generation d'une publication. + + +## Clean environment before generating new release + +Before the cleaning, check if existing file isn't committed, not pushed or in stash. + + +## Nettoyer l'environnement avant de generer une nouvelle publication + +Avant le nettoyage, verifiez si des fichiers existants ne sont pas commites, pousses ou dans le stash. + + +```bash +.venv.erplibre/bin/repo forall -pc "git stash list" +./script/git/git_show_code_diff_repo_manifest.py +``` + + +This will erase everything in addons. Useful before creating docker, manifest and do a release. + + +Ceci effacera tout dans les addons. Utile avant de creer un docker, un manifeste et de faire une publication. + + +```bash +./script/git/clean_repo_manifest.sh +``` + + +And update all from dev to merge into prod. + +Test all supported Odoo version : + + +Et mettre a jour tout depuis dev pour fusionner dans prod. + +Tester toutes les versions Odoo supportees : + + +```bash +make install_odoo_all_version +``` + + +## Validate environment + +- Check if each manifest version like [manifest/default.dev.odoo16.0.xml](../manifest/default.dev.odoo16.0.xml) is ready for production. +- Run test : + + +## Valider l'environnement + +- Verifier si chaque version de manifeste comme [manifest/default.dev.odoo16.0.xml](../manifest/default.dev.odoo16.0.xml) est prete pour la production. +- Executer les tests : + + +```bash +make test_full_fast +``` + + +### Format code + +To format all code, run: + + +### Formater le code + +Pour formater tout le code, executez : + + +```bash +make format +``` + + +### Update documentations + +To generate Markdown in directory `./doc`, run: + + +### Mettre a jour les documentations + +Pour generer le Markdown dans le repertoire `./doc`, executez : + + +```bash +make doc_markdown +``` + + +### Test docker generate + +To generate a docker, run: + + +### Tester la generation docker + +Pour generer un docker, executez : + + +```bash +make docker_build_odoo_16 +``` + + +### Rename old version to new version + +Search old version, like : + + +### Renommer l'ancienne version vers la nouvelle version + +Rechercher l'ancienne version, comme : + + +```bash +grep --color=always --exclude-dir={.repo,.venv,.git} --exclude="*.svg" -nri v1.6.0 +``` + + +Replace if need it to new version. + +Update file `./pyproject.toml` in [tool.poetry], line `version =`. + + +Remplacer si necessaire par la nouvelle version. + +Mettre a jour le fichier `./pyproject.toml` dans [tool.poetry], ligne `version =`. + + +### Test production Ubuntu environment + +Follow instructions in [PRODUCTION.md](./PRODUCTION.md). + +Test installation with code generator Geomap: + + +### Tester l'environnement de production Ubuntu + +Suivre les instructions dans [PRODUCTION.md](./PRODUCTION.md). + +Tester l'installation avec le generateur de code Geomap : + + +```bash +make addons_install_code_generator_full +``` + + +### Update image_db + +To generate database images in directory `./image_db`, run: + + +### Mettre a jour image_db + +Pour generer les images de base de donnees dans le repertoire `./image_db`, executez : + + +```bash +make db_clean_cache +make config_gen_all +make image_db_create_all_parallel +``` + + +To test it, you need to clean caches and install it: + + +Pour le tester, vous devez nettoyer les caches et l'installer : + + +```bash +./script/database/db_restore.py --clean_cache +./script/database/db_restore.py --database test --image erplibre_website +``` + + +## Generate new prod and release + +Generate production manifest and freeze all repos versions. + + +## Generer la nouvelle production et publication + +Generer le manifeste de production et geler toutes les versions des depots. + + +```bash +.venv.erplibre/bin/repo manifest -r -o ./default.xml +``` + + +Update ERPLIBRE_VERSION variable in [env_var.sh](../env_var.sh), [Dockerfile.prod](../docker/Dockerfile.prod.pkg) +and [docker-compose](../docker-compose.yml). + +Generate [poetry](./POETRY.md) and keep only missing dependencies, remove updates. + + +Mettre a jour la variable ERPLIBRE_VERSION dans [env_var.sh](../env_var.sh), [Dockerfile.prod](../docker/Dockerfile.prod.pkg) +et [docker-compose](../docker-compose.yml). + +Generer [poetry](./POETRY.md) et garder uniquement les dependances manquantes, retirer les mises a jour. + + +```bash +./script/poetry/poetry_update.py +``` + + +When running script ./script/poetry/poetry_update.py, note manually inserted dependencies, stash all changes and add it +manually. + + +Lors de l'execution du script ./script/poetry/poetry_update.py, noter les dependances inserees manuellement, stasher tous les changements et les ajouter +manuellement. + + +```bash +poetry add DEPENDENCY +``` + + +Understand differences from last release: + + +Comprendre les differences depuis la derniere publication : + + +```bash +# Get all differences between the last tag and HEAD, to update the CHANGELOG.md +# ERPLibre +git diff v#.#.#..HEAD + +# All repo +.venv.erplibre/bin/repo forall -pc "git diff ERPLibre/v#.#.#..HEAD" +``` + + +Simplification tools: + + +Outils de simplification : + + +```bash +# Show all divergence repository with production +make repo_diff_manifest_production +# Short version with statistics +make repo_diff_stat_from_last_version +# Long version +make repo_diff_from_last_version +``` + + +Update file [CHANGELOG.md](../CHANGELOG.md) and create a section with new version, use next command to read all changes. + +Create a branch release/#.#.# and create a pull request to branch master with your commit: + + +Mettre a jour le fichier [CHANGELOG.md](../CHANGELOG.md) et creer une section avec la nouvelle version, utiliser la commande suivante pour lire tous les changements. + +Creer une branche release/#.#.# et creer une demande de fusion vers la branche master avec votre commit : + + +```bash +git commit -am "Release v#.#.#" +``` + + +Review by your peers, test the docker file and **merge to master**. + + +Faire reviser par vos pairs, tester le fichier docker et **fusionner dans master**. + + +```bash +git checkout master +git merge --no-ff RELEASE_BRANCH +``` + + +Add comment `Release v#.#.#`. + + +Ajouter le commentaire `Release v#.#.#`. + + +## Create tag + +Add a tag on the commit in branch master with your release. When adding tag, be sure to update default.xml + + +## Creer le tag + +Ajouter un tag sur le commit dans la branche master avec votre publication. Lors de l'ajout du tag, assurez-vous de mettre a jour default.xml + + +```bash +git tag v#.#.# +# Push your tags +git push --tags +# Add tags for all repo +.venv.erplibre/bin/repo forall -pc "git tag ERPLibre/v#.#.#" +make tag_push_all +``` + + +## Generate and push docker + +Important to generate container after push git tags, otherwise the git version will be wrong. + +When building your docker with script +> make docker_build_release + +List your docker version +> docker images + +You need to push your docker image and update your tag, like 1.0.1: +> docker push technolibre/erplibre:VERSION + + +## Generer et pousser le docker + +Important de generer le conteneur apres avoir pousse les tags git, sinon la version git sera incorrecte. + +Lors de la construction de votre docker avec le script +> make docker_build_release + +Lister votre version docker +> docker images + +Vous devez pousser votre image docker et mettre a jour votre tag, comme 1.0.1 : +> docker push technolibre/erplibre:VERSION + + +## Do a release on github + +Visit `https://github.com/ERPLibre/ERPLibre/releases/new` and create a release named `v#.#.#` and copy information from +CHANGELOG.md. + + +## Faire une publication sur github + +Visiter `https://github.com/ERPLibre/ERPLibre/releases/new` et creer une publication nommee `v#.#.#` et copier les informations depuis +CHANGELOG.md. + + +# TIPS + +## Compare repo differences with another ERPLibre project + +To generate a list of differences between repo git commit + + +# ASTUCES + +## Comparer les differences de depots avec un autre projet ERPLibre + +Pour generer une liste de differences entre les commits git des depots + + +```bash +./script/git/git_change_remote.py --sync_to /path/to/directory +``` + + +## Semantic versioning + + +## Versionnage semantique + + +``` + ::= "-" "+" +``` diff --git a/doc/RELEASE.fr.md b/doc/RELEASE.fr.md new file mode 100644 index 0000000..9b69460 --- /dev/null +++ b/doc/RELEASE.fr.md @@ -0,0 +1,209 @@ + +# Publication + +Un guide sur la generation d'une publication. + +## Nettoyer l'environnement avant de generer une nouvelle publication + +Avant le nettoyage, verifiez si des fichiers existants ne sont pas commites, pousses ou dans le stash. + +```bash +.venv.erplibre/bin/repo forall -pc "git stash list" +./script/git/git_show_code_diff_repo_manifest.py +``` + +Ceci effacera tout dans les addons. Utile avant de creer un docker, un manifeste et de faire une publication. + +```bash +./script/git/clean_repo_manifest.sh +``` + +Et mettre a jour tout depuis dev pour fusionner dans prod. + +Tester toutes les versions Odoo supportees : + +```bash +make install_odoo_all_version +``` + +## Valider l'environnement + +- Verifier si chaque version de manifeste comme [manifest/default.dev.odoo16.0.xml](../manifest/default.dev.odoo16.0.xml) est prete pour la production. +- Executer les tests : + +```bash +make test_full_fast +``` + +### Formater le code + +Pour formater tout le code, executez : + +```bash +make format +``` + +### Mettre a jour les documentations + +Pour generer le Markdown dans le repertoire `./doc`, executez : + +```bash +make doc_markdown +``` + +### Tester la generation docker + +Pour generer un docker, executez : + +```bash +make docker_build_odoo_16 +``` + +### Renommer l'ancienne version vers la nouvelle version + +Rechercher l'ancienne version, comme : + +```bash +grep --color=always --exclude-dir={.repo,.venv,.git} --exclude="*.svg" -nri v1.6.0 +``` + +Remplacer si necessaire par la nouvelle version. + +Mettre a jour le fichier `./pyproject.toml` dans [tool.poetry], ligne `version =`. + +### Tester l'environnement de production Ubuntu + +Suivre les instructions dans [PRODUCTION.md](./PRODUCTION.md). + +Tester l'installation avec le generateur de code Geomap : + +```bash +make addons_install_code_generator_full +``` + +### Mettre a jour image_db + +Pour generer les images de base de donnees dans le repertoire `./image_db`, executez : + +```bash +make db_clean_cache +make config_gen_all +make image_db_create_all_parallel +``` + +Pour le tester, vous devez nettoyer les caches et l'installer : + +```bash +./script/database/db_restore.py --clean_cache +./script/database/db_restore.py --database test --image erplibre_website +``` + +## Generer la nouvelle production et publication + +Generer le manifeste de production et geler toutes les versions des depots. + +```bash +.venv.erplibre/bin/repo manifest -r -o ./default.xml +``` + +Mettre a jour la variable ERPLIBRE_VERSION dans [env_var.sh](../env_var.sh), [Dockerfile.prod](../docker/Dockerfile.prod.pkg) +et [docker-compose](../docker-compose.yml). + +Generer [poetry](./POETRY.md) et garder uniquement les dependances manquantes, retirer les mises a jour. + +```bash +./script/poetry/poetry_update.py +``` + +Lors de l'execution du script ./script/poetry/poetry_update.py, noter les dependances inserees manuellement, stasher tous les changements et les ajouter +manuellement. + +```bash +poetry add DEPENDENCY +``` + +Comprendre les differences depuis la derniere publication : + +```bash +# Get all differences between the last tag and HEAD, to update the CHANGELOG.md +# ERPLibre +git diff v#.#.#..HEAD + +# All repo +.venv.erplibre/bin/repo forall -pc "git diff ERPLibre/v#.#.#..HEAD" +``` + +Outils de simplification : + +```bash +# Show all divergence repository with production +make repo_diff_manifest_production +# Short version with statistics +make repo_diff_stat_from_last_version +# Long version +make repo_diff_from_last_version +``` + +Mettre a jour le fichier [CHANGELOG.md](../CHANGELOG.md) et creer une section avec la nouvelle version, utiliser la commande suivante pour lire tous les changements. + +Creer une branche release/#.#.# et creer une demande de fusion vers la branche master avec votre commit : + +```bash +git commit -am "Release v#.#.#" +``` + +Faire reviser par vos pairs, tester le fichier docker et **fusionner dans master**. + +```bash +git checkout master +git merge --no-ff RELEASE_BRANCH +``` + +Ajouter le commentaire `Release v#.#.#`. + +## Creer le tag + +Ajouter un tag sur le commit dans la branche master avec votre publication. Lors de l'ajout du tag, assurez-vous de mettre a jour default.xml + +```bash +git tag v#.#.# +# Push your tags +git push --tags +# Add tags for all repo +.venv.erplibre/bin/repo forall -pc "git tag ERPLibre/v#.#.#" +make tag_push_all +``` + +## Generer et pousser le docker + +Important de generer le conteneur apres avoir pousse les tags git, sinon la version git sera incorrecte. + +Lors de la construction de votre docker avec le script +> make docker_build_release + +Lister votre version docker +> docker images + +Vous devez pousser votre image docker et mettre a jour votre tag, comme 1.0.1 : +> docker push technolibre/erplibre:VERSION + +## Faire une publication sur github + +Visiter `https://github.com/ERPLibre/ERPLibre/releases/new` et creer une publication nommee `v#.#.#` et copier les informations depuis +CHANGELOG.md. + +# ASTUCES + +## Comparer les differences de depots avec un autre projet ERPLibre + +Pour generer une liste de differences entre les commits git des depots + +```bash +./script/git/git_change_remote.py --sync_to /path/to/directory +``` + +## Versionnage semantique + +``` + ::= "-" "+" +``` \ No newline at end of file diff --git a/doc/RELEASE.md b/doc/RELEASE.md index c433f83..b685051 100644 --- a/doc/RELEASE.md +++ b/doc/RELEASE.md @@ -1,3 +1,4 @@ + # Release A guide on how to generate a release. @@ -205,4 +206,4 @@ To generate a list of differences between repo git commit ``` ::= "-" "+" -``` +``` \ No newline at end of file diff --git a/doc/RUN.base.md b/doc/RUN.base.md new file mode 100644 index 0000000..042e8c8 --- /dev/null +++ b/doc/RUN.base.md @@ -0,0 +1,127 @@ + + + + + + +# Execute ERPLibre + +## Start database + + +# Exécuter ERPLibre + +## Démarrer la base de données + + +```bash +sudo systemctl start postgresql.service +``` + + +## Run ERPLibre + +### Method 1 + +Simply + + +## Exécuter ERPLibre + +### Méthode 1 + +Simplement + + +```bash +./run.sh +``` + + +With arguments + + +Avec des arguments + + +```bash +./run.sh -h +``` + + +### Method 2 + +Execute your own python script: + + +### Méthode 2 + +Exécutez votre propre script Python : + + +```bash +./run.sh --log-level debug +``` + + +### Update all + +Great idea to run it when updating Odoo, it updates each module database. + + +### Tout mettre à jour + +Bonne idée de l'exécuter lors de la mise à jour d'Odoo, cela met à jour la base de données de chaque module. + + +```bash +./run.sh -d [DATABASE] -u all --log-level debug +``` + + +### Update module + + +### Mettre à jour un module + + +```bash +./run.sh -d [DATABASE] -u [module] --log-level debug +``` + + +### Test + +First execution, install you requirements, choose a new database. + + +### Test + +Première exécution, installez vos dépendances, choisissez une nouvelle base de données. + + +```bash +./run.sh -d [DATABASE] -i [module to test] --test-enable --no-http --stop-after-init --log-level=test +``` + + +Execute your test on a specific module. + + +Exécutez vos tests sur un module spécifique. + + +```bash +./run.sh -d [DATABASE] -u [module to test] --test-enable --no-http --stop-after-init --log-level=test +``` + + +Execute your test on a specific module with tags. + + +Exécutez vos tests sur un module spécifique avec des tags. + + +```bash +./run.sh -d [DATABASE] -u [module to test] --test-enable --no-http --stop-after-init --log-level=test --test-tags [module_name][tags] +``` diff --git a/doc/RUN.fr.md b/doc/RUN.fr.md new file mode 100644 index 0000000..f23b47d --- /dev/null +++ b/doc/RUN.fr.md @@ -0,0 +1,66 @@ + +# Exécuter ERPLibre + +## Démarrer la base de données + +```bash +sudo systemctl start postgresql.service +``` + +## Exécuter ERPLibre + +### Méthode 1 + +Simplement + +```bash +./run.sh +``` + +Avec des arguments + +```bash +./run.sh -h +``` + +### Méthode 2 + +Exécutez votre propre script Python : + +```bash +./run.sh --log-level debug +``` + +### Tout mettre à jour + +Bonne idée de l'exécuter lors de la mise à jour d'Odoo, cela met à jour la base de données de chaque module. + +```bash +./run.sh -d [DATABASE] -u all --log-level debug +``` + +### Mettre à jour un module + +```bash +./run.sh -d [DATABASE] -u [module] --log-level debug +``` + +### Test + +Première exécution, installez vos dépendances, choisissez une nouvelle base de données. + +```bash +./run.sh -d [DATABASE] -i [module to test] --test-enable --no-http --stop-after-init --log-level=test +``` + +Exécutez vos tests sur un module spécifique. + +```bash +./run.sh -d [DATABASE] -u [module to test] --test-enable --no-http --stop-after-init --log-level=test +``` + +Exécutez vos tests sur un module spécifique avec des tags. + +```bash +./run.sh -d [DATABASE] -u [module to test] --test-enable --no-http --stop-after-init --log-level=test --test-tags [module_name][tags] +``` \ No newline at end of file diff --git a/doc/RUN.md b/doc/RUN.md index f24ad4a..3567741 100644 --- a/doc/RUN.md +++ b/doc/RUN.md @@ -1,3 +1,4 @@ + # Execute ERPLibre ## Start database @@ -62,4 +63,4 @@ Execute your test on a specific module with tags. ```bash ./run.sh -d [DATABASE] -u [module to test] --test-enable --no-http --stop-after-init --log-level=test --test-tags [module_name][tags] -``` +``` \ No newline at end of file diff --git a/doc/TODO.base.md b/doc/TODO.base.md new file mode 100644 index 0000000..2834cb7 --- /dev/null +++ b/doc/TODO.base.md @@ -0,0 +1,35 @@ + + + + + + +# Health check note + +Table to verify in pgsql: ir_ui_view + +Restore a database: + +- a module is installed but is not physically present + +A database is installed but cannot be executed + + +# Note de vérification de santé + +Table à vérifier dans pgsql : ir_ui_view + +Restaurer une base de données : + +- un module est installé mais n'est pas physiquement là + +Une base de données est installée mais on n'arrive pas à l'exécuter + + +HEALTHCHECK CMD curl --fail http://localhost:8069/web || exit 1 + + +TODO: having the DB variable configurable + + +À FAIRE : rendre la variable DB configurable diff --git a/doc/TODO.fr.md b/doc/TODO.fr.md new file mode 100644 index 0000000..3b937c3 --- /dev/null +++ b/doc/TODO.fr.md @@ -0,0 +1,14 @@ + +# Note de vérification de santé + +Table à vérifier dans pgsql : ir_ui_view + +Restaurer une base de données : + +- un module est installé mais n'est pas physiquement là + +Une base de données est installée mais on n'arrive pas à l'exécuter + +HEALTHCHECK CMD curl --fail http://localhost:8069/web || exit 1 + +À FAIRE : rendre la variable DB configurable \ No newline at end of file diff --git a/doc/TODO.md b/doc/TODO.md index 4ea07a8..90f0f64 100644 --- a/doc/TODO.md +++ b/doc/TODO.md @@ -1,12 +1,13 @@ -# Note healtcheck -Table à vérifier dans pgsql: ir_ui_view +# Health check note -Restore une BD: +Table to verify in pgsql: ir_ui_view -- un module est installé mais n'est pas physiquement là +Restore a database: -Une DB est installé mais on n'arrive pas à l'exécuté +- a module is installed but is not physically present + +A database is installed but cannot be executed HEALTHCHECK CMD curl --fail http://localhost:8069/web || exit 1 diff --git a/doc/UPDATE.base.md b/doc/UPDATE.base.md new file mode 100644 index 0000000..f4983cf --- /dev/null +++ b/doc/UPDATE.base.md @@ -0,0 +1,61 @@ + + + + + + +# Update ERPLibre + +## Update all repos from the origin source + +The update is possible on branch 12.0, you need to verify this branch existence. + +1. Make sure all git repos are conform, remove all argument depth from manifest and regenerate. You can clean all and + regenerate. + + +# Mettre à jour ERPLibre + +## Mettre à jour tous les dépôts depuis la source d'origine + +La mise à jour est possible sur la branche 12.0, vous devez vérifier l'existence de cette branche. + +1. Assurez-vous que tous les dépôts git sont conformes, supprimez tous les arguments depth du manifest et régénérez. Vous pouvez tout nettoyer et régénérer. + + +```bash +./script/git/clean_repo_manifest.sh +./script/install/install_locally_dev.sh +``` + + +2. Update all remote with ssh/git + + +2. Mettre à jour tous les dépôts distants avec ssh/git + + +```bash +./script/git/git_change_remote_https_to_git.py +``` + + +3. Run update script + + +3. Exécutez le script de mise à jour + + +```bash +./script/git/git_update_repo.py +``` + + +4. Do a forced push on all needed repo and manage rebase conflicts. + +5. Test a clone with dev, check file [DEVELOPMENT.md](./DEVELOPMENT.md) + + +4. Faites un push forcé sur tous les dépôts nécessaires et gérez les conflits de rebase. + +5. Testez un clone en dev, consultez le fichier [DEVELOPMENT.md](./DEVELOPMENT.md) diff --git a/doc/UPDATE.fr.md b/doc/UPDATE.fr.md new file mode 100644 index 0000000..19f97b4 --- /dev/null +++ b/doc/UPDATE.fr.md @@ -0,0 +1,29 @@ + +# Mettre à jour ERPLibre + +## Mettre à jour tous les dépôts depuis la source d'origine + +La mise à jour est possible sur la branche 12.0, vous devez vérifier l'existence de cette branche. + +1. Assurez-vous que tous les dépôts git sont conformes, supprimez tous les arguments depth du manifest et régénérez. Vous pouvez tout nettoyer et régénérer. + +```bash +./script/git/clean_repo_manifest.sh +./script/install/install_locally_dev.sh +``` + +2. Mettre à jour tous les dépôts distants avec ssh/git + +```bash +./script/git/git_change_remote_https_to_git.py +``` + +3. Exécutez le script de mise à jour + +```bash +./script/git/git_update_repo.py +``` + +4. Faites un push forcé sur tous les dépôts nécessaires et gérez les conflits de rebase. + +5. Testez un clone en dev, consultez le fichier [DEVELOPMENT.md](./DEVELOPMENT.md) \ No newline at end of file diff --git a/doc/UPDATE.md b/doc/UPDATE.md index 7f99637..09ae14f 100644 --- a/doc/UPDATE.md +++ b/doc/UPDATE.md @@ -1,3 +1,4 @@ + # Update ERPLibre ## Update all repos from the origin source diff --git a/doc/WINDOWS_INSTALLATION.base.md b/doc/WINDOWS_INSTALLATION.base.md new file mode 100644 index 0000000..2226202 --- /dev/null +++ b/doc/WINDOWS_INSTALLATION.base.md @@ -0,0 +1,609 @@ + + + + + + +# Windows 10 version 2004 and up or 11 - release and development + +A guide on how to set up a workspace and run ERPLibre on Windows 10 version 2004 and up or Windows 11. There are two methods of installation, one is automatic and the other manual. + +**"WSL2 Ubuntu 22.04" will be referred as "WSL2"** + +**"PyCharm Professional" will be referred as "PyCharm"** + +## Install WSL2 + +Run Powershell with administrator rights and run the following command: + + +# Windows 10 version 2004 et plus ou 11 - publication et developpement + +Un guide pour configurer un espace de travail et executer ERPLibre sur Windows 10 version 2004 et plus ou Windows 11. Il existe deux methodes d'installation, une automatique et l'autre manuelle. + +**"WSL2 Ubuntu 22.04" sera designe par "WSL2"** + +**"PyCharm Professional" sera designe par "PyCharm"** + +## Installer WSL2 + +Executez Powershell avec les droits administrateur et lancez la commande suivante : + + +```bash +wsl --install -d Ubuntu-22.04 +``` + + +If you have trouble opening the Powershell with administrator rights, press `Windows + R`, enter the following line and press `OK`. You will be automatically prompted for administrator rights. + + +Si vous avez des difficultes a ouvrir Powershell avec les droits administrateur, appuyez sur `Windows + R`, entrez la ligne suivante et appuyez sur `OK`. Les droits administrateur vous seront automatiquement demandes. + + +```bash +powershell.exe +``` + + +### Troubleshooting - Optional +If you have issues enable virtualization options in BIOS is available (hyper-v, vt-x, etc). Search for `Turn Windows features on or off` in the Windows search bar and ensure that `Windows Subsystem for Linux` is turned on before restarting your machine. + +You can also try theses powershell commands: + + +### Depannage - Optionnel +Si vous rencontrez des problemes, activez les options de virtualisation dans le BIOS si disponibles (hyper-v, vt-x, etc). Recherchez `Activer ou desactiver des fonctionnalites Windows` dans la barre de recherche Windows et assurez-vous que `Sous-systeme Windows pour Linux` est active avant de redemarrer votre machine. + +Vous pouvez aussi essayer ces commandes powershell : + + +```bash +dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart +wsl --set-default-version 2 +``` + + +Download and install the lastest Linux kernel update package from Microsoft with the following [link](https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi): + + +Telechargez et installez le dernier package de mise a jour du noyau Linux de Microsoft avec le [lien](https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi) suivant : + + +```bash +https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi +``` + + +Only run this command as your last resort as it can break other virtual machines: + + +N'executez cette commande qu'en dernier recours car elle peut casser d'autres machines virtuelles : + + +```bash +bcdedit /set hypervisorlaunchtype auto +``` + + +### Other Installation methods for WSL2 + +Run Powershell with administrator rights and run the following command: + + +### Autres methodes d'installation pour WSL2 + +Executez Powershell avec les droits administrateur et lancez la commande suivante : + + +```bash +curl.exe -L -o ubuntu-2004.appx https://aka.ms/wslubuntu2004 +``` + + +Run Powershell with administrator rights and run the following commands: + + +Executez Powershell avec les droits administrateur et lancez les commandes suivantes : + + +```bash +Invoke-WebRequest -Uri https://aka.ms/wslubuntu2004 -OutFile Ubuntu.appx -UseBasicParsing +Add-AppxPackage .\Ubuntu.appx +``` + + +Install WSL2 from the Microsoft Store with the following [link](https://apps.microsoft.com/store/detail/ubuntu-22041-lts/9PN20MSR04DW): + + +Installez WSL2 depuis le Microsoft Store avec le [lien](https://apps.microsoft.com/store/detail/ubuntu-22041-lts/9PN20MSR04DW) suivant : + + +```bash +https://apps.microsoft.com/store/detail/ubuntu-22041-lts/9PN20MSR04DW +``` + + +## Setup WSL2 for ERPLibre + +Once WSL2 has been installed correctly, reboot your computer. + +### You can open your Ubuntu many ways: + +* Search "Ubuntu" by clicking the Windows key +* [Download the Windows Terminal from the Microsoft Store](https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701) + +If you are using the Windows Terminal, you just have to click the little arrow next to the + sign and then you will see Ubuntu. + + +## Configurer WSL2 pour ERPLibre + +Une fois WSL2 installe correctement, redemarrez votre ordinateur. + +### Vous pouvez ouvrir votre Ubuntu de plusieurs facons : + +* Recherchez "Ubuntu" en cliquant sur la touche Windows +* [Telechargez le Terminal Windows depuis le Microsoft Store](https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701) + +Si vous utilisez le Terminal Windows, vous n'avez qu'a cliquer sur la petite fleche a cote du signe + et vous verrez Ubuntu. + + +![image](https://user-images.githubusercontent.com/59217113/230186101-579d8a5b-0825-404f-bd28-3642adce0948.png) + + + +### Setup a GUI for you Ubuntu + +1. Update your Ubuntu + + + +### Configurer une interface graphique pour votre Ubuntu + +1. Mettre a jour votre Ubuntu + + +```bash +sudo apt-get update -y && sudo apt-get upgrade -y +``` + + +2. Install the XFCE4 Desktop + + +2. Installer le bureau XFCE4 + + +```bash +sudo apt install -y xrdp xfce4 xfce4-goodies +``` + + +3. Setup the Desktop + + +3. Configurer le bureau + + +```bash +sudo cp /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.bak +sudo sed -i 's/3389/3390/g' /etc/xrdp/xrdp.ini +sudo sed -i 's/max_bpp=32/#max_bpp=32\nmax_bpp=128/g' /etc/xrdp/xrdp.ini +sudo sed -i 's/xserverbpp=24/#xserverbpp=24\nxserverbpp=128/g' /etc/xrdp/xrdp.ini +echo xfce4-session > ~/.xsession +``` + + +4. Setup the Remote Desktop Connection + + +4. Configurer la connexion Bureau a distance + + +```bash +sudo nano /etc/xrdp/startwm.sh +``` + + +Comment these lines with a # + + +Commentez ces lignes avec un # + + +```bash +test -x /etc/X11/Xsession && exec /etc/X11/Xsession +exec /bin/sh /etc/X11/Xsession +``` + + +Add this line at the end of the file + + +Ajoutez cette ligne a la fin du fichier + + +```bash +startxfce4 +``` + + +Exit with Ctrl+S, Ctrl+X + +5. Starting Ubuntu Desktop GUI + +Open Ubuntu Terminal on your Windows and enter this command + + +Quittez avec Ctrl+S, Ctrl+X + +5. Demarrer l'interface graphique du bureau Ubuntu + +Ouvrez le terminal Ubuntu sur votre Windows et entrez cette commande + + +```bash +sudo /etc/init.d/xrdp start +``` + + +Then open *Remote Desktop Connection* by clicking the Windows key and connect to *localhost:3390* + +### Memory - Optional +If WSL is taking too much memory, you can reduce with an easy step. +You just have to go to *C:\Users\YourUsername\.wslconfig* and create a *.wslconfig* file and write: + + +Ensuite ouvrez *Connexion Bureau a distance* en cliquant sur la touche Windows et connectez-vous a *localhost:3390* + +### Memoire - Optionnel +Si WSL utilise trop de memoire, vous pouvez la reduire avec une etape simple. +Il suffit d'aller dans *C:\Users\VotreNomUtilisateur\.wslconfig* et de creer un fichier *.wslconfig* et d'ecrire : + + +```bash +sudo /etc/init.d/xrdp start + +[wsl2] +memory=3GB +``` + + +### Installation of the necessary and up-to-date tools + + +### Installation des outils necessaires et a jour + + +```bash +sudo apt update +sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev curl libbz2-dev rsync make git +``` + + +## Installation of ERPLibre under WSL2 + +Make sure to be in the directory where you want to clone the project. + + +## Installation d'ERPLibre sous WSL2 + +Assurez-vous d'etre dans le repertoire ou vous souhaitez cloner le projet. + + +```bash +git clone https://github.com/ERPLibre/ERPLibre.git +cd ERPLibre +make install +``` + + +Add role to PostgresSQL, change `USERNAME` field in the command with your UNIX username from your WSL2 environment. + + +Ajoutez un role a PostgreSQL, changez le champ `USERNAME` dans la commande avec votre nom d'utilisateur UNIX de votre environnement WSL2. + + +```bash +sudo service postgresql start +sudo su - postgres -c "createuser -s USERNAME" 2>/dev/null || true +``` + + +## Common Problems During Installation + +### Error During `make install` +Ensure all dependencies are installed correctly. Re-run the following command to fix any broken dependencies: + + +## Problemes courants lors de l'installation + +### Erreur lors de `make install` +Assurez-vous que toutes les dependances sont installees correctement. Relancez la commande suivante pour corriger les dependances cassees : + + +```bash +sudo apt-get install -f +``` + + +### PostgreSQL Not Starting +Check the PostgreSQL service status with the following command: + + +### PostgreSQL ne demarre pas +Verifiez le statut du service PostgreSQL avec la commande suivante : + + +```bash +sudo service postgresql status +``` + + +If PostgreSQL is not running, try restarting it with: + + +Si PostgreSQL ne fonctionne pas, essayez de le redemarrer avec : + + +```bash +sudo service postgresql restart +``` + + + +## Running ERPLibre + +Everytime you restart your machine, the following command has to be executed to start the PostgreSQL service if it is not already running: + + + +## Executer ERPLibre + +A chaque redemarrage de votre machine, la commande suivante doit etre executee pour demarrer le service PostgreSQL s'il n'est pas deja en cours d'execution : + + +```bash +sudo service postgresql start +``` + + +After that run this command in the root of the project: + + +Ensuite lancez cette commande a la racine du projet : + + +```bash +./run.sh +``` + + +## Verifying ERPLibre +While ERPLibre is running, make sure that you can connect to the following URL `http://localhost:8069` and have the ability to create, modify and remove databases. + +## Set up Development Environment - PyCharm + +### Install PyCharm + +Install PyCharm from the following [link](https://www.jetbrains.com/pycharm/download/#section=windows): + + +## Verification d'ERPLibre +Pendant qu'ERPLibre est en cours d'execution, assurez-vous que vous pouvez vous connecter a l'URL suivante `http://localhost:8069` et que vous avez la possibilite de creer, modifier et supprimer des bases de donnees. + +## Configurer l'environnement de developpement - PyCharm + +### Installer PyCharm + +Installez PyCharm depuis le [lien](https://www.jetbrains.com/pycharm/download/#section=windows) suivant : + + +```bash +https://www.jetbrains.com/pycharm/download/#section=windows +``` + + +### Set up Pycharm + +Select `Connect to WSL` under `Remote Development`. After that select your Ubuntu instace ("Ubuntu-22.04"). Point `Project directory` to the root of the project. Once everything has been selected and filled out correctly, click on `Start IDE and Connect`. + + +### Configurer Pycharm + +Selectionnez `Connect to WSL` sous `Remote Development`. Ensuite selectionnez votre instance Ubuntu ("Ubuntu-22.04"). Pointez `Project directory` vers la racine du projet. Une fois que tout a ete selectionne et rempli correctement, cliquez sur `Start IDE and Connect`. + + +![Welcome to PyCharm Wizard](image/remote_development.png) + + +Press `CTRL+ALT+S`, search for `interpreter` and inside the `Python Interpreter` page, click on `Add Interpreter` and select `Add Local Interpreter...`. + + +Appuyez sur `CTRL+ALT+S`, recherchez `interpreter` et dans la page `Python Interpreter`, cliquez sur `Add Interpreter` et selectionnez `Add Local Interpreter...`. + + +![Interpreter Settings](image/add_local_interpreter.png) + + +Make sure to select `Virtualenv Environment` on the left and the `Existing` radio button. Once theses are both selected properly, point your interpreter to the `../ERPLibre/.venv/bin/python` directory of the project and click on `OK`. + + +Assurez-vous de selectionner `Virtualenv Environment` a gauche et le bouton radio `Existing`. Une fois les deux correctement selectionnes, pointez votre interpreteur vers le repertoire `../ERPLibre/.venv/bin/python` du projet et cliquez sur `OK`. + + +![Environment Settings](image/existing_venv.png) + + +If these last steps to set up your development environment were unsuccessful, follow the next "Manual" steps to set up your environment. + +## Manual Installation + +### Install Python 3.10.14 +You can delete the files that are left over in your home directory regarding the python installation when the steps have been completed succesfully. + + +Si ces dernieres etapes pour configurer votre environnement de developpement n'ont pas fonctionne, suivez les etapes "Manuelles" suivantes pour configurer votre environnement. + +## Installation manuelle + +### Installer Python 3.10.14 +Vous pouvez supprimer les fichiers restants dans votre repertoire personnel concernant l'installation de Python une fois les etapes completees avec succes. + + +```bash +cd ~ +wget https://www.python.org/ftp/python/3.10.14/Python-3.10.14.tgz +tar -xzf Python-3.10.14.tgz +cd Python-3.10.14 +./configure --enable-optimizations +make -j $(nproc) +sudo make install +``` + + +### Verify the installation + + +### Verifier l'installation + + +```bash +python3.10 +``` + + +### Set Python 3.10.14 as default + + +### Definir Python 3.10.14 par defaut + + +```bash +alias python='/usr/local/bin/python3.10' +source ~/.bashrc +``` + + +### Set up Pycharm + +Open the project directory in PyCharm. + +Press `CTRL+ALT+S`, search for `interpreter` and inside the `Python Interpreter` page, click on `Add Interpreter` and select `On WSL...`. + + +### Configurer Pycharm + +Ouvrez le repertoire du projet dans PyCharm. + +Appuyez sur `CTRL+ALT+S`, recherchez `interpreter` et dans la page `Python Interpreter`, cliquez sur `Add Interpreter` et selectionnez `On WSL...`. + + +![Interpreter Settings](image/on_wsl.png) + + +Wait until PyCharm detects your WSL2 instance and press `NEXT`. Click on `System Interpreter` on the left, select the correct interpreter if it hasn't done so automatically and click `Create`. + + +Attendez que PyCharm detecte votre instance WSL2 et appuyez sur `NEXT`. Cliquez sur `System Interpreter` a gauche, selectionnez le bon interpreteur s'il ne l'a pas fait automatiquement et cliquez sur `Create`. + + +![System Interpreter](image/system_python.png) + + +Close the project's settings. Once PyCharm prompts you to import modules and allow it. + +## Common problems with Windows Development + +### Broken Terminal + +Search for `terminal` in the settings, and under `Application Settings` in the `Shell path:` field enter the following line: + + +Fermez les parametres du projet. Lorsque PyCharm vous propose d'importer des modules, autorisez-le. + +## Problemes courants avec le developpement Windows + +### Terminal casse + +Recherchez `terminal` dans les parametres, et sous `Application Settings` dans le champ `Shell path:` entrez la ligne suivante : + + +```bash +wsl.exe +``` + +![Shell Path - Terminal](image/shell_path.png) + + +### High Memory Usage warnings +If you experience high memory usage, click on `Help` in the toolbar and choose `Change Memory Settings` to increase the memory heap of the IDE. + +### Missing or incorrect imported modules +PyCharm might not fully recognize some details from `requirements.txt` and `pyproject.toml` (e.g., specific module versions). If you encounter issues at runtime or while debugging, search for the correct version of the module and reinstall it using PyCharm's package manager. + +### Can't run ERPLibre from PyCharm + +If ERPLibre fails to run from PyCharm, execute the following command in the root directory of the project from the terminal in PyCharm or WSL2: + + +### Avertissements d'utilisation elevee de la memoire +Si vous constatez une utilisation elevee de la memoire, cliquez sur `Help` dans la barre d'outils et choisissez `Change Memory Settings` pour augmenter la memoire allouee a l'IDE. + +### Modules importes manquants ou incorrects +PyCharm peut ne pas reconnaitre completement certains details de `requirements.txt` et `pyproject.toml` (par exemple, des versions specifiques de modules). Si vous rencontrez des problemes a l'execution ou lors du debogage, recherchez la bonne version du module et reinstallez-le avec le gestionnaire de paquets de PyCharm. + +### Impossible d'executer ERPLibre depuis PyCharm + +Si ERPLibre ne se lance pas depuis PyCharm, executez la commande suivante dans le repertoire racine du projet depuis le terminal de PyCharm ou WSL2 : + + +```bash +./script/ide/pycharm_configuration.py +``` + + +### Can't restart ERPLibre +Run `htop` from the terminal in PyCharm or WSL2 and close the python processes related to ERPLibre to release the socket. + +## References +[WSL Installation](https://learn.microsoft.com/en-us/windows/wsl/install) +Comprehensive guide on installing Windows Subsystem for Linux (WSL) on Windows. + +[PostgreSQL Official Documentation](https://www.postgresql.org/docs/) +Official PostgreSQL documentation for troubleshooting common issues and learning more about PostgreSQL commands and configuration. + +[PyCharm Installation and Configuration](https://www.jetbrains.com/pycharm/quickstart/) +Quick start guide for setting up and configuring PyCharm, including handling Python modules and environment setup. + +[WSL Troubleshooting](https://learn.microsoft.com/en-us/windows/wsl/troubleshoot) +Troubleshooting guide for common issues encountered in WSL, providing solutions for various problems that may arise. + +[Linux GUI](https://hub.tcno.co/windows/wsl/desktop-gui/) +Instructions for setting up a graphical user interface (GUI) in WSL, which might be helpful for better integration of Linux applications. + +[Memory Problem](https://www.aleksandrhovhannisyan.com/blog/limiting-memory-usage-in-wsl-2/) +Guide on how to manage and limit memory usage in WSL 2 to avoid high memory consumption issues. + + +### Impossible de redemarrer ERPLibre +Lancez `htop` depuis le terminal de PyCharm ou WSL2 et fermez les processus Python lies a ERPLibre pour liberer le socket. + +## References +[Installation de WSL](https://learn.microsoft.com/en-us/windows/wsl/install) +Guide complet sur l'installation du Sous-systeme Windows pour Linux (WSL) sur Windows. + +[Documentation officielle de PostgreSQL](https://www.postgresql.org/docs/) +Documentation officielle de PostgreSQL pour le depannage des problemes courants et pour en apprendre davantage sur les commandes et la configuration de PostgreSQL. + +[Installation et configuration de PyCharm](https://www.jetbrains.com/pycharm/quickstart/) +Guide de demarrage rapide pour la configuration de PyCharm, incluant la gestion des modules Python et la configuration de l'environnement. + +[Depannage de WSL](https://learn.microsoft.com/en-us/windows/wsl/troubleshoot) +Guide de depannage pour les problemes courants rencontres avec WSL, fournissant des solutions pour divers problemes qui peuvent survenir. + +[Interface graphique Linux](https://hub.tcno.co/windows/wsl/desktop-gui/) +Instructions pour configurer une interface graphique (GUI) dans WSL, ce qui peut etre utile pour une meilleure integration des applications Linux. + +[Probleme de memoire](https://www.aleksandrhovhannisyan.com/blog/limiting-memory-usage-in-wsl-2/) +Guide sur la gestion et la limitation de l'utilisation de la memoire dans WSL 2 pour eviter les problemes de consommation elevee de memoire. diff --git a/doc/WINDOWS_INSTALLATION.fr.md b/doc/WINDOWS_INSTALLATION.fr.md new file mode 100644 index 0000000..4842260 --- /dev/null +++ b/doc/WINDOWS_INSTALLATION.fr.md @@ -0,0 +1,325 @@ + +# Windows 10 version 2004 et plus ou 11 - publication et developpement + +Un guide pour configurer un espace de travail et executer ERPLibre sur Windows 10 version 2004 et plus ou Windows 11. Il existe deux methodes d'installation, une automatique et l'autre manuelle. + +**"WSL2 Ubuntu 22.04" sera designe par "WSL2"** + +**"PyCharm Professional" sera designe par "PyCharm"** + +## Installer WSL2 + +Executez Powershell avec les droits administrateur et lancez la commande suivante : + +```bash +wsl --install -d Ubuntu-22.04 +``` + +Si vous avez des difficultes a ouvrir Powershell avec les droits administrateur, appuyez sur `Windows + R`, entrez la ligne suivante et appuyez sur `OK`. Les droits administrateur vous seront automatiquement demandes. + +```bash +powershell.exe +``` + +### Depannage - Optionnel +Si vous rencontrez des problemes, activez les options de virtualisation dans le BIOS si disponibles (hyper-v, vt-x, etc). Recherchez `Activer ou desactiver des fonctionnalites Windows` dans la barre de recherche Windows et assurez-vous que `Sous-systeme Windows pour Linux` est active avant de redemarrer votre machine. + +Vous pouvez aussi essayer ces commandes powershell : + +```bash +dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart +wsl --set-default-version 2 +``` + +Telechargez et installez le dernier package de mise a jour du noyau Linux de Microsoft avec le [lien](https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi) suivant : + +```bash +https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi +``` + +N'executez cette commande qu'en dernier recours car elle peut casser d'autres machines virtuelles : + +```bash +bcdedit /set hypervisorlaunchtype auto +``` + +### Autres methodes d'installation pour WSL2 + +Executez Powershell avec les droits administrateur et lancez la commande suivante : + +```bash +curl.exe -L -o ubuntu-2004.appx https://aka.ms/wslubuntu2004 +``` + +Executez Powershell avec les droits administrateur et lancez les commandes suivantes : + +```bash +Invoke-WebRequest -Uri https://aka.ms/wslubuntu2004 -OutFile Ubuntu.appx -UseBasicParsing +Add-AppxPackage .\Ubuntu.appx +``` + +Installez WSL2 depuis le Microsoft Store avec le [lien](https://apps.microsoft.com/store/detail/ubuntu-22041-lts/9PN20MSR04DW) suivant : + +```bash +https://apps.microsoft.com/store/detail/ubuntu-22041-lts/9PN20MSR04DW +``` + +## Configurer WSL2 pour ERPLibre + +Une fois WSL2 installe correctement, redemarrez votre ordinateur. + +### Vous pouvez ouvrir votre Ubuntu de plusieurs facons : + +* Recherchez "Ubuntu" en cliquant sur la touche Windows +* [Telechargez le Terminal Windows depuis le Microsoft Store](https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701) + +Si vous utilisez le Terminal Windows, vous n'avez qu'a cliquer sur la petite fleche a cote du signe + et vous verrez Ubuntu. + +![image](https://user-images.githubusercontent.com/59217113/230186101-579d8a5b-0825-404f-bd28-3642adce0948.png) + + +### Configurer une interface graphique pour votre Ubuntu + +1. Mettre a jour votre Ubuntu + +```bash +sudo apt-get update -y && sudo apt-get upgrade -y +``` + +2. Installer le bureau XFCE4 + +```bash +sudo apt install -y xrdp xfce4 xfce4-goodies +``` + +3. Configurer le bureau + +```bash +sudo cp /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.bak +sudo sed -i 's/3389/3390/g' /etc/xrdp/xrdp.ini +sudo sed -i 's/max_bpp=32/#max_bpp=32\nmax_bpp=128/g' /etc/xrdp/xrdp.ini +sudo sed -i 's/xserverbpp=24/#xserverbpp=24\nxserverbpp=128/g' /etc/xrdp/xrdp.ini +echo xfce4-session > ~/.xsession +``` + +4. Configurer la connexion Bureau a distance + +```bash +sudo nano /etc/xrdp/startwm.sh +``` + +Commentez ces lignes avec un # + +```bash +test -x /etc/X11/Xsession && exec /etc/X11/Xsession +exec /bin/sh /etc/X11/Xsession +``` + +Ajoutez cette ligne a la fin du fichier + +```bash +startxfce4 +``` + +Quittez avec Ctrl+S, Ctrl+X + +5. Demarrer l'interface graphique du bureau Ubuntu + +Ouvrez le terminal Ubuntu sur votre Windows et entrez cette commande + +```bash +sudo /etc/init.d/xrdp start +``` + +Ensuite ouvrez *Connexion Bureau a distance* en cliquant sur la touche Windows et connectez-vous a *localhost:3390* + +### Memoire - Optionnel +Si WSL utilise trop de memoire, vous pouvez la reduire avec une etape simple. +Il suffit d'aller dans *C:\Users\VotreNomUtilisateur\.wslconfig* et de creer un fichier *.wslconfig* et d'ecrire : + +```bash +sudo /etc/init.d/xrdp start + +[wsl2] +memory=3GB +``` + +### Installation des outils necessaires et a jour + +```bash +sudo apt update +sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev curl libbz2-dev rsync make git +``` + +## Installation d'ERPLibre sous WSL2 + +Assurez-vous d'etre dans le repertoire ou vous souhaitez cloner le projet. + +```bash +git clone https://github.com/ERPLibre/ERPLibre.git +cd ERPLibre +make install +``` + +Ajoutez un role a PostgreSQL, changez le champ `USERNAME` dans la commande avec votre nom d'utilisateur UNIX de votre environnement WSL2. + +```bash +sudo service postgresql start +sudo su - postgres -c "createuser -s USERNAME" 2>/dev/null || true +``` + +## Problemes courants lors de l'installation + +### Erreur lors de `make install` +Assurez-vous que toutes les dependances sont installees correctement. Relancez la commande suivante pour corriger les dependances cassees : + +```bash +sudo apt-get install -f +``` + +### PostgreSQL ne demarre pas +Verifiez le statut du service PostgreSQL avec la commande suivante : + +```bash +sudo service postgresql status +``` + +Si PostgreSQL ne fonctionne pas, essayez de le redemarrer avec : + +```bash +sudo service postgresql restart +``` + + +## Executer ERPLibre + +A chaque redemarrage de votre machine, la commande suivante doit etre executee pour demarrer le service PostgreSQL s'il n'est pas deja en cours d'execution : + +```bash +sudo service postgresql start +``` + +Ensuite lancez cette commande a la racine du projet : + +```bash +./run.sh +``` + +## Verification d'ERPLibre +Pendant qu'ERPLibre est en cours d'execution, assurez-vous que vous pouvez vous connecter a l'URL suivante `http://localhost:8069` et que vous avez la possibilite de creer, modifier et supprimer des bases de donnees. + +## Configurer l'environnement de developpement - PyCharm + +### Installer PyCharm + +Installez PyCharm depuis le [lien](https://www.jetbrains.com/pycharm/download/#section=windows) suivant : + +```bash +https://www.jetbrains.com/pycharm/download/#section=windows +``` + +### Configurer Pycharm + +Selectionnez `Connect to WSL` sous `Remote Development`. Ensuite selectionnez votre instance Ubuntu ("Ubuntu-22.04"). Pointez `Project directory` vers la racine du projet. Une fois que tout a ete selectionne et rempli correctement, cliquez sur `Start IDE and Connect`. + +![Welcome to PyCharm Wizard](image/remote_development.png) + +Appuyez sur `CTRL+ALT+S`, recherchez `interpreter` et dans la page `Python Interpreter`, cliquez sur `Add Interpreter` et selectionnez `Add Local Interpreter...`. + +![Interpreter Settings](image/add_local_interpreter.png) + +Assurez-vous de selectionner `Virtualenv Environment` a gauche et le bouton radio `Existing`. Une fois les deux correctement selectionnes, pointez votre interpreteur vers le repertoire `../ERPLibre/.venv/bin/python` du projet et cliquez sur `OK`. + +![Environment Settings](image/existing_venv.png) + +Si ces dernieres etapes pour configurer votre environnement de developpement n'ont pas fonctionne, suivez les etapes "Manuelles" suivantes pour configurer votre environnement. + +## Installation manuelle + +### Installer Python 3.10.14 +Vous pouvez supprimer les fichiers restants dans votre repertoire personnel concernant l'installation de Python une fois les etapes completees avec succes. + +```bash +cd ~ +wget https://www.python.org/ftp/python/3.10.14/Python-3.10.14.tgz +tar -xzf Python-3.10.14.tgz +cd Python-3.10.14 +./configure --enable-optimizations +make -j $(nproc) +sudo make install +``` + +### Verifier l'installation + +```bash +python3.10 +``` + +### Definir Python 3.10.14 par defaut + +```bash +alias python='/usr/local/bin/python3.10' +source ~/.bashrc +``` + +### Configurer Pycharm + +Ouvrez le repertoire du projet dans PyCharm. + +Appuyez sur `CTRL+ALT+S`, recherchez `interpreter` et dans la page `Python Interpreter`, cliquez sur `Add Interpreter` et selectionnez `On WSL...`. + +![Interpreter Settings](image/on_wsl.png) + +Attendez que PyCharm detecte votre instance WSL2 et appuyez sur `NEXT`. Cliquez sur `System Interpreter` a gauche, selectionnez le bon interpreteur s'il ne l'a pas fait automatiquement et cliquez sur `Create`. + +![System Interpreter](image/system_python.png) + +Fermez les parametres du projet. Lorsque PyCharm vous propose d'importer des modules, autorisez-le. + +## Problemes courants avec le developpement Windows + +### Terminal casse + +Recherchez `terminal` dans les parametres, et sous `Application Settings` dans le champ `Shell path:` entrez la ligne suivante : + +```bash +wsl.exe +``` + +![Shell Path - Terminal](image/shell_path.png) + +### Avertissements d'utilisation elevee de la memoire +Si vous constatez une utilisation elevee de la memoire, cliquez sur `Help` dans la barre d'outils et choisissez `Change Memory Settings` pour augmenter la memoire allouee a l'IDE. + +### Modules importes manquants ou incorrects +PyCharm peut ne pas reconnaitre completement certains details de `requirements.txt` et `pyproject.toml` (par exemple, des versions specifiques de modules). Si vous rencontrez des problemes a l'execution ou lors du debogage, recherchez la bonne version du module et reinstallez-le avec le gestionnaire de paquets de PyCharm. + +### Impossible d'executer ERPLibre depuis PyCharm + +Si ERPLibre ne se lance pas depuis PyCharm, executez la commande suivante dans le repertoire racine du projet depuis le terminal de PyCharm ou WSL2 : + +```bash +./script/ide/pycharm_configuration.py +``` + +### Impossible de redemarrer ERPLibre +Lancez `htop` depuis le terminal de PyCharm ou WSL2 et fermez les processus Python lies a ERPLibre pour liberer le socket. + +## References +[Installation de WSL](https://learn.microsoft.com/en-us/windows/wsl/install) +Guide complet sur l'installation du Sous-systeme Windows pour Linux (WSL) sur Windows. + +[Documentation officielle de PostgreSQL](https://www.postgresql.org/docs/) +Documentation officielle de PostgreSQL pour le depannage des problemes courants et pour en apprendre davantage sur les commandes et la configuration de PostgreSQL. + +[Installation et configuration de PyCharm](https://www.jetbrains.com/pycharm/quickstart/) +Guide de demarrage rapide pour la configuration de PyCharm, incluant la gestion des modules Python et la configuration de l'environnement. + +[Depannage de WSL](https://learn.microsoft.com/en-us/windows/wsl/troubleshoot) +Guide de depannage pour les problemes courants rencontres avec WSL, fournissant des solutions pour divers problemes qui peuvent survenir. + +[Interface graphique Linux](https://hub.tcno.co/windows/wsl/desktop-gui/) +Instructions pour configurer une interface graphique (GUI) dans WSL, ce qui peut etre utile pour une meilleure integration des applications Linux. + +[Probleme de memoire](https://www.aleksandrhovhannisyan.com/blog/limiting-memory-usage-in-wsl-2/) +Guide sur la gestion et la limitation de l'utilisation de la memoire dans WSL 2 pour eviter les problemes de consommation elevee de memoire. \ No newline at end of file diff --git a/doc/WINDOWS_INSTALLATION.md b/doc/WINDOWS_INSTALLATION.md index 7c17bb1..b2e87a4 100644 --- a/doc/WINDOWS_INSTALLATION.md +++ b/doc/WINDOWS_INSTALLATION.md @@ -1,295 +1,325 @@ -# Windows 10 version 2004 and up or 11 - release and development - -A guide on how to set up a workspace and run ERPLibre on Windows 10 version 2004 and up or Windows 11. There are two methods of installation, one is automatic and the other manual. - -**"WSL2 Ubuntu 22.04" will be referred as "WSL2"** - -**"PyCharm Professional" will be referred as "PyCharm"** - -## Install WSL2 - -Run Powershell with administrator rights and run the following command: -```bash -wsl --install -d Ubuntu-22.04 -``` - -If you have trouble opening the Powershell with administrator rights, press `Windows + R`, enter the following line and press `OK`. You will be automatically prompted for administrator rights. -```bash -powershell.exe -``` - -### Troubleshooting - Optional -If you have issues enable virtualization options in BIOS is available (hyper-v, vt-x, etc). Search for `Turn Windows features on or off` in the Windows search bar and ensure that `Windows Subsystem for Linux` is turned on before restarting your machine. - -You can also try theses powershell commands: -```bash -dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart -wsl --set-default-version 2 -``` - -Download and install the lastest Linux kernel update package from Microsoft with the following [link](https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi): -```bash -https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi -``` - -Only run this command as your last resort as it can break other virtual machines: -```bash -bcdedit /set hypervisorlaunchtype auto -``` - -### Other Installation methods for WSL2 - -Run Powershell with administrator rights and run the following command: -```bash -curl.exe -L -o ubuntu-2004.appx https://aka.ms/wslubuntu2004 -``` - -Run Powershell with administrator rights and run the following commands: -```bash -Invoke-WebRequest -Uri https://aka.ms/wslubuntu2004 -OutFile Ubuntu.appx -UseBasicParsing -Add-AppxPackage .\Ubuntu.appx -``` - -Install WSL2 from the Microsoft Store with the following [link](https://apps.microsoft.com/store/detail/ubuntu-22041-lts/9PN20MSR04DW): -```bash -https://apps.microsoft.com/store/detail/ubuntu-22041-lts/9PN20MSR04DW -``` - -## Setup WSL2 for ERPLibre - -Once WSL2 has been installed correctly, reboot your computer. - -### You can open your Ubuntu many ways: - -* Search "Ubuntu" by clicking the Windows key -* [Download the Windows Terminal from the Microsoft Store](https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701) - -If you are using the Windows Terminal, you just have to click the little arrow next to the + sign and then you will see Ubuntu. -![image](https://user-images.githubusercontent.com/59217113/230186101-579d8a5b-0825-404f-bd28-3642adce0948.png) - - -### Setup a GUI for you Ubuntu - -1. Update your Ubuntu -```bash -sudo apt-get update -y && sudo apt-get upgrade -y -``` - -2. Install the XFCE4 Desktop -```bash -sudo apt install -y xrdp xfce4 xfce4-goodies -``` - -3. Setup the Desktop -```bash -sudo cp /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.bak -sudo sed -i 's/3389/3390/g' /etc/xrdp/xrdp.ini -sudo sed -i 's/max_bpp=32/#max_bpp=32\nmax_bpp=128/g' /etc/xrdp/xrdp.ini -sudo sed -i 's/xserverbpp=24/#xserverbpp=24\nxserverbpp=128/g' /etc/xrdp/xrdp.ini -echo xfce4-session > ~/.xsession -``` - -4. Setup the Remote Desktop Connection -```bash -sudo nano /etc/xrdp/startwm.sh -``` - -Comment these lines with a # -```bash -test -x /etc/X11/Xsession && exec /etc/X11/Xsession -exec /bin/sh /etc/X11/Xsession -``` - -Add this line at the end of the file -```bash -startxfce4 -``` - -Exit with Ctrl+S, Ctrl+X - -5. Starting Ubuntu Desktop GUI - -Open Ubuntu Terminal on your Windows and enter this command -```bash -sudo /etc/init.d/xrdp start -``` - -Then open *Remote Desktop Connection* by clicking the Windows key and connect to *localhost:3390* - -### Memory - Optionnel -If WSL is taking too much memory, you can reduce with an easy step. -You just have to go to *C:\Users\YourUsername\.wslconfig* and create a *.wslconfig* file and write: -```bash -sudo /etc/init.d/xrdp start - -[wsl2] -memory=3GB -``` - -### Installation of the necessary and up-to-date tools - -```bash -sudo apt update -sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev curl libbz2-dev rsync make git -``` - -## Installation of ERPLibre under WSL2 - -Make sure to be in the directory where you want to clone the project. -```bash -git clone https://github.com/ERPLibre/ERPLibre.git -cd ERPLibre -make install -``` - -Add role to PostgresSQL, change `USERNAME` field in the command with your UNIX username from your WSL2 environment. -```bash -sudo service postgresql start -sudo su - postgres -c "createuser -s USERNAME" 2>/dev/null || true -``` -## Common Problems During Installation - -### Error During `make install` -Ensure all dependencies are installed correctly. Re-run the following command to fix any broken dependencies: -```bash -sudo apt-get install -f -``` -### PostgreSQL Not Starting -Check the PostgreSQL service status with the following command: -```bash -sudo service postgresql status -``` -If PostgreSQL is not running, try restarting it with: -```bash -sudo service postgresql restart -``` - - -## Running ERPLibre - -Everytime you restart your machine, the following command has to be executed to start the PostgreSQL service if it is not already running: -```bash -sudo service postgresql start -``` - -After that run this command in the root of the project: -```bash -./run.sh -``` - -## Verifying ERPLibre -While ERPLibre is running, make sure that you can connect to the following URL `http://localhost:8069` and have the ability to create, modify and remove databases. - -## Set up Development Environment - PyCharm - -### Install PyCharm - -Install PyCharm from the following [link](https://www.jetbrains.com/pycharm/download/#section=windows): -```bash -https://www.jetbrains.com/pycharm/download/#section=windows -``` - -### Set up Pycharm - -Select `Connect to WSL` under `Remote Development`. After that select your Ubuntu instace ("Ubuntu-22.04"). Point `Project directory` to the root of the project. Once everything has been selected and filled out correctly, click on `Start IDE and Connect`. - -![Welcome to PyCharm Wizard](image/remote_development.png) - -Press `CTRL+ALT+S`, search for `interpreter` and inside the `Python Interpreter` page, click on `Add Interpreter` and select `Add Local Interpreter...`. - -![Interpreter Settings](image/add_local_interpreter.png) - -Make sure to select `Virtualenv Environment` on the left and the `Existing` radio button. Once theses are both selected properly, point your interpreter to the `../ERPLibre/.venv/bin/python` directory of the project and click on `OK`. - -![Environment Settings](image/existing_venv.png) - -If these last steps to set up your development environment were unsuccessful, follow the next "Manual" steps to set up your environment. - -## Manual Installation - -### Install Python 3.10.14 -You can delete the files that are left over in your home directory regarding the python installation when the steps have been completed succesfully. -```bash -cd ~ -wget https://www.python.org/ftp/python/3.10.14/Python-3.10.14.tgz -tar -xzf Python-3.10.14.tgz -cd Python-3.10.14 -./configure --enable-optimizations -make -j $(nproc) -sudo make install -``` - -### Verify the installation - -```bash -python3.10 -``` - -### Set Python 3.10.14 as default - -```bash -alias python='/usr/local/bin/python3.10' -source ~/.bashrc -``` - -### Set up Pycharm - -Open the project directory in PyCharm. - -Press `CTRL+ALT+S`, search for `interpreter` and inside the `Python Interpreter` page, click on `Add Interpreter` and select `On WSL...`. - -![Interpreter Settings](image/on_wsl.png) - -Wait until PyCharm detects your WSL2 instance and press `NEXT`. Click on `System Interpreter` on the left, select the correct interpreter if it hasn't done so automatically and click `Create`. - -![System Interpreter](image/system_python.png) - -Close the project's settings. Once PyCharm prompts you to import modules and allow it. - -## Common problems with Windows Development - -### Broken Terminal - -Search for `terminal` in the settings, and under `Application Settings` in the `Shell path:` field enter the following line: - -```bash -wsl.exe -``` -![Shell Path - Terminal](image/shell_path.png) - -### High Memory Usage warnings -If you experience high memory usage, click on `Help` in the toolbar and choose `Change Memory Settings` to increase the memory heap of the IDE. - -### Missing or incorrect imported modules -PyCharm might not fully recognize some details from `requirements.txt` and `pyproject.toml` (e.g., specific module versions). If you encounter issues at runtime or while debugging, search for the correct version of the module and reinstall it using PyCharm's package manager. - -### Can't run ERPLibre from PyCharm - -If ERPLibre fails to run from PyCharm, execute the following command in the root directory of the project from the terminal in PyCharm or WSL2: - -```bash -./script/ide/pycharm_configuration.py -``` - -### Can't restart ERPLibre -Run `htop` from the terminal in PyCharm or WSL2 and close the python processes related to ERPLibre to release the socket. - -## References -[WSL Installation](https://learn.microsoft.com/en-us/windows/wsl/install) -Comprehensive guide on installing Windows Subsystem for Linux (WSL) on Windows. - -[PostgreSQL Official Documentation](https://www.postgresql.org/docs/) -Official PostgreSQL documentation for troubleshooting common issues and learning more about PostgreSQL commands and configuration. - -[PyCharm Installation and Configuration](https://www.jetbrains.com/pycharm/quickstart/) -Quick start guide for setting up and configuring PyCharm, including handling Python modules and environment setup. - -[WSL Troubleshooting](https://learn.microsoft.com/en-us/windows/wsl/troubleshoot) -Troubleshooting guide for common issues encountered in WSL, providing solutions for various problems that may arise. - -[Linux GUI](https://hub.tcno.co/windows/wsl/desktop-gui/) -Instructions for setting up a graphical user interface (GUI) in WSL, which might be helpful for better integration of Linux applications. - -[Memory Problem](https://www.aleksandrhovhannisyan.com/blog/limiting-memory-usage-in-wsl-2/) -Guide on how to manage and limit memory usage in WSL 2 to avoid high memory consumption issues. - + +# Windows 10 version 2004 and up or 11 - release and development + +A guide on how to set up a workspace and run ERPLibre on Windows 10 version 2004 and up or Windows 11. There are two methods of installation, one is automatic and the other manual. + +**"WSL2 Ubuntu 22.04" will be referred as "WSL2"** + +**"PyCharm Professional" will be referred as "PyCharm"** + +## Install WSL2 + +Run Powershell with administrator rights and run the following command: + +```bash +wsl --install -d Ubuntu-22.04 +``` + +If you have trouble opening the Powershell with administrator rights, press `Windows + R`, enter the following line and press `OK`. You will be automatically prompted for administrator rights. + +```bash +powershell.exe +``` + +### Troubleshooting - Optional +If you have issues enable virtualization options in BIOS is available (hyper-v, vt-x, etc). Search for `Turn Windows features on or off` in the Windows search bar and ensure that `Windows Subsystem for Linux` is turned on before restarting your machine. + +You can also try theses powershell commands: + +```bash +dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart +wsl --set-default-version 2 +``` + +Download and install the lastest Linux kernel update package from Microsoft with the following [link](https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi): + +```bash +https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi +``` + +Only run this command as your last resort as it can break other virtual machines: + +```bash +bcdedit /set hypervisorlaunchtype auto +``` + +### Other Installation methods for WSL2 + +Run Powershell with administrator rights and run the following command: + +```bash +curl.exe -L -o ubuntu-2004.appx https://aka.ms/wslubuntu2004 +``` + +Run Powershell with administrator rights and run the following commands: + +```bash +Invoke-WebRequest -Uri https://aka.ms/wslubuntu2004 -OutFile Ubuntu.appx -UseBasicParsing +Add-AppxPackage .\Ubuntu.appx +``` + +Install WSL2 from the Microsoft Store with the following [link](https://apps.microsoft.com/store/detail/ubuntu-22041-lts/9PN20MSR04DW): + +```bash +https://apps.microsoft.com/store/detail/ubuntu-22041-lts/9PN20MSR04DW +``` + +## Setup WSL2 for ERPLibre + +Once WSL2 has been installed correctly, reboot your computer. + +### You can open your Ubuntu many ways: + +* Search "Ubuntu" by clicking the Windows key +* [Download the Windows Terminal from the Microsoft Store](https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701) + +If you are using the Windows Terminal, you just have to click the little arrow next to the + sign and then you will see Ubuntu. + +![image](https://user-images.githubusercontent.com/59217113/230186101-579d8a5b-0825-404f-bd28-3642adce0948.png) + + +### Setup a GUI for you Ubuntu + +1. Update your Ubuntu + +```bash +sudo apt-get update -y && sudo apt-get upgrade -y +``` + +2. Install the XFCE4 Desktop + +```bash +sudo apt install -y xrdp xfce4 xfce4-goodies +``` + +3. Setup the Desktop + +```bash +sudo cp /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.bak +sudo sed -i 's/3389/3390/g' /etc/xrdp/xrdp.ini +sudo sed -i 's/max_bpp=32/#max_bpp=32\nmax_bpp=128/g' /etc/xrdp/xrdp.ini +sudo sed -i 's/xserverbpp=24/#xserverbpp=24\nxserverbpp=128/g' /etc/xrdp/xrdp.ini +echo xfce4-session > ~/.xsession +``` + +4. Setup the Remote Desktop Connection + +```bash +sudo nano /etc/xrdp/startwm.sh +``` + +Comment these lines with a # + +```bash +test -x /etc/X11/Xsession && exec /etc/X11/Xsession +exec /bin/sh /etc/X11/Xsession +``` + +Add this line at the end of the file + +```bash +startxfce4 +``` + +Exit with Ctrl+S, Ctrl+X + +5. Starting Ubuntu Desktop GUI + +Open Ubuntu Terminal on your Windows and enter this command + +```bash +sudo /etc/init.d/xrdp start +``` + +Then open *Remote Desktop Connection* by clicking the Windows key and connect to *localhost:3390* + +### Memory - Optional +If WSL is taking too much memory, you can reduce with an easy step. +You just have to go to *C:\Users\YourUsername\.wslconfig* and create a *.wslconfig* file and write: + +```bash +sudo /etc/init.d/xrdp start + +[wsl2] +memory=3GB +``` + +### Installation of the necessary and up-to-date tools + +```bash +sudo apt update +sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev curl libbz2-dev rsync make git +``` + +## Installation of ERPLibre under WSL2 + +Make sure to be in the directory where you want to clone the project. + +```bash +git clone https://github.com/ERPLibre/ERPLibre.git +cd ERPLibre +make install +``` + +Add role to PostgresSQL, change `USERNAME` field in the command with your UNIX username from your WSL2 environment. + +```bash +sudo service postgresql start +sudo su - postgres -c "createuser -s USERNAME" 2>/dev/null || true +``` + +## Common Problems During Installation + +### Error During `make install` +Ensure all dependencies are installed correctly. Re-run the following command to fix any broken dependencies: + +```bash +sudo apt-get install -f +``` + +### PostgreSQL Not Starting +Check the PostgreSQL service status with the following command: + +```bash +sudo service postgresql status +``` + +If PostgreSQL is not running, try restarting it with: + +```bash +sudo service postgresql restart +``` + + +## Running ERPLibre + +Everytime you restart your machine, the following command has to be executed to start the PostgreSQL service if it is not already running: + +```bash +sudo service postgresql start +``` + +After that run this command in the root of the project: + +```bash +./run.sh +``` + +## Verifying ERPLibre +While ERPLibre is running, make sure that you can connect to the following URL `http://localhost:8069` and have the ability to create, modify and remove databases. + +## Set up Development Environment - PyCharm + +### Install PyCharm + +Install PyCharm from the following [link](https://www.jetbrains.com/pycharm/download/#section=windows): + +```bash +https://www.jetbrains.com/pycharm/download/#section=windows +``` + +### Set up Pycharm + +Select `Connect to WSL` under `Remote Development`. After that select your Ubuntu instace ("Ubuntu-22.04"). Point `Project directory` to the root of the project. Once everything has been selected and filled out correctly, click on `Start IDE and Connect`. + +![Welcome to PyCharm Wizard](image/remote_development.png) + +Press `CTRL+ALT+S`, search for `interpreter` and inside the `Python Interpreter` page, click on `Add Interpreter` and select `Add Local Interpreter...`. + +![Interpreter Settings](image/add_local_interpreter.png) + +Make sure to select `Virtualenv Environment` on the left and the `Existing` radio button. Once theses are both selected properly, point your interpreter to the `../ERPLibre/.venv/bin/python` directory of the project and click on `OK`. + +![Environment Settings](image/existing_venv.png) + +If these last steps to set up your development environment were unsuccessful, follow the next "Manual" steps to set up your environment. + +## Manual Installation + +### Install Python 3.10.14 +You can delete the files that are left over in your home directory regarding the python installation when the steps have been completed succesfully. + +```bash +cd ~ +wget https://www.python.org/ftp/python/3.10.14/Python-3.10.14.tgz +tar -xzf Python-3.10.14.tgz +cd Python-3.10.14 +./configure --enable-optimizations +make -j $(nproc) +sudo make install +``` + +### Verify the installation + +```bash +python3.10 +``` + +### Set Python 3.10.14 as default + +```bash +alias python='/usr/local/bin/python3.10' +source ~/.bashrc +``` + +### Set up Pycharm + +Open the project directory in PyCharm. + +Press `CTRL+ALT+S`, search for `interpreter` and inside the `Python Interpreter` page, click on `Add Interpreter` and select `On WSL...`. + +![Interpreter Settings](image/on_wsl.png) + +Wait until PyCharm detects your WSL2 instance and press `NEXT`. Click on `System Interpreter` on the left, select the correct interpreter if it hasn't done so automatically and click `Create`. + +![System Interpreter](image/system_python.png) + +Close the project's settings. Once PyCharm prompts you to import modules and allow it. + +## Common problems with Windows Development + +### Broken Terminal + +Search for `terminal` in the settings, and under `Application Settings` in the `Shell path:` field enter the following line: + +```bash +wsl.exe +``` + +![Shell Path - Terminal](image/shell_path.png) + +### High Memory Usage warnings +If you experience high memory usage, click on `Help` in the toolbar and choose `Change Memory Settings` to increase the memory heap of the IDE. + +### Missing or incorrect imported modules +PyCharm might not fully recognize some details from `requirements.txt` and `pyproject.toml` (e.g., specific module versions). If you encounter issues at runtime or while debugging, search for the correct version of the module and reinstall it using PyCharm's package manager. + +### Can't run ERPLibre from PyCharm + +If ERPLibre fails to run from PyCharm, execute the following command in the root directory of the project from the terminal in PyCharm or WSL2: + +```bash +./script/ide/pycharm_configuration.py +``` + +### Can't restart ERPLibre +Run `htop` from the terminal in PyCharm or WSL2 and close the python processes related to ERPLibre to release the socket. + +## References +[WSL Installation](https://learn.microsoft.com/en-us/windows/wsl/install) +Comprehensive guide on installing Windows Subsystem for Linux (WSL) on Windows. + +[PostgreSQL Official Documentation](https://www.postgresql.org/docs/) +Official PostgreSQL documentation for troubleshooting common issues and learning more about PostgreSQL commands and configuration. + +[PyCharm Installation and Configuration](https://www.jetbrains.com/pycharm/quickstart/) +Quick start guide for setting up and configuring PyCharm, including handling Python modules and environment setup. + +[WSL Troubleshooting](https://learn.microsoft.com/en-us/windows/wsl/troubleshoot) +Troubleshooting guide for common issues encountered in WSL, providing solutions for various problems that may arise. + +[Linux GUI](https://hub.tcno.co/windows/wsl/desktop-gui/) +Instructions for setting up a graphical user interface (GUI) in WSL, which might be helpful for better integration of Linux applications. + +[Memory Problem](https://www.aleksandrhovhannisyan.com/blog/limiting-memory-usage-in-wsl-2/) +Guide on how to manage and limit memory usage in WSL 2 to avoid high memory consumption issues. diff --git a/docker/README.base.md b/docker/README.base.md new file mode 100644 index 0000000..a56196f --- /dev/null +++ b/docker/README.base.md @@ -0,0 +1,270 @@ + + + + + + +# ERPLibre - Docker + +Those images are prepared to permit better portability and reproducibility of ERPLibre release. + +Due the growing code of ERPLibre, it could also simplify development. + +NOTE: Those Dockerfiles themselves are in heavy development for now. Incompatibilities between releases are normal until the interface is stabilized. + +## Pre-requirements + +- Basic knowledge with Docker, Linux and bash +- Latest Docker version + +## Files representations + +- Dockerfile.base: This Dockerfile represents the base Docker image layer reused by other child layers. +- Dockerfile.dev: This Dockerfile is specialized in development. +- Dockerfile.prod{pkg,src}: Dockerfile.prod.\* is a Docker image specialized for production systems. Dockerfile.prod.pkg reuses official Debian files from Odoo.com. Dockerfile.prod.src fetches the Odoo source code as the ERPLibre runtime. + +## Getting started + +Be sure to start daemon docker + + +# ERPLibre - Docker + +Ces images sont préparées pour permettre une meilleure portabilité et reproductibilité des versions d'ERPLibre. + +En raison du code croissant d'ERPLibre, cela pourrait aussi simplifier le développement. + +NOTE : Ces Dockerfiles sont en développement actif pour le moment. Les incompatibilités entre les versions sont normales jusqu'à ce que l'interface soit stabilisée. + +## Prérequis + +- Connaissances de base avec Docker, Linux et bash +- Dernière version de Docker + +## Représentation des fichiers + +- Dockerfile.base : Ce Dockerfile représente la couche d'image Docker de base réutilisée par les autres couches enfants. +- Dockerfile.dev : Ce Dockerfile est spécialisé pour le développement. +- Dockerfile.prod{pkg,src} : Dockerfile.prod.\* est une image Docker spécialisée pour les systèmes de production. Dockerfile.prod.pkg réutilise les fichiers Debian officiels d'Odoo.com. Dockerfile.prod.src récupère le code source d'Odoo comme environnement d'exécution ERPLibre. + +## Démarrage + +Assurez-vous de démarrer le démon docker + + +```bash +systemctl start docker +``` + + +### Building the docker images + + +### Construire les images docker + + +```bash +cd docker +docker build -f Dockerfile.base -t technolibre/erplibre-base:12.0 . +docker build -f Dockerfile.prod.pkg -t technolibre/erplibre:12.0-pkg . +``` + + +### Running ERPLibre using Docker-Compose + +Go at the root of this git project. + + +### Exécuter ERPLibre avec Docker-Compose + +Allez à la racine de ce projet git. + + +```bash +cd ERPLibre +docker compose -f docker-compose.yml up -d +``` + + +### Diagnostic Docker-Compose + +Show docker-compose information + + +### Diagnostic Docker-Compose + +Afficher les informations docker-compose + + +```bash +docker compose ps +docker compose logs IMAGE_NAME +``` + + +Show docker information + + +Afficher les informations docker + + +```bash +docker ps -a +docker volume ls +docker inspect DOCKER_NAME +``` + + +Connect to a running docker + + +Se connecter à un docker en cours d'exécution + + +```bash +docker exec -ti DOCKER_NAME bash +docker exec -u root -ti DOCKER_NAME bash +``` + + +Commands for debugging + + +Commandes pour le débogage + + +```bash +docker run -p 8069:8069 --entrypoint bash -ti DOCKER_NAME +docker exec -ti DOCKER_NAME bash +docker exec -u root -ti DOCKER_NAME bash +docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -e POSTGRES_USER=odoo -e POSTGRES_DB=postgres postgre + +export +db_host = "host.docker.internal" + +docker stats erplibre_ERPLibre_1 +``` + + +### Cleaning + +Delete all system + + +### Nettoyage + +Supprimer tout le système + + +```bash +docker system prune -a +``` + + +Delete docker image + + +Supprimer une image docker + + +```bash +docker image prune +docker rmi $(docker images -q) +``` + + +Delete volumes + + +Supprimer les volumes + + +```bash +docker compose rm -v +``` + + +Delete containers + + +Supprimer les conteneurs + + +```bash +docker rm $(docker ps -a | grep -v IMAGE | awk '{print $1}') +``` + + +Delete volume + + +Supprimer un volume + + +```bash +docker volume prune +``` + + +# Change docker directory +You can change the docker directory by editing file `/etc/docker/daemon.json` + + +# Changer le répertoire docker +Vous pouvez changer le répertoire docker en modifiant le fichier `/etc/docker/daemon.json` + + +```json +{ + "data-root": "/home/docker" +} +``` + + +And restart docker service. You can delete or move all older locations of docker. + +Or + +Add `--data-root /second_drive/docker` like example following into file `/lib/systemd/system/docker.service` : + + +Et redémarrez le service docker. Vous pouvez supprimer ou déplacer tous les anciens emplacements de docker. + +Ou + +Ajoutez `--data-root /second_drive/docker` comme dans l'exemple suivant dans le fichier `/lib/systemd/system/docker.service` : + + +``` +ExecStart=/usr/bin/dockerd --data-root /second_drive/docker -H fd:// --containerd=/run/containerd/containerd.sock +``` + + +# Update docker +When building your docker with script +> make docker_build_odoo_16 + +List your docker version +> docker images + +You need to push your docker image and update your tag, like 1.0.1: +> docker push technolibre/erplibre:VERSION + +# Diagnostic +When getting and error about missing module, or after an upgrade, you need to update config file. +> make docker_exec_erplibre_gen_config + + +# Mettre à jour docker +Lors de la construction de votre docker avec le script +> make docker_build_odoo_16 + +Listez vos versions docker +> docker images + +Vous devez pousser votre image docker et mettre à jour votre tag, comme 1.0.1 : +> docker push technolibre/erplibre:VERSION + +# Diagnostic +Lorsque vous obtenez une erreur de module manquant, ou après une mise à jour, vous devez mettre à jour le fichier de configuration. +> make docker_exec_erplibre_gen_config diff --git a/docker/README.fr.md b/docker/README.fr.md new file mode 100644 index 0000000..b6834f1 --- /dev/null +++ b/docker/README.fr.md @@ -0,0 +1,148 @@ + +# ERPLibre - Docker + +Ces images sont préparées pour permettre une meilleure portabilité et reproductibilité des versions d'ERPLibre. + +En raison du code croissant d'ERPLibre, cela pourrait aussi simplifier le développement. + +NOTE : Ces Dockerfiles sont en développement actif pour le moment. Les incompatibilités entre les versions sont normales jusqu'à ce que l'interface soit stabilisée. + +## Prérequis + +- Connaissances de base avec Docker, Linux et bash +- Dernière version de Docker + +## Représentation des fichiers + +- Dockerfile.base : Ce Dockerfile représente la couche d'image Docker de base réutilisée par les autres couches enfants. +- Dockerfile.dev : Ce Dockerfile est spécialisé pour le développement. +- Dockerfile.prod{pkg,src} : Dockerfile.prod.\* est une image Docker spécialisée pour les systèmes de production. Dockerfile.prod.pkg réutilise les fichiers Debian officiels d'Odoo.com. Dockerfile.prod.src récupère le code source d'Odoo comme environnement d'exécution ERPLibre. + +## Démarrage + +Assurez-vous de démarrer le démon docker + +```bash +systemctl start docker +``` + +### Construire les images docker + +```bash +cd docker +docker build -f Dockerfile.base -t technolibre/erplibre-base:12.0 . +docker build -f Dockerfile.prod.pkg -t technolibre/erplibre:12.0-pkg . +``` + +### Exécuter ERPLibre avec Docker-Compose + +Allez à la racine de ce projet git. + +```bash +cd ERPLibre +docker compose -f docker-compose.yml up -d +``` + +### Diagnostic Docker-Compose + +Afficher les informations docker-compose + +```bash +docker compose ps +docker compose logs IMAGE_NAME +``` + +Afficher les informations docker + +```bash +docker ps -a +docker volume ls +docker inspect DOCKER_NAME +``` + +Se connecter à un docker en cours d'exécution + +```bash +docker exec -ti DOCKER_NAME bash +docker exec -u root -ti DOCKER_NAME bash +``` + +Commandes pour le débogage + +```bash +docker run -p 8069:8069 --entrypoint bash -ti DOCKER_NAME +docker exec -ti DOCKER_NAME bash +docker exec -u root -ti DOCKER_NAME bash +docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -e POSTGRES_USER=odoo -e POSTGRES_DB=postgres postgre + +export +db_host = "host.docker.internal" + +docker stats erplibre_ERPLibre_1 +``` + +### Nettoyage + +Supprimer tout le système + +```bash +docker system prune -a +``` + +Supprimer une image docker + +```bash +docker image prune +docker rmi $(docker images -q) +``` + +Supprimer les volumes + +```bash +docker compose rm -v +``` + +Supprimer les conteneurs + +```bash +docker rm $(docker ps -a | grep -v IMAGE | awk '{print $1}') +``` + +Supprimer un volume + +```bash +docker volume prune +``` + +# Changer le répertoire docker +Vous pouvez changer le répertoire docker en modifiant le fichier `/etc/docker/daemon.json` + +```json +{ + "data-root": "/home/docker" +} +``` + +Et redémarrez le service docker. Vous pouvez supprimer ou déplacer tous les anciens emplacements de docker. + +Ou + +Ajoutez `--data-root /second_drive/docker` comme dans l'exemple suivant dans le fichier `/lib/systemd/system/docker.service` : + +``` +ExecStart=/usr/bin/dockerd --data-root /second_drive/docker -H fd:// --containerd=/run/containerd/containerd.sock +``` + +# Mettre à jour docker +Lors de la construction de votre docker avec le script +> make docker_build_odoo_16 + +Listez vos versions docker +> docker images + +Vous devez pousser votre image docker et mettre à jour votre tag, comme 1.0.1 : +> docker push technolibre/erplibre:VERSION + +# Diagnostic +Lorsque vous obtenez une erreur de module manquant, ou après une mise à jour, vous devez mettre à jour le fichier de configuration. +> make docker_exec_erplibre_gen_config \ No newline at end of file diff --git a/docker/README.md b/docker/README.md index 98d9b3a..d9c0b99 100644 --- a/docker/README.md +++ b/docker/README.md @@ -1,3 +1,4 @@ + # ERPLibre - Docker Those images are prepared to permit better portability and reproducibility of ERPLibre release. @@ -6,7 +7,6 @@ Due the growing code of ERPLibre, it could also simplify development. NOTE: Those Dockerfiles themselves are in heavy development for now. Incompatibilities between releases are normal until the interface is stabilized. - ## Pre-requirements - Basic knowledge with Docker, Linux and bash @@ -21,6 +21,7 @@ NOTE: Those Dockerfiles themselves are in heavy development for now. Incompatibi ## Getting started Be sure to start daemon docker + ```bash systemctl start docker ``` @@ -36,6 +37,7 @@ docker build -f Dockerfile.prod.pkg -t technolibre/erplibre:12.0-pkg . ### Running ERPLibre using Docker-Compose Go at the root of this git project. + ```bash cd ERPLibre docker compose -f docker-compose.yml up -d @@ -44,12 +46,14 @@ docker compose -f docker-compose.yml up -d ### Diagnostic Docker-Compose Show docker-compose information + ```bash docker compose ps docker compose logs IMAGE_NAME ``` Show docker information + ```bash docker ps -a docker volume ls @@ -57,12 +61,14 @@ docker inspect DOCKER_NAME ``` Connect to a running docker + ```bash docker exec -ti DOCKER_NAME bash docker exec -u root -ti DOCKER_NAME bash ``` Commands for debugging + ```bash docker run -p 8069:8069 --entrypoint bash -ti DOCKER_NAME docker exec -ti DOCKER_NAME bash @@ -78,43 +84,51 @@ docker stats erplibre_ERPLibre_1 ### Cleaning Delete all system + ```bash docker system prune -a ``` Delete docker image + ```bash docker image prune docker rmi $(docker images -q) ``` Delete volumes + ```bash docker compose rm -v ``` Delete containers + ```bash docker rm $(docker ps -a | grep -v IMAGE | awk '{print $1}') ``` Delete volume + ```bash docker volume prune ``` # Change docker directory You can change the docker directory by editing file `/etc/docker/daemon.json` + ```json { "data-root": "/home/docker" } ``` + And restart docker service. You can delete or move all older locations of docker. Or Add `--data-root /second_drive/docker` like example following into file `/lib/systemd/system/docker.service` : + ``` ExecStart=/usr/bin/dockerd --data-root /second_drive/docker -H fd:// --containerd=/run/containerd/containerd.sock ``` diff --git a/script/database/README.base.md b/script/database/README.base.md new file mode 100644 index 0000000..796e91c --- /dev/null +++ b/script/database/README.base.md @@ -0,0 +1,35 @@ + + + + + + +# Database + +This section is for code generator database migrator. + +This configuration is for development environnement. + +You need to install script `./script/install/install_dev_extra_ubuntu.sh`. + +## Restore database + +Run script to restore database: + + +# Base de données + +Cette section concerne le migrateur de base de données du générateur de code. + +Cette configuration est pour l'environnement de développement. + +Vous devez installer le script `./script/install/install_dev_extra_ubuntu.sh`. + +## Restaurer une base de données + +Exécutez le script pour restaurer la base de données : + + +```bash +./script/database/restore_mariadb_sql_example_1.sh +``` diff --git a/script/database/README.fr.md b/script/database/README.fr.md new file mode 100644 index 0000000..3043749 --- /dev/null +++ b/script/database/README.fr.md @@ -0,0 +1,16 @@ + +# Base de données + +Cette section concerne le migrateur de base de données du générateur de code. + +Cette configuration est pour l'environnement de développement. + +Vous devez installer le script `./script/install/install_dev_extra_ubuntu.sh`. + +## Restaurer une base de données + +Exécutez le script pour restaurer la base de données : + +```bash +./script/database/restore_mariadb_sql_example_1.sh +``` \ No newline at end of file diff --git a/script/database/README.md b/script/database/README.md index aec8fee..ecf6380 100644 --- a/script/database/README.md +++ b/script/database/README.md @@ -1,3 +1,4 @@ + # Database This section is for code generator database migrator. @@ -9,6 +10,7 @@ You need to install script `./script/install/install_dev_extra_ubuntu.sh`. ## Restore database Run script to restore database: + ```bash ./script/database/restore_mariadb_sql_example_1.sh -``` +``` \ No newline at end of file diff --git a/script/deployment/README.base.md b/script/deployment/README.base.md new file mode 100644 index 0000000..5182c71 --- /dev/null +++ b/script/deployment/README.base.md @@ -0,0 +1,18 @@ + + + + + + +# Information about deployment with cloudflare + +The script update_dns_cloudflare.py is used to update all DNS for case of DDNS, when ip address change, with a cron. This version support an old version of cloudflare==2.20.0 + +The script cloudflare_dns.py is used to update specific address at a deployment. + + +# Informations sur le déploiement avec Cloudflare + +Le script update_dns_cloudflare.py est utilisé pour mettre à jour tous les DNS dans le cas d'un DDNS, lorsque l'adresse IP change, avec un cron. Cette version supporte une ancienne version de cloudflare==2.20.0 + +Le script cloudflare_dns.py est utilisé pour mettre à jour une adresse spécifique lors d'un déploiement. diff --git a/script/deployment/README.fr.md b/script/deployment/README.fr.md new file mode 100644 index 0000000..1e59c8e --- /dev/null +++ b/script/deployment/README.fr.md @@ -0,0 +1,6 @@ + +# Informations sur le déploiement avec Cloudflare + +Le script update_dns_cloudflare.py est utilisé pour mettre à jour tous les DNS dans le cas d'un DDNS, lorsque l'adresse IP change, avec un cron. Cette version supporte une ancienne version de cloudflare==2.20.0 + +Le script cloudflare_dns.py est utilisé pour mettre à jour une adresse spécifique lors d'un déploiement. \ No newline at end of file diff --git a/script/deployment/README.md b/script/deployment/README.md index 2e44ad4..ecb2aea 100644 --- a/script/deployment/README.md +++ b/script/deployment/README.md @@ -1,3 +1,4 @@ + # Information about deployment with cloudflare The script update_dns_cloudflare.py is used to update all DNS for case of DDNS, when ip address change, with a cron. This version support an old version of cloudflare==2.20.0 diff --git a/script/fork_github_repo/README.base.md b/script/fork_github_repo/README.base.md new file mode 100644 index 0000000..86620c5 --- /dev/null +++ b/script/fork_github_repo/README.base.md @@ -0,0 +1,16 @@ + + + + + + +Source of fork-github-repo : https://github.com/gene1wood/fork-github-repo +TODO +Create python dependency with submodule +https://shunsvineyard.info/2019/12/23/using-git-submodule-and-develop-mode-to-manage-python-projects/ + + +Source de fork-github-repo : https://github.com/gene1wood/fork-github-repo +À FAIRE +Créer une dépendance Python avec un sous-module +https://shunsvineyard.info/2019/12/23/using-git-submodule-and-develop-mode-to-manage-python-projects/ diff --git a/script/fork_github_repo/README.fr.md b/script/fork_github_repo/README.fr.md new file mode 100644 index 0000000..f6c4ed7 --- /dev/null +++ b/script/fork_github_repo/README.fr.md @@ -0,0 +1,5 @@ + +Source de fork-github-repo : https://github.com/gene1wood/fork-github-repo +À FAIRE +Créer une dépendance Python avec un sous-module +https://shunsvineyard.info/2019/12/23/using-git-submodule-and-develop-mode-to-manage-python-projects/ \ No newline at end of file diff --git a/script/fork_github_repo/README.md b/script/fork_github_repo/README.md index f3f4b53..9499250 100644 --- a/script/fork_github_repo/README.md +++ b/script/fork_github_repo/README.md @@ -1,4 +1,5 @@ + Source of fork-github-repo : https://github.com/gene1wood/fork-github-repo TODO Create python dependency with submodule -https://shunsvineyard.info/2019/12/23/using-git-submodule-and-develop-mode-to-manage-python-projects/ \ No newline at end of file +https://shunsvineyard.info/2019/12/23/using-git-submodule-and-develop-mode-to-manage-python-projects/ diff --git a/script/nginx/README.base.md b/script/nginx/README.base.md new file mode 100644 index 0000000..5154d4d --- /dev/null +++ b/script/nginx/README.base.md @@ -0,0 +1,75 @@ + + + + + + +# Deployment from Odoo + +## Support Wildcard + +You can support Wildcard domain, like *.mysite.com + +Generate manually the certificate : + + +# Déploiement depuis Odoo + +## Support Wildcard + +Vous pouvez supporter les domaines Wildcard, comme *.mysite.com + +Générez manuellement le certificat : + + +```bash +sudo certbot certonly --manual --preferred-challenges=dns --server https://acme-v02.api.letsencrypt.org/directory -d "*.mysite.com" -d "*.mysecondsite.com" +``` + + +Follow instruction. Manually update it each 90 days. + +## Single domain per website + +This solution will create nginx file and run certbot. + +Because Odoo hasn't root password, you can exempt with command + + +Suivez les instructions. Mettez-le à jour manuellement tous les 90 jours. + +## Un seul domaine par site web + +Cette solution va créer un fichier nginx et exécuter certbot. + +Comme Odoo n'a pas de mot de passe root, vous pouvez l'exempter avec la commande + + +```bash +visudo +``` + + +Add this content + + +Ajoutez ce contenu + + +```text +odoo ALL=(root) NOPASSWD: /usr/sbin/nginx -t +odoo ALL=(root) NOPASSWD: /usr/bin/systemctl reload nginx +odoo ALL=(root) NOPASSWD: /bin/ln -s * /etc/nginx/sites-enabled/* +odoo ALL=(root) NOPASSWD: /home/odoo/erplibre/script/nginx/deploy_nginx_and_certbot.py +``` + + +Run script + + +Exécutez le script + + +```bash +sudo ./script/nginx/deploy_nginx_and_certbot.py --generate_nginx --run_certbot --domain DOMAINS;DOMAINS +``` diff --git a/script/nginx/README.fr.md b/script/nginx/README.fr.md new file mode 100644 index 0000000..5a0624e --- /dev/null +++ b/script/nginx/README.fr.md @@ -0,0 +1,39 @@ + +# Déploiement depuis Odoo + +## Support Wildcard + +Vous pouvez supporter les domaines Wildcard, comme *.mysite.com + +Générez manuellement le certificat : + +```bash +sudo certbot certonly --manual --preferred-challenges=dns --server https://acme-v02.api.letsencrypt.org/directory -d "*.mysite.com" -d "*.mysecondsite.com" +``` + +Suivez les instructions. Mettez-le à jour manuellement tous les 90 jours. + +## Un seul domaine par site web + +Cette solution va créer un fichier nginx et exécuter certbot. + +Comme Odoo n'a pas de mot de passe root, vous pouvez l'exempter avec la commande + +```bash +visudo +``` + +Ajoutez ce contenu + +```text +odoo ALL=(root) NOPASSWD: /usr/sbin/nginx -t +odoo ALL=(root) NOPASSWD: /usr/bin/systemctl reload nginx +odoo ALL=(root) NOPASSWD: /bin/ln -s * /etc/nginx/sites-enabled/* +odoo ALL=(root) NOPASSWD: /home/odoo/erplibre/script/nginx/deploy_nginx_and_certbot.py +``` + +Exécutez le script + +```bash +sudo ./script/nginx/deploy_nginx_and_certbot.py --generate_nginx --run_certbot --domain DOMAINS;DOMAINS +``` \ No newline at end of file diff --git a/script/nginx/README.md b/script/nginx/README.md index 65d33a3..51246a9 100644 --- a/script/nginx/README.md +++ b/script/nginx/README.md @@ -1,3 +1,4 @@ + # Deployment from Odoo ## Support Wildcard @@ -5,6 +6,7 @@ You can support Wildcard domain, like *.mysite.com Generate manually the certificate : + ```bash sudo certbot certonly --manual --preferred-challenges=dns --server https://acme-v02.api.letsencrypt.org/directory -d "*.mysite.com" -d "*.mysecondsite.com" ``` @@ -34,4 +36,4 @@ Run script ```bash sudo ./script/nginx/deploy_nginx_and_certbot.py --generate_nginx --run_certbot --domain DOMAINS;DOMAINS -``` +``` \ No newline at end of file diff --git a/script/odoo/migration/README.base.md b/script/odoo/migration/README.base.md new file mode 100644 index 0000000..7856f03 --- /dev/null +++ b/script/odoo/migration/README.base.md @@ -0,0 +1,25 @@ + + + + + + +# Migration + +Run this script when doing database migration. Example : + + +# Migration + +Exécutez ce script lors de la migration de base de données. Exemple : + + +```bash +source ./.venv.odoo15.0_python3.8.20/bin/activate && cat ./script/odoo/migration/fix_migration_odoo140_to_odoo150.py | ./odoo15.0/odoo/odoo-bin shell -d DATABASE +``` + + +Check [uninstall_module_list_odoo140_to_odoo150.txt](uninstall_module_list_odoo140_to_odoo150.txt) + + +Consultez [uninstall_module_list_odoo140_to_odoo150.txt](uninstall_module_list_odoo140_to_odoo150.txt) diff --git a/script/odoo/migration/README.fr.md b/script/odoo/migration/README.fr.md new file mode 100644 index 0000000..19ca316 --- /dev/null +++ b/script/odoo/migration/README.fr.md @@ -0,0 +1,10 @@ + +# Migration + +Exécutez ce script lors de la migration de base de données. Exemple : + +```bash +source ./.venv.odoo15.0_python3.8.20/bin/activate && cat ./script/odoo/migration/fix_migration_odoo140_to_odoo150.py | ./odoo15.0/odoo/odoo-bin shell -d DATABASE +``` + +Consultez [uninstall_module_list_odoo140_to_odoo150.txt](uninstall_module_list_odoo140_to_odoo150.txt) \ No newline at end of file diff --git a/script/odoo/migration/README.md b/script/odoo/migration/README.md index c4892c1..62bf9c7 100644 --- a/script/odoo/migration/README.md +++ b/script/odoo/migration/README.md @@ -1,3 +1,4 @@ + # Migration Run this script when doing database migration. Example : diff --git a/script/restful/README.base.md b/script/restful/README.base.md new file mode 100644 index 0000000..d72891b --- /dev/null +++ b/script/restful/README.base.md @@ -0,0 +1,52 @@ + + + + + + +# Restful + +REST (representational state transfer) service in ERPLibre, create a token and get data. + +## Installation + +In your instance, install module `restful`. + +## Example + +The example works with application Helpdesk, install module `helpdesk_mgmt`. + +You need to run with specified database, and you can run the example script. + + +# Restful + +Service REST (representational state transfer) dans ERPLibre, créez un jeton et obtenez des données. + +## Installation + +Dans votre instance, installez le module `restful`. + +## Exemple + +L'exemple fonctionne avec l'application Helpdesk, installez le module `helpdesk_mgmt`. + +Vous devez exécuter avec une base de données spécifiée, et vous pouvez lancer le script d'exemple. + + +```bash +./script/database/db_restore.py --database test +./script/addons/install_addons.sh test restful,helpdesk_mgmt +./run.sh -d test +``` + + +Test with the example while the server is running. You can add data manually. + + +Testez avec l'exemple pendant que le serveur est en cours d'exécution. Vous pouvez ajouter des données manuellement. + + +```bash +./script/restful/restful_example.py +``` diff --git a/script/restful/README.fr.md b/script/restful/README.fr.md new file mode 100644 index 0000000..9143346 --- /dev/null +++ b/script/restful/README.fr.md @@ -0,0 +1,26 @@ + +# Restful + +Service REST (representational state transfer) dans ERPLibre, créez un jeton et obtenez des données. + +## Installation + +Dans votre instance, installez le module `restful`. + +## Exemple + +L'exemple fonctionne avec l'application Helpdesk, installez le module `helpdesk_mgmt`. + +Vous devez exécuter avec une base de données spécifiée, et vous pouvez lancer le script d'exemple. + +```bash +./script/database/db_restore.py --database test +./script/addons/install_addons.sh test restful,helpdesk_mgmt +./run.sh -d test +``` + +Testez avec l'exemple pendant que le serveur est en cours d'exécution. Vous pouvez ajouter des données manuellement. + +```bash +./script/restful/restful_example.py +``` \ No newline at end of file diff --git a/script/restful/README.md b/script/restful/README.md index 0e05eb5..f6f1f37 100644 --- a/script/restful/README.md +++ b/script/restful/README.md @@ -1,3 +1,4 @@ + # Restful REST (representational state transfer) service in ERPLibre, create a token and get data. @@ -22,4 +23,4 @@ Test with the example while the server is running. You can add data manually. ```bash ./script/restful/restful_example.py -``` +``` \ No newline at end of file diff --git a/script/selenium/README.base.md b/script/selenium/README.base.md new file mode 100644 index 0000000..cb90344 --- /dev/null +++ b/script/selenium/README.base.md @@ -0,0 +1,13 @@ + + + + + + +# Installation Ubuntu 20.04 + + +# Installation Ubuntu 20.04 + + + sudo apt install libcairo2-dev diff --git a/script/selenium/README.fr.md b/script/selenium/README.fr.md new file mode 100644 index 0000000..023d8c9 --- /dev/null +++ b/script/selenium/README.fr.md @@ -0,0 +1,4 @@ + +# Installation Ubuntu 20.04 + + sudo apt install libcairo2-dev \ No newline at end of file diff --git a/script/selenium/README.md b/script/selenium/README.md index 6808a83..023d8c9 100644 --- a/script/selenium/README.md +++ b/script/selenium/README.md @@ -1,3 +1,4 @@ + # Installation Ubuntu 20.04 - sudo apt install libcairo2-dev + sudo apt install libcairo2-dev \ No newline at end of file diff --git a/script/selenium/install.base.md b/script/selenium/install.base.md new file mode 100644 index 0000000..7dc845d --- /dev/null +++ b/script/selenium/install.base.md @@ -0,0 +1,29 @@ + + + + + + +# Selenium Installation + + +# Installation de Selenium + + +```bash +wget https://github.com/mozilla/geckodriver/releases/download/v0.34.0/geckodriver-v0.34.0-linux64.tar.gz +tar xvf geckodriver-v0.34.0-linux64.tar.gz +sudo mv ./.venv.erplibre/geckodriver /usr/bin/geckdriver + +pip install selenium + +sudo apt install libcairo2-dev python3-dev pkg-config libxt-dev libgirepository1.0-dev + +pip install pycairo PyGObject +``` + + +Video recorder: https://github.com/szemate/pyselenium-video-recorder + + +Enregistreur vidéo : https://github.com/szemate/pyselenium-video-recorder diff --git a/script/selenium/install.fr.md b/script/selenium/install.fr.md new file mode 100644 index 0000000..724bb39 --- /dev/null +++ b/script/selenium/install.fr.md @@ -0,0 +1,16 @@ + +# Installation de Selenium + +```bash +wget https://github.com/mozilla/geckodriver/releases/download/v0.34.0/geckodriver-v0.34.0-linux64.tar.gz +tar xvf geckodriver-v0.34.0-linux64.tar.gz +sudo mv ./.venv.erplibre/geckodriver /usr/bin/geckdriver + +pip install selenium + +sudo apt install libcairo2-dev python3-dev pkg-config libxt-dev libgirepository1.0-dev + +pip install pycairo PyGObject +``` + +Enregistreur vidéo : https://github.com/szemate/pyselenium-video-recorder \ No newline at end of file diff --git a/script/selenium/install.md b/script/selenium/install.md index ef6d25c..4f7b185 100644 --- a/script/selenium/install.md +++ b/script/selenium/install.md @@ -1,3 +1,7 @@ + +# Selenium Installation + +```bash wget https://github.com/mozilla/geckodriver/releases/download/v0.34.0/geckodriver-v0.34.0-linux64.tar.gz tar xvf geckodriver-v0.34.0-linux64.tar.gz sudo mv ./.venv.erplibre/geckodriver /usr/bin/geckdriver @@ -7,5 +11,6 @@ pip install selenium sudo apt install libcairo2-dev python3-dev pkg-config libxt-dev libgirepository1.0-dev pip install pycairo PyGObject +``` -https://github.com/szemate/pyselenium-video-recorder +Video recorder: https://github.com/szemate/pyselenium-video-recorder diff --git a/script/todo/README.base.md b/script/todo/README.base.md new file mode 100644 index 0000000..d2842f2 --- /dev/null +++ b/script/todo/README.base.md @@ -0,0 +1,16 @@ + + + + + + +TODO is an assistant robot to use ERPLibre +Execute it with `./script/todo/todo.py` or `make todo`. + +For a new project, copy todo_example.json to private/todo/todo_override.json | private/todo/todo_override_private.json and edit it. + + +TODO est un robot assistant pour utiliser ERPLibre +Exécutez-le avec `./script/todo/todo.py` ou `make todo`. + +Pour un nouveau projet, copiez todo_example.json vers private/todo/todo_override.json | private/todo/todo_override_private.json et modifiez-le. diff --git a/script/todo/README.fr.md b/script/todo/README.fr.md new file mode 100644 index 0000000..a26aba8 --- /dev/null +++ b/script/todo/README.fr.md @@ -0,0 +1,5 @@ + +TODO est un robot assistant pour utiliser ERPLibre +Exécutez-le avec `./script/todo/todo.py` ou `make todo`. + +Pour un nouveau projet, copiez todo_example.json vers private/todo/todo_override.json | private/todo/todo_override_private.json et modifiez-le. \ No newline at end of file diff --git a/script/todo/README.md b/script/todo/README.md index 168bde7..5159e67 100644 --- a/script/todo/README.md +++ b/script/todo/README.md @@ -1,3 +1,4 @@ + TODO is an assistant robot to use ERPLibre Execute it with `./script/todo/todo.py` or `make todo`.