[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`.
This commit is contained in:
Mathieu Benoit 2026-02-15 06:07:25 +00:00
parent e15622bd2c
commit a2d3aa2a78
90 changed files with 9010 additions and 342 deletions

View file

@ -0,0 +1,55 @@
<!---------------------------->
<!-- multilingual suffix: en, fr -->
<!-- no suffix: en -->
<!---------------------------->
<!-- [common] -->
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
<!-- [en] -->
**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**
<!-- [fr] -->
**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**
<!-- [common] -->
- show `make version`
<!-- [en] -->
**Additional context**
Add any other context about the problem here.
<!-- [fr] -->
**Contexte supplémentaire**
Ajoutez tout autre contexte concernant le problème ici.

28
.github/ISSUE_TEMPLATE/bug_report.fr.md vendored Normal file
View file

@ -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.

View file

@ -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**

View file

@ -0,0 +1,40 @@
<!---------------------------->
<!-- multilingual suffix: en, fr -->
<!-- no suffix: en -->
<!---------------------------->
<!-- [common] -->
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
<!-- [en] -->
**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.
<!-- [fr] -->
**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.

View file

@ -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.

View file

@ -1,3 +1,4 @@
---
name: Feature request
about: Suggest an idea for this project

1143
CHANGELOG.base.md Normal file

File diff suppressed because it is too large Load diff

518
CHANGELOG.fr.md Normal file
View file

@ -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

View file

@ -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

426
README.base.md Normal file
View file

@ -0,0 +1,426 @@
<!---------------------------->
<!-- multilingual suffix: en, fr -->
<!-- no suffix: en -->
<!---------------------------->
<!-- [common] -->
# ERPLibre
<!-- [en] -->
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.
<!-- [fr] -->
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.
<!-- [en] -->
Follow us on Mastodon : https://fosstodon.org/@erplibre
<!-- [fr] -->
Suivez-nous sur Mastodon : https://fosstodon.org/@erplibre
<!-- [en] -->
# 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
<!-- [fr] -->
# 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
<!-- [en] -->
# Supported Odoo versions
<!-- [fr] -->
# Versions Odoo supportees
<!-- [common] -->
| 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 |
<!-- [en] -->
Switch between versions with `make switch_odoo_18`, `make switch_odoo_16`, etc.
<!-- [fr] -->
Changez de version avec `make switch_odoo_18`, `make switch_odoo_16`, etc.
<!-- [en] -->
# 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
<!-- [fr] -->
# 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
<!-- [en] -->
# 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.
<!-- [fr] -->
# 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.
<!-- [en] -->
1. Make sure Docker and nginx web server are installed:<BR>
```sudo apt install docker.io docker-compose-v2 nginx```
1. Get the latest ERPLibre Docker compose file:<BR>
```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):<BR>
```sudo docker compose up -d```
1. Open the final installation step at this web page :<BR>
```http://[server IP]:8069```<BR>
![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:<BR>
![odoo_application_list.png](doc/image/odoo_application_list.png)
You can now personalize your ERPLibre installation.
<!-- [fr] -->
1. Assurez-vous que Docker et le serveur web nginx sont installes :<BR>
```sudo apt install docker.io docker-compose-v2 nginx```
1. Obtenez le dernier fichier Docker compose d'ERPLibre :<BR>
```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) :<BR>
```sudo docker compose up -d```
1. Ouvrez l'etape finale d'installation a cette page web :<BR>
```http://[server IP]:8069```<BR>
![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 :<BR>
![odoo_application_list.png](doc/image/odoo_application_list.png)
Vous pouvez maintenant personnaliser votre installation ERPLibre.
<!-- [en] -->
For more information, read [Docker guide](./docker/README.md).
## Install from source code
### Automated installation
<!-- [fr] -->
Pour plus d'informations, consultez le [guide Docker](./docker/README.md).
## Installation depuis le code source
### Installation automatisee
<!-- [en] -->
For Debian/Ubuntu
<!-- [fr] -->
Pour Debian/Ubuntu
<!-- [common] -->
```bash
sudo apt install make python3
```
<!-- [en] -->
Clone the project:
<!-- [fr] -->
Clonez le projet :
<!-- [common] -->
```bash
git clone https://github.com/ERPLibre/ERPLibre.git
cd ERPLibre
```
<!-- [en] -->
Follow the instruction on the following script, it will try to detect your environment.
<!-- [fr] -->
Suivez les instructions du script suivant, il essaiera de detecter votre environnement.
<!-- [common] -->
```bash
make
```
<!-- [en] -->
### Manually
Into Ubuntu, minimal dependency:
<!-- [fr] -->
### Manuellement
Sous Ubuntu, dependance minimale :
<!-- [common] -->
```bash
sudo apt install make git curl
```
<!-- [en] -->
Into Ubuntu, developer dependency:
<!-- [fr] -->
Sous Ubuntu, dependance developpeur :
<!-- [common] -->
```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
```
<!-- [en] -->
Clone the project:
<!-- [fr] -->
Clonez le projet :
<!-- [common] -->
```bash
git clone https://github.com/ERPLibre/ERPLibre.git
cd ERPLibre
```
<!-- [en] -->
Support Ubuntu 20.04, 22.04, 24.04, 25.04 and OSX.
<!-- [fr] -->
Support Ubuntu 20.04, 22.04, 24.04, 25.04 et OSX.
<!-- [common] -->
```bash
make install_os
make install_odoo_18
```
<!-- [en] -->
Install a specific Odoo version:
<!-- [fr] -->
Installez une version specifique d'Odoo :
<!-- [common] -->
```bash
make install_odoo_16
make install_odoo_17
make install_odoo_18
```
<!-- [en] -->
Update your configuration if you need to run from another interface than 127.0.0.1, file `config.conf`
<!-- [fr] -->
Mettez a jour votre configuration si vous devez executer depuis une autre interface que 127.0.0.1, fichier `config.conf`
<!-- [common] -->
```
xmlrpc_interface = 0.0.0.0
```
<!-- [en] -->
Show version :
<!-- [fr] -->
Afficher la version :
<!-- [common] -->
```bash
make version
```
<!-- [en] -->
Ready to execute:
<!-- [fr] -->
Pret a executer :
<!-- [common] -->
```bash
make run
```
<!-- [en] -->
# Test
Execute ERPLibre test with his code generator.
<!-- [fr] -->
# Test
Executez les tests ERPLibre avec son generateur de code.
<!-- [common] -->
```bash
time make test_full_fast
```
<!-- [en] -->
# 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 |
<!-- [fr] -->
# 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 |
<!-- [en] -->
# Contributing
See [CONTRIBUTION.md](doc/CONTRIBUTION.md) for guidelines.
<!-- [fr] -->
# Contribution
Consultez [CONTRIBUTION.md](doc/CONTRIBUTION.md) pour les directives.
<!-- [en] -->
# License
This project is licensed under the [GNU Affero General Public License v3.0](LICENSE).
<!-- [fr] -->
# Licence
Ce projet est sous licence [GNU Affero General Public License v3.0](LICENSE).

187
README.fr.md Normal file
View file

@ -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).

156
README.md
View file

@ -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:<BR>
```sudo apt install docker docker-compose nginx```
1. Get the latest ERPLibre Docker compose file:<BR>
@ -35,47 +79,94 @@ Internet.
You can now personalize your ERPLibre installation.
<!-- [fr] -->
1. Assurez-vous que Docker et le serveur web nginx sont installes :<BR>
```sudo apt install docker.io docker-compose-v2 nginx```
1. Obtenez le dernier fichier Docker compose d'ERPLibre :<BR>
```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) :<BR>
```sudo docker compose up -d```
1. Ouvrez l'etape finale d'installation a cette page web :<BR>
```http://[server IP]:8069```<BR>
![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 :<BR>
![odoo_application_list.png](doc/image/odoo_application_list.png)
Vous pouvez maintenant personnaliser votre installation ERPLibre.
<!-- [en] -->
For more information, read [Docker guide](./docker/README.md).
## Install from source code
### Automated installation
<!-- [fr] -->
Pour plus d'informations, consultez le [guide Docker](./docker/README.md).
## Installation depuis le code source
### Installation automatisee
<!-- [en] -->
For Debian/Ubuntu
<!-- [fr] -->
Pour Debian/Ubuntu
<!-- [common] -->
```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).

79
TODO.base.md Normal file
View file

@ -0,0 +1,79 @@
<!---------------------------->
<!-- multilingual suffix: en, fr -->
<!-- no suffix: en -->
<!---------------------------->
<!-- [en] -->
# 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.
<!-- [fr] -->
# À 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.
<!-- [common] -->
> .venv.erplibre/bin/repo forall -pc "git push ERPLibre --tags"
<!-- [en] -->
## 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
<!-- [fr] -->
## 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

36
TODO.fr.md Normal file
View file

@ -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

View file

@ -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

View file

@ -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 {} \;

View file

@ -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
```
```

View file

@ -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
```
```

58
doc/CONTRIBUTION.base.md Normal file
View file

@ -0,0 +1,58 @@
<!---------------------------->
<!-- multilingual suffix: en, fr -->
<!-- no suffix: en -->
<!---------------------------->
<!-- [en] -->
# 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.
<!-- [fr] -->
# 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.

26
doc/CONTRIBUTION.fr.md Normal file
View file

@ -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.

View file

@ -1,3 +1,4 @@
# Thanks
## AGILE OPS

544
doc/DEVELOPMENT.base.md Normal file
View file

@ -0,0 +1,544 @@
<!---------------------------->
<!-- multilingual suffix: en, fr -->
<!-- no suffix: en -->
<!---------------------------->
<!-- [en] -->
# Development guide
Setup your environment to develop modules and debug the platform.
## Local installation procedure
### 1. Clone the project:
<!-- [fr] -->
# Guide de developpement
Configurez votre environnement pour developper des modules et deboguer la plateforme.
## Procedure d'installation locale
### 1. Cloner le projet :
<!-- [common] -->
```bash
git clone https://github.com/ERPLibre/ERPLibre.git
```
<!-- [en] -->
### 2. Execute the script:
<!-- [fr] -->
### 2. Executer le script :
<!-- [common] -->
```bash
cd ERPLibre
./script/install/install_dev.sh
./script/install/install_locally_dev.sh
```
<!-- [en] -->
### 3. Run ERPLibre
<!-- [fr] -->
### 3. Lancer ERPLibre
<!-- [common] -->
```bash
./run.sh
```
<!-- [en] -->
## 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.
<!-- [fr] -->
## 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.
<!-- [common] -->
```bash
./script/git/fork_project.py --github_token GITHUB_KEY --organization NAME
```
<!-- [en] -->
# 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.
<!-- [fr] -->
# 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.
<!-- [common] -->
```bash
./script/git/fork_project_ERPLibre.py --github_token GITHUB_KEY --organization NAME
```
<!-- [en] -->
## Generate manifest from csv repo
Add repo in file [./source_repo_addons.csv](./source_repo_addons.csv)
Execute to generate Repo manifest
<!-- [fr] -->
## 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
<!-- [common] -->
```bash
./script/git/fork_project_ERPLibre.py --skip_fork
```
<!-- [en] -->
## 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:
<!-- [fr] -->
## 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 :
<!-- [common] -->
```bash
./script/database/migrate_prod_to_test.sh DATABASE
```
<!-- [en] -->
## Change git url https to Git
This will update all urls in Git format:
<!-- [fr] -->
## Changer les urls git de https vers Git
Cela va mettre a jour toutes les urls au format Git :
<!-- [common] -->
```bash
./script/git/git_change_remote_https_to_git.py
```
<!-- [en] -->
## Showing repo differences between projects
Tools to display the differences between the repo and another project.
<!-- [fr] -->
## Afficher les differences de depots entre les projets
Outils pour afficher les differences entre le depot et un autre projet.
<!-- [common] -->
```bash
./script/git/git_change_remote.py --sync_to /path/to/project/erplibre --dry_sync
```
<!-- [en] -->
## Showing repo differences with manifest develop
To understand the divergences with the dev manifest.
<!-- [fr] -->
## Afficher les differences de depots avec le manifeste de developpement
Pour comprendre les divergences avec le manifeste de dev.
<!-- [common] -->
```bash
./script/git/git_show_code_diff_repo_manifest.py -m ./manifest/default.dev.xml
```
<!-- [en] -->
## 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.
<!-- [fr] -->
## 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.
<!-- [common] -->
```bash
./script/git/git_change_remote.py --sync_to /path/to/project/erplibre
```
<!-- [en] -->
## Compare two files manifests
To show differences between commits in different manifests
<!-- [fr] -->
## Comparer deux fichiers manifestes
Pour afficher les differences entre les commits dans differents manifestes
<!-- [common] -->
```bash
./script/git/git_diff_repo_manifest.py --input1 ./manifest/MANIFEST1.xml --input2 ./manifest/MANIFEST2.xml
```
<!-- [en] -->
## Differences between code and manifest
To show differences between actual code and manifest
<!-- [fr] -->
## Differences entre le code et le manifeste
Pour afficher les differences entre le code actuel et le manifeste
<!-- [common] -->
```bash
./script/git/git_show_code_diff_repo_manifest.py --manifest ./manifest/MANIFEST1.xml
```
<!-- [en] -->
## 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:
<!-- [fr] -->
## 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 :
<!-- [common] -->
```bash
./script/git/fork_project_ERPLibre.py
```
<!-- [en] -->
To regenerate only manifest.xml.
<!-- [fr] -->
Pour regenerer uniquement le manifest.xml.
<!-- [common] -->
```bash
./script/git/fork_project_ERPLibre.py --skip_fork
```
<!-- [en] -->
Check if manifest contains "auto_install" and change the value to False.
<!-- [fr] -->
Verifier si le manifeste contient "auto_install" et changer la valeur a False.
<!-- [common] -->
```bash
./script/git/repo_remove_auto_install.py
```
<!-- [en] -->
## Filter repo by group
Only keep repo tagged by group 'base' and 'code_generator'
<!-- [fr] -->
## Filtrer les depots par groupe
Garder uniquement les depots etiquetes par le groupe 'base' et 'code_generator'
<!-- [common] -->
```bash
./script/manifest/update_manifest_local_dev_code_generator.sh
```
<!-- [en] -->
# Execution
## Config file
You can limit your addons in ERPlibre config file depending on a group of your actual manifest.
<!-- [fr] -->
# Execution
## Fichier de configuration
Vous pouvez limiter vos addons dans le fichier de configuration ERPLibre en fonction d'un groupe de votre manifeste actuel.
<!-- [common] -->
```bash
./script/git/git_repo_update_group.py --group base,code_generator
./script/generate_config.sh
```
<!-- [en] -->
Or go back to normal
<!-- [fr] -->
Ou revenir a la normale
<!-- [common] -->
```bash
./script/git/git_repo_update_group.py
./script/generate_config.sh
```
<!-- [en] -->
# 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:
<!-- [fr] -->
# 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 :
<!-- [common] -->
```bash
sudo -iu postgres
psql
```
<!-- [en] -->
And run:
<!-- [fr] -->
Et executez :
<!-- [common] -->
```postgres-sql
DROP DATABASE database_name;
```
<!-- [en] -->
Exit and delete filestore:
<!-- [fr] -->
Quittez et supprimez le filestore :
<!-- [common] -->
```bash
rm -r ~/.local/share/Odoo/filestore/database_name
```
<!-- [en] -->
# Coding
## Create module scaffold
<!-- [fr] -->
# Developpement
## Creer un squelette de module
<!-- [common] -->
```bash
source ./.venv.erplibre/bin/activate
python odoo/odoo-bin scaffold MODULE_NAME addons/REPO_NAME/
```
<!-- [en] -->
## 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 :
<!-- [fr] -->
## 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 :
<!-- [common] -->
```bash
rm -r .venv
make install_dev
./.venv.$(cat ".erplibre-version" | xargs)/bin/poetry lock --no-update
```
<!-- [en] -->
# Pull request
## Show all pull requests from organization
<!-- [fr] -->
# Demande de tirage (Pull request)
## Afficher toutes les demandes de tirage d'une organisation
<!-- [common] -->
```bash
/script/git/pull_request_ERPLibre.py --github_token ### --organization ERPLibre
```
<!-- [en] -->
# Commit
Use this commit format:
<!-- [fr] -->
# Commit
Utilisez ce format de commit :
<!-- [common] -->
```bash
git commit -am "[#ticket] subject: short sentence"
```
<!-- [en] -->
# Format code
## Python
Use [black](https://github.com/psf/black)
<!-- [fr] -->
# Formatage du code
## Python
Utilisez [black](https://github.com/psf/black)
<!-- [common] -->
```bash
./script/maintenance/black.sh ./addons/TechnoLibre_odoo-code-generator
```
<!-- [en] -->
Or if you prefer [oca-autopep8](https://github.com/psf/black)
<!-- [fr] -->
Ou si vous preferez [oca-autopep8](https://github.com/psf/black)
<!-- [common] -->
```bash
./script/maintenance/autopep8.sh ./addons/TechnoLibre_odoo-code-generator
```
<!-- [en] -->
## HTML and css
Use [prettier](https://github.com/prettier/prettier)
<!-- [fr] -->
## HTML et css
Utilisez [prettier](https://github.com/prettier/prettier)
<!-- [common] -->
```bash
./script/maintenance/prettier.sh ./addons/TechnoLibre_odoo-code-generator
```
<!-- [en] -->
## Javascript
Use [prettier](https://github.com/prettier/prettier)
<!-- [fr] -->
## Javascript
Utilisez [prettier](https://github.com/prettier/prettier)
<!-- [common] -->
```bash
./script/maintenance/prettier.sh --tab-width 4 ./addons/TechnoLibre_odoo-code-generator
```
<!-- [en] -->
# 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
<!-- [fr] -->
# 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

288
doc/DEVELOPMENT.fr.md Normal file
View file

@ -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

View file

@ -1,3 +1,4 @@
# Development guide
Setup your environment to develop modules and debug the platform.

80
doc/DISCOVER.base.md Normal file
View file

@ -0,0 +1,80 @@
<!---------------------------->
<!-- multilingual suffix: en, fr -->
<!-- no suffix: en -->
<!---------------------------->
<!-- [en] -->
# Discover
Explore the ERPLibre solution.
## Fast installation
### 1. Clone the project:
<!-- [fr] -->
# Découverte
Explorez la solution ERPLibre.
## Installation rapide
### 1. Clonez le projet :
<!-- [common] -->
```bash
git clone https://github.com/ERPLibre/ERPLibre.git
```
<!-- [en] -->
### 2. Run installation locally:
<!-- [fr] -->
### 2. Exécutez l'installation localement :
<!-- [common] -->
```bash
cd ERPLibre
./script/install/install_dev.sh
./script/install/install_locally_dev.sh
```
<!-- [en] -->
### 3. Run ERPLibre
<!-- [fr] -->
### 3. Exécutez ERPLibre
<!-- [common] -->
```bash
./run.sh
```
<!-- [en] -->
## Add repo
To access a new repo, add your URL to file [source_repo_addons.csv](../source_repo_addons.csv)
Execute script:
<!-- [fr] -->
## 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 :
<!-- [common] -->
```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
```
<!-- [en] -->
[Update your repo.](./GIT_REPO.md)
<!-- [fr] -->
[Mettez à jour votre dépôt.](./GIT_REPO.md)

42
doc/DISCOVER.fr.md Normal file
View file

@ -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)

View file

@ -1,3 +1,4 @@
# Discover
Explore the ERPLibre solution.

434
doc/FAQ.base.md Normal file
View file

@ -0,0 +1,434 @@
<!---------------------------->
<!-- multilingual suffix: en, fr -->
<!-- no suffix: en -->
<!---------------------------->
<!-- [en] -->
# 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 :
<!-- [fr] -->
# 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 :
<!-- [common] -->
```
key : report.url
value : http://127.0.0.1:8069
```
<!-- [en] -->
## Scripting
### Search all duplicate file recursively in given directory
<!-- [fr] -->
## Scripts
### Rechercher tous les fichiers dupliqués récursivement dans un répertoire donné
<!-- [common] -->
```bash
find . -type f -printf '%p/ %f\n' | sort -k2 | uniq -f1 --all-repeated=separate
```
<!-- [en] -->
### Search all duplicate directory recursively in given directory
<!-- [fr] -->
### Rechercher tous les répertoires dupliqués récursivement dans un répertoire donné
<!-- [common] -->
```bash
find . -type d -printf '%p/ %f\n' | sort -k2 | uniq -f1 --all-repeated=separate
```
<!-- [en] -->
## Networking
Show all open port
<!-- [fr] -->
## Réseau
Afficher tous les ports ouverts
<!-- [common] -->
```bash
sudo lsof -i -P -n | grep LISTEN
```
<!-- [en] -->
or
<!-- [fr] -->
ou
<!-- [common] -->
```bash
sudo netstat -lpnt | grep LISTEN
```
<!-- [en] -->
or
<!-- [fr] -->
ou
<!-- [common] -->
```bash
sudo ss -lpnt | grep LISTEN
```
<!-- [en] -->
## Git
### Configuration
Prefer to use Vim when editing?
<!-- [fr] -->
## Git
### Configuration
Préférez-vous utiliser Vim pour l'édition ?
<!-- [common] -->
```bash
git config --global core.editor "vim"
```
<!-- [en] -->
Prefer to use Meld when resolving conflit?
<!-- [fr] -->
Préférez-vous utiliser Meld pour résoudre les conflits ?
<!-- [common] -->
```bash
git config --global merge.tool meld
```
<!-- [en] -->
Prefer to us Meld to show difference?
<!-- [fr] -->
Préférez-vous utiliser Meld pour afficher les différences ?
<!-- [common] -->
```bash
git config --global diff.tool meld
git config --global difftool.prompt false
```
<!-- [en] -->
### Retroactively applying format code to existing branches
Adapt this command to your situation, this is an example:
<!-- [fr] -->
### Appliquer rétroactivement le formatage du code sur des branches existantes
Adaptez cette commande à votre situation, ceci est un exemple :
<!-- [common] -->
```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
```
<!-- [en] -->
### Unshallow git
By example, the repo Odoo use a depth clone. If you need all the clone repo, use this command on right directory:
<!-- [fr] -->
### 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 :
<!-- [common] -->
```bash
git fetch REMOTE --unshallow
```
<!-- [en] -->
### Amend several commits in Git to change author
<!-- [fr] -->
### Modifier plusieurs commits dans Git pour changer l'auteur
<!-- [common] -->
```bash
git rebase -i HEAD~4 -x "git commit --amend --author 'Author Name <author.name@mail.com>' --no-edit"
```
<!-- [en] -->
### Cherry-pick a merged commit with conflict
<!-- [fr] -->
### Cherry-pick d'un commit fusionné avec conflit
<!-- [common] -->
```bash
git cherry-pick -m 1 --strategy-option theirs HASH
```
<!-- [en] -->
## 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`
<!-- [fr] -->
## 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`
<!-- [common] -->
```bash
pkill -f git-daemon
```
<!-- [en] -->
## git-repo
### error.GitError fatal bad revision
Example:
<!-- [fr] -->
## git-repo
### error.GitError fatal bad revision
Exemple :
<!-- [common] -->
```
error.GitError: manifests rev-list (u'^2736dfd46e8a30cf59a9cd6e93d9e56e87021f2a', 'HEAD', '--'): fatal: bad revision 'HEAD'
```
<!-- [en] -->
Did you modify files in .repo?
To reset files from your branch into .repo:
<!-- [fr] -->
Avez-vous modifié des fichiers dans .repo ?
Pour réinitialiser les fichiers de votre branche dans .repo :
<!-- [common] -->
```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
```
<!-- [en] -->
### fatal: GitCommandError: git command failure
Example of error after an installation with git-repo:
<!-- [fr] -->
### fatal: GitCommandError: git command failure
Exemple d'erreur après une installation avec git-repo :
<!-- [common] -->
```
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'
```
<!-- [en] -->
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
<!-- [fr] -->
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é
<!-- [common] -->
```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)"
```
<!-- [en] -->
### Run error `current limit exceeds maximum limit`
When you got
<!-- [fr] -->
### Erreur d'exécution `current limit exceeds maximum limit`
Lorsque vous obtenez
<!-- [common] -->
```
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
```
<!-- [en] -->
Add line at the end of config.conf
<!-- [fr] -->
Ajoutez la ligne à la fin de config.conf
<!-- [common] -->
```
limit_memory_hard = 0
```
<!-- [en] -->
## 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 :
<!-- [fr] -->
## 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 :
<!-- [common] -->
```bash
docker network create localnetwork --subnet 10.0.1.0/24
```
<!-- [en] -->
Create a new file `docker-compose.override.yml` at the root of ERPLibre, at same level of your docker-compose.yml and
fill with:
<!-- [fr] -->
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 :
<!-- [common] -->
```yaml
version: '3'
networks:
default:
external:
name: localnetwork
```
<!-- [en] -->
## 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:
<!-- [fr] -->
## 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 :
<!-- [common] -->
```bash
cat /proc/sys/fs/inotify/max_user_watches
```
<!-- [en] -->
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
<!-- [fr] -->
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
<!-- [common] -->
```bash
pkill -f "firefox.*--marionette"
```

244
doc/FAQ.fr.md Normal file
View file

@ -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 <author.name@mail.com>' --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"
```

View file

@ -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"
```
```

231
doc/GIT_REPO.base.md Normal file
View file

@ -0,0 +1,231 @@
<!---------------------------->
<!-- multilingual suffix: en, fr -->
<!-- no suffix: en -->
<!---------------------------->
<!-- [en] -->
# 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
<!-- [fr] -->
# 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
<!-- [common] -->
```bash
curl https://storage.googleapis.com/git-repo-downloads/repo > .venv.erplibre/bin/repo
```
<!-- [en] -->
## prod
<!-- [fr] -->
## prod
<!-- [common] -->
```bash
.venv.erplibre/bin/repo init -u https://github.com/ERPLibre/ERPLibre -b master
.venv.erplibre/bin/repo sync -c -j $(nproc --all)
```
<!-- [en] -->
## dev
<!-- [fr] -->
## dev
<!-- [common] -->
```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)
```
<!-- [en] -->
## local dev
[Guide to setup locally git](https://railsware.com/blog/taming-the-git-daemon-to-quickly-share-git-repository/).
<!-- [fr] -->
## dev local
[Guide pour configurer git localement](https://railsware.com/blog/taming-the-git-daemon-to-quickly-share-git-repository/).
<!-- [common] -->
```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
```
<!-- [en] -->
# 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.
<!-- [fr] -->
# 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.
<!-- [common] -->
```bash
.venv.erplibre/bin/repo manifest -r -o ./default.xml
```
<!-- [en] -->
Commit.
<!-- [fr] -->
Committez.
<!-- [common] -->
```bash
git commit -am "[#ticket] subject: short sentence"
```
<!-- [en] -->
### 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:
<!-- [fr] -->
### 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 :
<!-- [common] -->
```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
```
<!-- [en] -->
## Create a dev version
<!-- [fr] -->
## Créer une version dev
<!-- [common] -->
```bash
.venv.erplibre/bin/repo manifest -o ./manifest/default.dev.xml
```
<!-- [en] -->
Commit.
<!-- [fr] -->
Committez.
<!-- [common] -->
```bash
git commit -am "[#ticket] subject: short sentence"
```
<!-- [en] -->
## Useful commands
### Search all repos with a specific branch name
<!-- [fr] -->
## Commandes utiles
### Rechercher tous les dépôts avec un nom de branche spécifique
<!-- [common] -->
```bash
.venv.erplibre/bin/repo forall -pc "git branch -a|grep BRANCH"
```
<!-- [en] -->
### Search missing branch in all repos
<!-- [fr] -->
### Rechercher les branches manquantes dans tous les dépôts
<!-- [common] -->
```bash
.venv.erplibre/bin/repo forall -pc 'git branch -a|(grep /BRANCH$||echo "no match")|grep "no match"'
```
<!-- [en] -->
### Search changed file in all repos
<!-- [fr] -->
### Rechercher les fichiers modifiés dans tous les dépôts
<!-- [common] -->
```bash
.venv.erplibre/bin/repo forall -pc "git status -s"
```
<!-- [en] -->
### Clean all
Before cleaning, check changed file in all repos.
<!-- [fr] -->
### Tout nettoyer
Avant de nettoyer, vérifiez les fichiers modifiés dans tous les dépôts.
<!-- [common] -->
```bash
.venv.erplibre/bin/repo forall -pc "git status -s"
```
<!-- [en] -->
Check the changed branch, and push changed if needed.
<!-- [fr] -->
Vérifiez les branches modifiées, et poussez les changements si nécessaire.
<!-- [common] -->
```bash
./script/git/git_show_code_diff_repo_manifest.py -m ./manifest/default.dev.xml
```
<!-- [en] -->
Maybe, some version diverge from your manifest. Simply clean all and relaunch your installation.
<!-- [fr] -->
Peut-être que certaines versions divergent de votre manifest. Nettoyez simplement tout et relancez votre installation.
<!-- [common] -->
```bash
./script/git/clean_repo_manifest.sh
```

127
doc/GIT_REPO.fr.md Normal file
View file

@ -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
```

View file

@ -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
```
```

18
doc/HOWTO.base.md Normal file
View file

@ -0,0 +1,18 @@
<!---------------------------->
<!-- multilingual suffix: en, fr -->
<!-- no suffix: en -->
<!---------------------------->
<!-- [en] -->
# HOW TO
## Update changelog
Please read the following documentation [keepachangelog.com](https://keepachangelog.com)
<!-- [fr] -->
# COMMENT FAIRE
## Mettre à jour le changelog
Veuillez lire la documentation suivante [keepachangelog.com](https://keepachangelog.com)

6
doc/HOWTO.fr.md Normal file
View file

@ -0,0 +1,6 @@
# COMMENT FAIRE
## Mettre à jour le changelog
Veuillez lire la documentation suivante [keepachangelog.com](https://keepachangelog.com)

View file

@ -1,3 +1,4 @@
# HOW TO
## Update changelog

129
doc/MIGRATION.base.md Normal file
View file

@ -0,0 +1,129 @@
<!---------------------------->
<!-- multilingual suffix: en, fr -->
<!-- no suffix: en -->
<!---------------------------->
<!-- [en] -->
# 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 :
<!-- [fr] -->
# 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 :
<!-- [common] -->
```bash
make docker_show_databases
```
<!-- [en] -->
## 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.
<!-- [fr] -->
## 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.
<!-- [common] -->
```bash
./script/addons/update_addons_all.sh BD
```
<!-- [en] -->
Execute migration with OpenUpgrade.
<!-- [fr] -->
Exécutez la migration avec OpenUpgrade.
<!-- [common] -->
```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
```
<!-- [en] -->
## Migration Odoo 13 to Odoo 14
Replace BD to your database name.
<!-- [fr] -->
## Migration Odoo 13 vers Odoo 14
Remplacez BD par le nom de votre base de données.
<!-- [common] -->
```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
```

65
doc/MIGRATION.fr.md Normal file
View file

@ -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
```

View file

@ -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
```
```

167
doc/POETRY.base.md Normal file
View file

@ -0,0 +1,167 @@
<!---------------------------->
<!-- multilingual suffix: en, fr -->
<!-- no suffix: en -->
<!---------------------------->
<!-- [en] -->
# Poetry
## Add dependencies automatically
Add your dependencies in file [requirements.txt](../requirements.txt) and run script
<!-- [fr] -->
# Poetry
## Ajouter des dépendances automatiquement
Ajoutez vos dépendances dans le fichier [requirements.txt](../requirements.txt) et exécutez le script
<!-- [common] -->
```bash
./script/poetry/poetry_update.py
```
<!-- [en] -->
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.
<!-- [fr] -->
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.
<!-- [common] -->
```bash
poetry add PYTHON_MODULE
```
<!-- [en] -->
## 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
<!-- [fr] -->
## 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
<!-- [common] -->
```bash
rm -r cache
```
<!-- [en] -->
## Configure a proxy with poetry
The proxy will create a cache of all downloads.
https://github.com/EpicWink/proxpi
Install and run the server
<!-- [fr] -->
## 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
<!-- [common] -->
```bash
pip3 install 'git+https://github.com/EpicWink/proxpi.git'
PROXPI_BINARY_FILE_MIME_TYPE=1 FLASK_APP=proxpi.server flask run
```
<!-- [en] -->
Or by docker-compose, add the environment
<!-- [fr] -->
Ou par docker-compose, ajoutez l'environnement
<!-- [common] -->
```
services:
proxpi:
restart: unless-stopped
ports:
- '5000:5000'
image: epicwink/proxpi:latest
environment:
- PROXPI_BINARY_FILE_MIME_TYPE=1
```
<!-- [en] -->
Add this configuration into the pyproject.toml
<!-- [fr] -->
Ajoutez cette configuration dans le pyproject.toml
<!-- [common] -->
```toml
[[tool.poetry.source]]
name = "proxpi"
url = "http://localhost:5000/index/"
default = true
secondary = false
```
<!-- [en] -->
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 :
<!-- [fr] -->
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 :
<!-- [common] -->
```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
```

91
doc/POETRY.fr.md Normal file
View file

@ -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
```

View file

@ -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
```
```

442
doc/PRODUCTION.base.md Normal file
View file

@ -0,0 +1,442 @@
<!---------------------------->
<!-- multilingual suffix: en, fr -->
<!-- no suffix: en -->
<!---------------------------->
<!-- [en] -->
# ERPLibre production guide
## Requirement
- 5Go of disk space
## Production installation procedure
### 1. Clone the project:
<!-- [fr] -->
# Guide de production ERPLibre
## Prérequis
- 5 Go d'espace disque
## Procédure d'installation en production
### 1. Cloner le projet :
<!-- [common] -->
```bash
git clone https://github.com/ERPLibre/ERPLibre.git
cd ERPLibre
```
<!-- [en] -->
### 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
<!-- [fr] -->
### 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
<!-- [common] -->
```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
```
<!-- [en] -->
#### Ubuntu 18.04 server
<!-- [fr] -->
#### Serveur Ubuntu 18.04
<!-- [common] -->
```bash
./script/install/install_dev.sh
./script/install/install_production.sh
```
<!-- [en] -->
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
<!-- [fr] -->
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
<!-- [common] -->
```bash
./script/install/install_dev.sh
./script/install/install_production.sh
```
<!-- [en] -->
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
<!-- [fr] -->
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
<!-- [common] -->
```bash
sudo certbot --nginx
```
<!-- [en] -->
## Watch log
<!-- [fr] -->
## Consulter les journaux
<!-- [common] -->
```bash
sudo systemctl -feu [EL_USER]
```
<!-- [en] -->
## Run by address ip
Comment the following line in `/[EL_USER]/erplibre/config.conf`
<!-- [fr] -->
## Executer par adresse IP
Commentez la ligne suivante dans `/[EL_USER]/erplibre/config.conf`
<!-- [common] -->
```
xmlrpc_interface = 0.0.0.0
proxy_mode = True
```
<!-- [en] -->
Add your address ip server_name in nginx config `/etc/nginx/sites-available/[EL_WEBSITE_NAME]`
Restart daemon:
<!-- [fr] -->
Ajoutez votre adresse IP comme server_name dans la configuration nginx `/etc/nginx/sites-available/[EL_WEBSITE_NAME]`
Redemarrer le daemon :
<!-- [common] -->
```bash
sudo systemctl restart nginx
sudo systemctl restart [EL_USER]
```
<!-- [en] -->
## Production execution
<!-- [fr] -->
## Execution en production
<!-- [common] -->
```bash
cd /[EL_USER]/erplibre
./run.sh -d [DATABASE] --no-database-list
```
<!-- [en] -->
## 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
<!-- [fr] -->
## 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
<!-- [common] -->
```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
```
<!-- [en] -->
## Update production
Update all features.
<!-- [fr] -->
## Mise a jour de la production
Mettre a jour toutes les fonctionnalites.
<!-- [common] -->
```bash
./run.sh --limit-time-real 99999 --no-http --stop-after-init -u all -d DATABASE
```
<!-- [en] -->
# 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.
<!-- [fr] -->
# 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.
<!-- [common] -->
```bash
./script/database/delete_production.sh
```
<!-- [en] -->
# 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)
<!-- [fr] -->
# 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)
<!-- [common] -->
```bash
pip3 install cloudflare==2.20.0
```
<!-- [en] -->
Then you need to create the cfg files with credentials for your cloudflare account.
<!-- [fr] -->
Ensuite, vous devez creer les fichiers cfg avec les identifiants de votre compte cloudflare.
<!-- [common] -->
```bash
mkdir ~/.cloudflare
```
<!-- [en] -->
Edit ~/.cloudflare/cloudflare.cfg
<!-- [fr] -->
Editez ~/.cloudflare/cloudflare.cfg
<!-- [common] -->
```
[PROFILE_NAME]
email=EMAIL
token=TOKEN (Use the global API key so that it works)
```
<!-- [en] -->
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.
<!-- [fr] -->
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.
<!-- [common] -->
```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
```
<!-- [en] -->
Check log with
<!-- [fr] -->
Verifier les journaux avec
<!-- [common] -->
```bash
sudo journalctl -feu cron
```
<!-- [en] -->
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
<!-- [fr] -->
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
<!-- [common] -->
```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
```
<!-- [en] -->
You can then read all logs with this command (Need to have ts installed: sudo apt install moreutils)
<!-- [fr] -->
Vous pouvez ensuite lire tous les journaux avec cette commande (Necessite l'installation de ts : sudo apt install moreutils)
<!-- [common] -->
```bash
tail -f /home/USER/logs/update_dns_ZONE_NAME.log | ts
```
<!-- [en] -->
# Docker
## Update
When update a docker, you need to update the list of module.
Run script to update configuration :
<!-- [fr] -->
# 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 :
<!-- [common] -->
```bash
./script/docker/docker_gen_config.sh
```
<!-- [en] -->
Edit the docker-compose.yml and update the command line (change DATABASE) to :
<!-- [fr] -->
Editez le docker-compose.yml et mettez a jour la ligne de commande (changez DATABASE) pour :
<!-- [common] -->
```yaml
command: odoo --workers 2 -u erplibre_info -d DATABASE
```
<!-- [en] -->
Note, the goal is to call `env['ir.module.module'].update_list()`.
Restart the docker :
<!-- [fr] -->
Note, l'objectif est d'appeler `env['ir.module.module'].update_list()`.
Redemarrez le docker :
<!-- [common] -->
```bash
docker compose down
docker compose up -d
```
<!-- [en] -->
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
<!-- [fr] -->
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
<!-- [common] -->
```bash
docker compose logs -f
```
<!-- [en] -->
## 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 :
<!-- [fr] -->
## 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 :
<!-- [common] -->
```yaml
command: odoo --workers 2 -u all -d DATABASE
```
<!-- [en] -->
Watch log to see error, if you got error, you need to do some code to migrate your data, depend the case.
<!-- [fr] -->
Surveillez les journaux pour voir les erreurs, si vous obtenez une erreur, vous devez ecrire du code pour migrer vos donnees, selon le cas.
<!-- [common] -->
```bash
make docker_show_logs_live
```

243
doc/PRODUCTION.fr.md Normal file
View file

@ -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
```

View file

@ -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
```
```

391
doc/RELEASE.base.md Normal file
View file

@ -0,0 +1,391 @@
<!---------------------------->
<!-- multilingual suffix: en, fr -->
<!-- no suffix: en -->
<!---------------------------->
<!-- [en] -->
# Release
A guide on how to generate a release.
<!-- [fr] -->
# Publication
Un guide sur la generation d'une publication.
<!-- [en] -->
## Clean environment before generating new release
Before the cleaning, check if existing file isn't committed, not pushed or in stash.
<!-- [fr] -->
## 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.
<!-- [common] -->
```bash
.venv.erplibre/bin/repo forall -pc "git stash list"
./script/git/git_show_code_diff_repo_manifest.py
```
<!-- [en] -->
This will erase everything in addons. Useful before creating docker, manifest and do a release.
<!-- [fr] -->
Ceci effacera tout dans les addons. Utile avant de creer un docker, un manifeste et de faire une publication.
<!-- [common] -->
```bash
./script/git/clean_repo_manifest.sh
```
<!-- [en] -->
And update all from dev to merge into prod.
Test all supported Odoo version :
<!-- [fr] -->
Et mettre a jour tout depuis dev pour fusionner dans prod.
Tester toutes les versions Odoo supportees :
<!-- [common] -->
```bash
make install_odoo_all_version
```
<!-- [en] -->
## 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 :
<!-- [fr] -->
## 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 :
<!-- [common] -->
```bash
make test_full_fast
```
<!-- [en] -->
### Format code
To format all code, run:
<!-- [fr] -->
### Formater le code
Pour formater tout le code, executez :
<!-- [common] -->
```bash
make format
```
<!-- [en] -->
### Update documentations
To generate Markdown in directory `./doc`, run:
<!-- [fr] -->
### Mettre a jour les documentations
Pour generer le Markdown dans le repertoire `./doc`, executez :
<!-- [common] -->
```bash
make doc_markdown
```
<!-- [en] -->
### Test docker generate
To generate a docker, run:
<!-- [fr] -->
### Tester la generation docker
Pour generer un docker, executez :
<!-- [common] -->
```bash
make docker_build_odoo_16
```
<!-- [en] -->
### Rename old version to new version
Search old version, like :
<!-- [fr] -->
### Renommer l'ancienne version vers la nouvelle version
Rechercher l'ancienne version, comme :
<!-- [common] -->
```bash
grep --color=always --exclude-dir={.repo,.venv,.git} --exclude="*.svg" -nri v1.6.0
```
<!-- [en] -->
Replace if need it to new version.
Update file `./pyproject.toml` in [tool.poetry], line `version =`.
<!-- [fr] -->
Remplacer si necessaire par la nouvelle version.
Mettre a jour le fichier `./pyproject.toml` dans [tool.poetry], ligne `version =`.
<!-- [en] -->
### Test production Ubuntu environment
Follow instructions in [PRODUCTION.md](./PRODUCTION.md).
Test installation with code generator Geomap:
<!-- [fr] -->
### Tester l'environnement de production Ubuntu
Suivre les instructions dans [PRODUCTION.md](./PRODUCTION.md).
Tester l'installation avec le generateur de code Geomap :
<!-- [common] -->
```bash
make addons_install_code_generator_full
```
<!-- [en] -->
### Update image_db
To generate database images in directory `./image_db`, run:
<!-- [fr] -->
### Mettre a jour image_db
Pour generer les images de base de donnees dans le repertoire `./image_db`, executez :
<!-- [common] -->
```bash
make db_clean_cache
make config_gen_all
make image_db_create_all_parallel
```
<!-- [en] -->
To test it, you need to clean caches and install it:
<!-- [fr] -->
Pour le tester, vous devez nettoyer les caches et l'installer :
<!-- [common] -->
```bash
./script/database/db_restore.py --clean_cache
./script/database/db_restore.py --database test --image erplibre_website
```
<!-- [en] -->
## Generate new prod and release
Generate production manifest and freeze all repos versions.
<!-- [fr] -->
## Generer la nouvelle production et publication
Generer le manifeste de production et geler toutes les versions des depots.
<!-- [common] -->
```bash
.venv.erplibre/bin/repo manifest -r -o ./default.xml
```
<!-- [en] -->
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.
<!-- [fr] -->
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.
<!-- [common] -->
```bash
./script/poetry/poetry_update.py
```
<!-- [en] -->
When running script ./script/poetry/poetry_update.py, note manually inserted dependencies, stash all changes and add it
manually.
<!-- [fr] -->
Lors de l'execution du script ./script/poetry/poetry_update.py, noter les dependances inserees manuellement, stasher tous les changements et les ajouter
manuellement.
<!-- [common] -->
```bash
poetry add DEPENDENCY
```
<!-- [en] -->
Understand differences from last release:
<!-- [fr] -->
Comprendre les differences depuis la derniere publication :
<!-- [common] -->
```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"
```
<!-- [en] -->
Simplification tools:
<!-- [fr] -->
Outils de simplification :
<!-- [common] -->
```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
```
<!-- [en] -->
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:
<!-- [fr] -->
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 :
<!-- [common] -->
```bash
git commit -am "Release v#.#.#"
```
<!-- [en] -->
Review by your peers, test the docker file and **merge to master**.
<!-- [fr] -->
Faire reviser par vos pairs, tester le fichier docker et **fusionner dans master**.
<!-- [common] -->
```bash
git checkout master
git merge --no-ff RELEASE_BRANCH
```
<!-- [en] -->
Add comment `Release v#.#.#`.
<!-- [fr] -->
Ajouter le commentaire `Release v#.#.#`.
<!-- [en] -->
## Create tag
Add a tag on the commit in branch master with your release. When adding tag, be sure to update default.xml
<!-- [fr] -->
## 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
<!-- [common] -->
```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
```
<!-- [en] -->
## 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
<!-- [fr] -->
## 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
<!-- [en] -->
## 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.
<!-- [fr] -->
## 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.
<!-- [en] -->
# TIPS
## Compare repo differences with another ERPLibre project
To generate a list of differences between repo git commit
<!-- [fr] -->
# ASTUCES
## Comparer les differences de depots avec un autre projet ERPLibre
Pour generer une liste de differences entre les commits git des depots
<!-- [common] -->
```bash
./script/git/git_change_remote.py --sync_to /path/to/directory
```
<!-- [en] -->
## Semantic versioning
<!-- [fr] -->
## Versionnage semantique
<!-- [common] -->
```
<valid semver> ::= <version core> "-" <pre-release> "+" <build>
```

209
doc/RELEASE.fr.md Normal file
View file

@ -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
```
<valid semver> ::= <version core> "-" <pre-release> "+" <build>
```

View file

@ -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
```
<valid semver> ::= <version core> "-" <pre-release> "+" <build>
```
```

127
doc/RUN.base.md Normal file
View file

@ -0,0 +1,127 @@
<!---------------------------->
<!-- multilingual suffix: en, fr -->
<!-- no suffix: en -->
<!---------------------------->
<!-- [en] -->
# Execute ERPLibre
## Start database
<!-- [fr] -->
# Exécuter ERPLibre
## Démarrer la base de données
<!-- [common] -->
```bash
sudo systemctl start postgresql.service
```
<!-- [en] -->
## Run ERPLibre
### Method 1
Simply
<!-- [fr] -->
## Exécuter ERPLibre
### Méthode 1
Simplement
<!-- [common] -->
```bash
./run.sh
```
<!-- [en] -->
With arguments
<!-- [fr] -->
Avec des arguments
<!-- [common] -->
```bash
./run.sh -h
```
<!-- [en] -->
### Method 2
Execute your own python script:
<!-- [fr] -->
### Méthode 2
Exécutez votre propre script Python :
<!-- [common] -->
```bash
./run.sh --log-level debug
```
<!-- [en] -->
### Update all
Great idea to run it when updating Odoo, it updates each module database.
<!-- [fr] -->
### 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.
<!-- [common] -->
```bash
./run.sh -d [DATABASE] -u all --log-level debug
```
<!-- [en] -->
### Update module
<!-- [fr] -->
### Mettre à jour un module
<!-- [common] -->
```bash
./run.sh -d [DATABASE] -u [module] --log-level debug
```
<!-- [en] -->
### Test
First execution, install you requirements, choose a new database.
<!-- [fr] -->
### Test
Première exécution, installez vos dépendances, choisissez une nouvelle base de données.
<!-- [common] -->
```bash
./run.sh -d [DATABASE] -i [module to test] --test-enable --no-http --stop-after-init --log-level=test
```
<!-- [en] -->
Execute your test on a specific module.
<!-- [fr] -->
Exécutez vos tests sur un module spécifique.
<!-- [common] -->
```bash
./run.sh -d [DATABASE] -u [module to test] --test-enable --no-http --stop-after-init --log-level=test
```
<!-- [en] -->
Execute your test on a specific module with tags.
<!-- [fr] -->
Exécutez vos tests sur un module spécifique avec des tags.
<!-- [common] -->
```bash
./run.sh -d [DATABASE] -u [module to test] --test-enable --no-http --stop-after-init --log-level=test --test-tags [module_name][tags]
```

66
doc/RUN.fr.md Normal file
View file

@ -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]
```

View file

@ -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]
```
```

35
doc/TODO.base.md Normal file
View file

@ -0,0 +1,35 @@
<!---------------------------->
<!-- multilingual suffix: en, fr -->
<!-- no suffix: en -->
<!---------------------------->
<!-- [en] -->
# 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
<!-- [fr] -->
# 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
<!-- [common] -->
HEALTHCHECK CMD curl --fail http://localhost:8069/web || exit 1
<!-- [en] -->
TODO: having the DB variable configurable
<!-- [fr] -->
À FAIRE : rendre la variable DB configurable

14
doc/TODO.fr.md Normal file
View file

@ -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

View file

@ -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

61
doc/UPDATE.base.md Normal file
View file

@ -0,0 +1,61 @@
<!---------------------------->
<!-- multilingual suffix: en, fr -->
<!-- no suffix: en -->
<!---------------------------->
<!-- [en] -->
# 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.
<!-- [fr] -->
# 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.
<!-- [common] -->
```bash
./script/git/clean_repo_manifest.sh
./script/install/install_locally_dev.sh
```
<!-- [en] -->
2. Update all remote with ssh/git
<!-- [fr] -->
2. Mettre à jour tous les dépôts distants avec ssh/git
<!-- [common] -->
```bash
./script/git/git_change_remote_https_to_git.py
```
<!-- [en] -->
3. Run update script
<!-- [fr] -->
3. Exécutez le script de mise à jour
<!-- [common] -->
```bash
./script/git/git_update_repo.py
```
<!-- [en] -->
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)
<!-- [fr] -->
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)

29
doc/UPDATE.fr.md Normal file
View file

@ -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)

View file

@ -1,3 +1,4 @@
# Update ERPLibre
## Update all repos from the origin source

View file

@ -0,0 +1,609 @@
<!---------------------------->
<!-- multilingual suffix: en, fr -->
<!-- no suffix: en -->
<!---------------------------->
<!-- [en] -->
# 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:
<!-- [fr] -->
# 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 :
<!-- [common] -->
```bash
wsl --install -d Ubuntu-22.04
```
<!-- [en] -->
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.
<!-- [fr] -->
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.
<!-- [common] -->
```bash
powershell.exe
```
<!-- [en] -->
### 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:
<!-- [fr] -->
### 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 :
<!-- [common] -->
```bash
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl --set-default-version 2
```
<!-- [en] -->
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):
<!-- [fr] -->
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 :
<!-- [common] -->
```bash
https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
```
<!-- [en] -->
Only run this command as your last resort as it can break other virtual machines:
<!-- [fr] -->
N'executez cette commande qu'en dernier recours car elle peut casser d'autres machines virtuelles :
<!-- [common] -->
```bash
bcdedit /set hypervisorlaunchtype auto
```
<!-- [en] -->
### Other Installation methods for WSL2
Run Powershell with administrator rights and run the following command:
<!-- [fr] -->
### Autres methodes d'installation pour WSL2
Executez Powershell avec les droits administrateur et lancez la commande suivante :
<!-- [common] -->
```bash
curl.exe -L -o ubuntu-2004.appx https://aka.ms/wslubuntu2004
```
<!-- [en] -->
Run Powershell with administrator rights and run the following commands:
<!-- [fr] -->
Executez Powershell avec les droits administrateur et lancez les commandes suivantes :
<!-- [common] -->
```bash
Invoke-WebRequest -Uri https://aka.ms/wslubuntu2004 -OutFile Ubuntu.appx -UseBasicParsing
Add-AppxPackage .\Ubuntu.appx
```
<!-- [en] -->
Install WSL2 from the Microsoft Store with the following [link](https://apps.microsoft.com/store/detail/ubuntu-22041-lts/9PN20MSR04DW):
<!-- [fr] -->
Installez WSL2 depuis le Microsoft Store avec le [lien](https://apps.microsoft.com/store/detail/ubuntu-22041-lts/9PN20MSR04DW) suivant :
<!-- [common] -->
```bash
https://apps.microsoft.com/store/detail/ubuntu-22041-lts/9PN20MSR04DW
```
<!-- [en] -->
## 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.
<!-- [fr] -->
## 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.
<!-- [common] -->
![image](https://user-images.githubusercontent.com/59217113/230186101-579d8a5b-0825-404f-bd28-3642adce0948.png)
<!-- [en] -->
### Setup a GUI for you Ubuntu
1. Update your Ubuntu
<!-- [fr] -->
### Configurer une interface graphique pour votre Ubuntu
1. Mettre a jour votre Ubuntu
<!-- [common] -->
```bash
sudo apt-get update -y && sudo apt-get upgrade -y
```
<!-- [en] -->
2. Install the XFCE4 Desktop
<!-- [fr] -->
2. Installer le bureau XFCE4
<!-- [common] -->
```bash
sudo apt install -y xrdp xfce4 xfce4-goodies
```
<!-- [en] -->
3. Setup the Desktop
<!-- [fr] -->
3. Configurer le bureau
<!-- [common] -->
```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
```
<!-- [en] -->
4. Setup the Remote Desktop Connection
<!-- [fr] -->
4. Configurer la connexion Bureau a distance
<!-- [common] -->
```bash
sudo nano /etc/xrdp/startwm.sh
```
<!-- [en] -->
Comment these lines with a #
<!-- [fr] -->
Commentez ces lignes avec un #
<!-- [common] -->
```bash
test -x /etc/X11/Xsession && exec /etc/X11/Xsession
exec /bin/sh /etc/X11/Xsession
```
<!-- [en] -->
Add this line at the end of the file
<!-- [fr] -->
Ajoutez cette ligne a la fin du fichier
<!-- [common] -->
```bash
startxfce4
```
<!-- [en] -->
Exit with Ctrl+S, Ctrl+X
5. Starting Ubuntu Desktop GUI
Open Ubuntu Terminal on your Windows and enter this command
<!-- [fr] -->
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
<!-- [common] -->
```bash
sudo /etc/init.d/xrdp start
```
<!-- [en] -->
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:
<!-- [fr] -->
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 :
<!-- [common] -->
```bash
sudo /etc/init.d/xrdp start
[wsl2]
memory=3GB
```
<!-- [en] -->
### Installation of the necessary and up-to-date tools
<!-- [fr] -->
### Installation des outils necessaires et a jour
<!-- [common] -->
```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
```
<!-- [en] -->
## Installation of ERPLibre under WSL2
Make sure to be in the directory where you want to clone the project.
<!-- [fr] -->
## Installation d'ERPLibre sous WSL2
Assurez-vous d'etre dans le repertoire ou vous souhaitez cloner le projet.
<!-- [common] -->
```bash
git clone https://github.com/ERPLibre/ERPLibre.git
cd ERPLibre
make install
```
<!-- [en] -->
Add role to PostgresSQL, change `USERNAME` field in the command with your UNIX username from your WSL2 environment.
<!-- [fr] -->
Ajoutez un role a PostgreSQL, changez le champ `USERNAME` dans la commande avec votre nom d'utilisateur UNIX de votre environnement WSL2.
<!-- [common] -->
```bash
sudo service postgresql start
sudo su - postgres -c "createuser -s USERNAME" 2>/dev/null || true
```
<!-- [en] -->
## Common Problems During Installation
### Error During `make install`
Ensure all dependencies are installed correctly. Re-run the following command to fix any broken dependencies:
<!-- [fr] -->
## 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 :
<!-- [common] -->
```bash
sudo apt-get install -f
```
<!-- [en] -->
### PostgreSQL Not Starting
Check the PostgreSQL service status with the following command:
<!-- [fr] -->
### PostgreSQL ne demarre pas
Verifiez le statut du service PostgreSQL avec la commande suivante :
<!-- [common] -->
```bash
sudo service postgresql status
```
<!-- [en] -->
If PostgreSQL is not running, try restarting it with:
<!-- [fr] -->
Si PostgreSQL ne fonctionne pas, essayez de le redemarrer avec :
<!-- [common] -->
```bash
sudo service postgresql restart
```
<!-- [en] -->
## 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:
<!-- [fr] -->
## 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 :
<!-- [common] -->
```bash
sudo service postgresql start
```
<!-- [en] -->
After that run this command in the root of the project:
<!-- [fr] -->
Ensuite lancez cette commande a la racine du projet :
<!-- [common] -->
```bash
./run.sh
```
<!-- [en] -->
## 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):
<!-- [fr] -->
## 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 :
<!-- [common] -->
```bash
https://www.jetbrains.com/pycharm/download/#section=windows
```
<!-- [en] -->
### 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`.
<!-- [fr] -->
### 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`.
<!-- [common] -->
![Welcome to PyCharm Wizard](image/remote_development.png)
<!-- [en] -->
Press `CTRL+ALT+S`, search for `interpreter` and inside the `Python Interpreter` page, click on `Add Interpreter` and select `Add Local Interpreter...`.
<!-- [fr] -->
Appuyez sur `CTRL+ALT+S`, recherchez `interpreter` et dans la page `Python Interpreter`, cliquez sur `Add Interpreter` et selectionnez `Add Local Interpreter...`.
<!-- [common] -->
![Interpreter Settings](image/add_local_interpreter.png)
<!-- [en] -->
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`.
<!-- [fr] -->
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`.
<!-- [common] -->
![Environment Settings](image/existing_venv.png)
<!-- [en] -->
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.
<!-- [fr] -->
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.
<!-- [common] -->
```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
```
<!-- [en] -->
### Verify the installation
<!-- [fr] -->
### Verifier l'installation
<!-- [common] -->
```bash
python3.10
```
<!-- [en] -->
### Set Python 3.10.14 as default
<!-- [fr] -->
### Definir Python 3.10.14 par defaut
<!-- [common] -->
```bash
alias python='/usr/local/bin/python3.10'
source ~/.bashrc
```
<!-- [en] -->
### 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...`.
<!-- [fr] -->
### 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...`.
<!-- [common] -->
![Interpreter Settings](image/on_wsl.png)
<!-- [en] -->
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`.
<!-- [fr] -->
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`.
<!-- [common] -->
![System Interpreter](image/system_python.png)
<!-- [en] -->
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:
<!-- [fr] -->
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 :
<!-- [common] -->
```bash
wsl.exe
```
![Shell Path - Terminal](image/shell_path.png)
<!-- [en] -->
### 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:
<!-- [fr] -->
### 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 :
<!-- [common] -->
```bash
./script/ide/pycharm_configuration.py
```
<!-- [en] -->
### 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.
<!-- [fr] -->
### 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.

View file

@ -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.

View file

@ -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.

270
docker/README.base.md Normal file
View file

@ -0,0 +1,270 @@
<!---------------------------->
<!-- multilingual suffix: en, fr -->
<!-- no suffix: en -->
<!---------------------------->
<!-- [en] -->
# 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
<!-- [fr] -->
# 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
<!-- [common] -->
```bash
systemctl start docker
```
<!-- [en] -->
### Building the docker images
<!-- [fr] -->
### Construire les images docker
<!-- [common] -->
```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 .
```
<!-- [en] -->
### Running ERPLibre using Docker-Compose
Go at the root of this git project.
<!-- [fr] -->
### Exécuter ERPLibre avec Docker-Compose
Allez à la racine de ce projet git.
<!-- [common] -->
```bash
cd ERPLibre
docker compose -f docker-compose.yml up -d
```
<!-- [en] -->
### Diagnostic Docker-Compose
Show docker-compose information
<!-- [fr] -->
### Diagnostic Docker-Compose
Afficher les informations docker-compose
<!-- [common] -->
```bash
docker compose ps
docker compose logs IMAGE_NAME
```
<!-- [en] -->
Show docker information
<!-- [fr] -->
Afficher les informations docker
<!-- [common] -->
```bash
docker ps -a
docker volume ls
docker inspect DOCKER_NAME
```
<!-- [en] -->
Connect to a running docker
<!-- [fr] -->
Se connecter à un docker en cours d'exécution
<!-- [common] -->
```bash
docker exec -ti DOCKER_NAME bash
docker exec -u root -ti DOCKER_NAME bash
```
<!-- [en] -->
Commands for debugging
<!-- [fr] -->
Commandes pour le débogage
<!-- [common] -->
```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
```
<!-- [en] -->
### Cleaning
Delete all system
<!-- [fr] -->
### Nettoyage
Supprimer tout le système
<!-- [common] -->
```bash
docker system prune -a
```
<!-- [en] -->
Delete docker image
<!-- [fr] -->
Supprimer une image docker
<!-- [common] -->
```bash
docker image prune
docker rmi $(docker images -q)
```
<!-- [en] -->
Delete volumes
<!-- [fr] -->
Supprimer les volumes
<!-- [common] -->
```bash
docker compose rm -v
```
<!-- [en] -->
Delete containers
<!-- [fr] -->
Supprimer les conteneurs
<!-- [common] -->
```bash
docker rm $(docker ps -a | grep -v IMAGE | awk '{print $1}')
```
<!-- [en] -->
Delete volume
<!-- [fr] -->
Supprimer un volume
<!-- [common] -->
```bash
docker volume prune
```
<!-- [en] -->
# Change docker directory
You can change the docker directory by editing file `/etc/docker/daemon.json`
<!-- [fr] -->
# Changer le répertoire docker
Vous pouvez changer le répertoire docker en modifiant le fichier `/etc/docker/daemon.json`
<!-- [common] -->
```json
{
"data-root": "/home/docker"
}
```
<!-- [en] -->
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` :
<!-- [fr] -->
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` :
<!-- [common] -->
```
ExecStart=/usr/bin/dockerd --data-root /second_drive/docker -H fd:// --containerd=/run/containerd/containerd.sock
```
<!-- [en] -->
# 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
<!-- [fr] -->
# 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

148
docker/README.fr.md Normal file
View file

@ -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

View file

@ -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
```

View file

@ -0,0 +1,35 @@
<!---------------------------->
<!-- multilingual suffix: en, fr -->
<!-- no suffix: en -->
<!---------------------------->
<!-- [en] -->
# 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:
<!-- [fr] -->
# 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 :
<!-- [common] -->
```bash
./script/database/restore_mariadb_sql_example_1.sh
```

View file

@ -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
```

View file

@ -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
```
```

View file

@ -0,0 +1,18 @@
<!---------------------------->
<!-- multilingual suffix: en, fr -->
<!-- no suffix: en -->
<!---------------------------->
<!-- [en] -->
# 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.
<!-- [fr] -->
# 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.

View file

@ -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.

View file

@ -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

View file

@ -0,0 +1,16 @@
<!---------------------------->
<!-- multilingual suffix: en, fr -->
<!-- no suffix: en -->
<!---------------------------->
<!-- [en] -->
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/
<!-- [fr] -->
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/

View file

@ -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/

View file

@ -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/
https://shunsvineyard.info/2019/12/23/using-git-submodule-and-develop-mode-to-manage-python-projects/

View file

@ -0,0 +1,75 @@
<!---------------------------->
<!-- multilingual suffix: en, fr -->
<!-- no suffix: en -->
<!---------------------------->
<!-- [en] -->
# Deployment from Odoo
## Support Wildcard
You can support Wildcard domain, like *.mysite.com
Generate manually the certificate :
<!-- [fr] -->
# Déploiement depuis Odoo
## Support Wildcard
Vous pouvez supporter les domaines Wildcard, comme *.mysite.com
Générez manuellement le certificat :
<!-- [common] -->
```bash
sudo certbot certonly --manual --preferred-challenges=dns --server https://acme-v02.api.letsencrypt.org/directory -d "*.mysite.com" -d "*.mysecondsite.com"
```
<!-- [en] -->
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
<!-- [fr] -->
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
<!-- [common] -->
```bash
visudo
```
<!-- [en] -->
Add this content
<!-- [fr] -->
Ajoutez ce contenu
<!-- [common] -->
```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
```
<!-- [en] -->
Run script
<!-- [fr] -->
Exécutez le script
<!-- [common] -->
```bash
sudo ./script/nginx/deploy_nginx_and_certbot.py --generate_nginx --run_certbot --domain DOMAINS;DOMAINS
```

39
script/nginx/README.fr.md Normal file
View file

@ -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
```

View file

@ -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
```
```

View file

@ -0,0 +1,25 @@
<!---------------------------->
<!-- multilingual suffix: en, fr -->
<!-- no suffix: en -->
<!---------------------------->
<!-- [en] -->
# Migration
Run this script when doing database migration. Example :
<!-- [fr] -->
# Migration
Exécutez ce script lors de la migration de base de données. Exemple :
<!-- [common] -->
```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
```
<!-- [en] -->
Check [uninstall_module_list_odoo140_to_odoo150.txt](uninstall_module_list_odoo140_to_odoo150.txt)
<!-- [fr] -->
Consultez [uninstall_module_list_odoo140_to_odoo150.txt](uninstall_module_list_odoo140_to_odoo150.txt)

View file

@ -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)

View file

@ -1,3 +1,4 @@
# Migration
Run this script when doing database migration. Example :

View file

@ -0,0 +1,52 @@
<!---------------------------->
<!-- multilingual suffix: en, fr -->
<!-- no suffix: en -->
<!---------------------------->
<!-- [en] -->
# 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.
<!-- [fr] -->
# 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.
<!-- [common] -->
```bash
./script/database/db_restore.py --database test
./script/addons/install_addons.sh test restful,helpdesk_mgmt
./run.sh -d test
```
<!-- [en] -->
Test with the example while the server is running. You can add data manually.
<!-- [fr] -->
Testez avec l'exemple pendant que le serveur est en cours d'exécution. Vous pouvez ajouter des données manuellement.
<!-- [common] -->
```bash
./script/restful/restful_example.py
```

View file

@ -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
```

View file

@ -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
```
```

View file

@ -0,0 +1,13 @@
<!---------------------------->
<!-- multilingual suffix: en, fr -->
<!-- no suffix: en -->
<!---------------------------->
<!-- [en] -->
# Installation Ubuntu 20.04
<!-- [fr] -->
# Installation Ubuntu 20.04
<!-- [common] -->
sudo apt install libcairo2-dev

View file

@ -0,0 +1,4 @@
# Installation Ubuntu 20.04
sudo apt install libcairo2-dev

View file

@ -1,3 +1,4 @@
# Installation Ubuntu 20.04
sudo apt install libcairo2-dev
sudo apt install libcairo2-dev

View file

@ -0,0 +1,29 @@
<!---------------------------->
<!-- multilingual suffix: en, fr -->
<!-- no suffix: en -->
<!---------------------------->
<!-- [en] -->
# Selenium Installation
<!-- [fr] -->
# Installation de Selenium
<!-- [common] -->
```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
```
<!-- [en] -->
Video recorder: https://github.com/szemate/pyselenium-video-recorder
<!-- [fr] -->
Enregistreur vidéo : https://github.com/szemate/pyselenium-video-recorder

View file

@ -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

View file

@ -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

View file

@ -0,0 +1,16 @@
<!---------------------------->
<!-- multilingual suffix: en, fr -->
<!-- no suffix: en -->
<!---------------------------->
<!-- [en] -->
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.
<!-- [fr] -->
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.

5
script/todo/README.fr.md Normal file
View file

@ -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.

View file

@ -1,3 +1,4 @@
TODO is an assistant robot to use ERPLibre
Execute it with `./script/todo/todo.py` or `make todo`.