[UPD] format doc markdown
- Add contributors
This commit is contained in:
parent
6bb4dafba6
commit
4e020fce6d
13 changed files with 220 additions and 67 deletions
|
|
@ -1,16 +1,25 @@
|
||||||
# Thanks
|
# Thanks
|
||||||
|
|
||||||
## AGILE OPS
|
## AGILE OPS
|
||||||
Thanks for contributing to GIT_REPO and docker.
|
|
||||||
- [Agile OPS](https://www.linkedin.com/in/michaelfaille/)
|
Thanks to [Agile OPS](https://www.linkedin.com/in/michaelfaille/) for contributing to GIT_REPO and docker.
|
||||||
|
|
||||||
## MathBenTech
|
## MathBenTech
|
||||||
Thanks for creating this project.
|
|
||||||
- [MathBen.Tech](https://mathben.tech)
|
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
|
## TechnoLibre
|
||||||
Thanks for making this enterprise edition of ERPLibre.
|
|
||||||
- [TechnoLibre](https://technolibre.ca)
|
Thanks to [TechnoLibre](https://technolibre.ca) for making this enterprise edition of ERPLibre.
|
||||||
|
|
||||||
## Yenthe Van Ginneken
|
## Yenthe Van Ginneken
|
||||||
Thanks Yenthe Van Ginneken for your scripting guides and tutorials.
|
|
||||||
- [Yenthe666 InstallScript](https://github.com/Yenthe666/InstallScript)
|
Thanks [Yenthe666 InstallScript](https://github.com/Yenthe666/InstallScript) for your scripting guides and tutorials.
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,17 @@
|
||||||
# Development guide
|
# Development guide
|
||||||
|
|
||||||
Setup your environment to develop modules and debug the platform.
|
Setup your environment to develop modules and debug the platform.
|
||||||
|
|
||||||
## Local installation procedure
|
## Local installation procedure
|
||||||
|
|
||||||
### 1. Clone the project:
|
### 1. Clone the project:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/ERPLibre/ERPLibre.git
|
git clone https://github.com/ERPLibre/ERPLibre.git
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2. Execute the script:
|
### 2. Execute the script:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd ERPLibre
|
cd ERPLibre
|
||||||
./script/install_dev.sh
|
./script/install_dev.sh
|
||||||
|
|
@ -15,157 +19,205 @@ cd ERPLibre
|
||||||
```
|
```
|
||||||
|
|
||||||
### 3. Run ERPLibre
|
### 3. Run ERPLibre
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./run.sh
|
./run.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
## Develop in Odoo repository
|
## 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_locally_dev.sh`
|
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_locally_dev.sh`
|
||||||
|
|
||||||
## Fork project to create a new project independent from ERPLibre (deprecated)
|
## Fork project to create a new project independent from 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.
|
ERPLibre was created with this script. It's now deprecated. Use this script when you need to fork directly from the
|
||||||
Don't use this script if you want to update from ERPLibre and follow mainstream development.
|
original source. Don't use this script if you want to update from ERPLibre and follow mainstream development.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/fork_project.py --github_token GITHUB_KEY --organization NAME
|
./script/fork_project.py --github_token GITHUB_KEY --organization NAME
|
||||||
```
|
```
|
||||||
|
|
||||||
# Fork all repos for you own organization
|
# 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.
|
|
||||||
|
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.
|
This command will fork all repos and ERPLibre to your own organization. It keeps track of ERPLibre.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/fork_project_ERPLibre.py --github_token GITHUB_KEY --organization NAME
|
./script/fork_project_ERPLibre.py --github_token GITHUB_KEY --organization NAME
|
||||||
```
|
```
|
||||||
|
|
||||||
## Generate manifest from csv repo
|
## Generate manifest from csv repo
|
||||||
|
|
||||||
Add repo in file [./source_repo_addons.csv](./source_repo_addons.csv)
|
Add repo in file [./source_repo_addons.csv](./source_repo_addons.csv)
|
||||||
|
|
||||||
Execute to generate Repo manifest
|
Execute to generate Repo manifest
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/fork_project_ERPLibre.py --skip_fork
|
./script/fork_project_ERPLibre.py --skip_fork
|
||||||
```
|
```
|
||||||
|
|
||||||
## Move database from prod to dev
|
## Move database from prod to dev
|
||||||
When moving database from prod to your dev environment, you want to remove email servers and install user test in order to test the database.
|
|
||||||
Run:
|
When moving database from prod to your dev environment, you want to remove email servers and install user test in order
|
||||||
|
to test the database. Run:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./run.sh --stop-after-init -i user_test,disable_mail_server --dev all -d DATABASE
|
./run.sh --stop-after-init -i user_test,disable_mail_server --dev all -d DATABASE
|
||||||
```
|
```
|
||||||
|
|
||||||
## Change git url https to Git
|
## Change git url https to Git
|
||||||
|
|
||||||
This will update all urls in Git format:
|
This will update all urls in Git format:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/git_change_remote_https_to_git.py
|
./script/git_change_remote_https_to_git.py
|
||||||
```
|
```
|
||||||
|
|
||||||
## Showing repo differences between projects
|
## Showing repo differences between projects
|
||||||
|
|
||||||
Tools to display the differences between the repo and another project.
|
Tools to display the differences between the repo and another project.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/git_change_remote.py --sync_to /path/to/project/erplibre --dry_sync
|
./script/git_change_remote.py --sync_to /path/to/project/erplibre --dry_sync
|
||||||
```
|
```
|
||||||
|
|
||||||
## Showing repo differences with manifest develop
|
## Showing repo differences with manifest develop
|
||||||
|
|
||||||
To understand the divergences with the dev manifest.
|
To understand the divergences with the dev manifest.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/git_show_code_diff_repo_manifest.py -m ./manifest/default.dev.xml
|
./script/git_show_code_diff_repo_manifest.py -m ./manifest/default.dev.xml
|
||||||
```
|
```
|
||||||
|
|
||||||
## Sync repo with another project
|
## 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.
|
|
||||||
|
Tools to synchronise the repo with another project. This will show differences and try to checkout on the same commit in
|
||||||
|
all repos.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/git_change_remote.py --sync_to /path/to/project/erplibre
|
./script/git_change_remote.py --sync_to /path/to/project/erplibre
|
||||||
```
|
```
|
||||||
|
|
||||||
## Compare two files manifests
|
## Compare two files manifests
|
||||||
|
|
||||||
To show differences between commits in different manifests
|
To show differences between commits in different manifests
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/git_diff_repo_manifest.py --input1 ./manifest/MANIFEST1.xml --input2 ./manifest/MANIFEST2.xml
|
./script/git_diff_repo_manifest.py --input1 ./manifest/MANIFEST1.xml --input2 ./manifest/MANIFEST2.xml
|
||||||
```
|
```
|
||||||
|
|
||||||
## Differences between code and manifest
|
## Differences between code and manifest
|
||||||
|
|
||||||
To show differences between actual code and manifest
|
To show differences between actual code and manifest
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/git_show_code_diff_repo_manifest.py --manifest ./manifest/MANIFEST1.xml
|
./script/git_show_code_diff_repo_manifest.py --manifest ./manifest/MANIFEST1.xml
|
||||||
```
|
```
|
||||||
|
|
||||||
## Add repo
|
## Add repo
|
||||||
|
|
||||||
To access a new repo, add your URL to file [source_repo_addons.csv](../source_repo_addons.csv)
|
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:
|
Fork the repo to be able to push new code:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/fork_project_ERPLibre.py
|
./script/fork_project_ERPLibre.py
|
||||||
```
|
```
|
||||||
|
|
||||||
To regenerate only manifest.xml.
|
To regenerate only manifest.xml.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/fork_project_ERPLibre.py --skip_fork
|
./script/fork_project_ERPLibre.py --skip_fork
|
||||||
```
|
```
|
||||||
|
|
||||||
Check if manifest contains "auto_install" and change the value to False.
|
Check if manifest contains "auto_install" and change the value to False.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/repo_remove_auto_install.py
|
./script/repo_remove_auto_install.py
|
||||||
```
|
```
|
||||||
|
|
||||||
## Filter repo by group
|
## Filter repo by group
|
||||||
|
|
||||||
Only keep repo tagged by group 'base' and 'code_generator'
|
Only keep repo tagged by group 'base' and 'code_generator'
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/update_manifest_local_dev_code_generator.sh
|
./script/update_manifest_local_dev_code_generator.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
# Execution
|
# Execution
|
||||||
|
|
||||||
## Config file
|
## Config file
|
||||||
|
|
||||||
You can limit your addons in ERPlibre config file depending on a group of your actual manifest.
|
You can limit your addons in ERPlibre config file depending on a group of your actual manifest.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/git_repo_update_group.py --group base,code_generator
|
./script/git_repo_update_group.py --group base,code_generator
|
||||||
./script/install_locally.sh
|
./script/install_locally.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
Or go back to normal
|
Or go back to normal
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/git_repo_update_group.py
|
./script/git_repo_update_group.py
|
||||||
./script/install_locally.sh
|
./script/install_locally.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
# Coding
|
# Coding
|
||||||
|
|
||||||
## Create module scaffold
|
## Create module scaffold
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
source ./.venv/bin/activate
|
source ./.venv/bin/activate
|
||||||
python odoo/odoo-bin scaffold MODULE_NAME addons/REPO_NAME/
|
python odoo/odoo-bin scaffold MODULE_NAME addons/REPO_NAME/
|
||||||
```
|
```
|
||||||
|
|
||||||
# Pull request
|
# Pull request
|
||||||
|
|
||||||
## Show all pull requests from organization
|
## Show all pull requests from organization
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
/script/pull_request_ERPLibre.py --github_token ### --organization ERPLibre
|
/script/pull_request_ERPLibre.py --github_token ### --organization ERPLibre
|
||||||
```
|
```
|
||||||
|
|
||||||
# Commit
|
# Commit
|
||||||
|
|
||||||
Use this commit format:
|
Use this commit format:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git commit -am "[#ticket] subject: short sentence"
|
git commit -am "[#ticket] subject: short sentence"
|
||||||
```
|
```
|
||||||
|
|
||||||
# Format code
|
# Format code
|
||||||
|
|
||||||
## Python
|
## Python
|
||||||
|
|
||||||
Use [black](https://github.com/psf/black)
|
Use [black](https://github.com/psf/black)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/maintenance/black.sh ./addons/TechnoLibre_odoo-code-generator
|
./script/maintenance/black.sh ./addons/TechnoLibre_odoo-code-generator
|
||||||
```
|
```
|
||||||
|
|
||||||
Or if you prefer [oca-autopep8](https://github.com/psf/black)
|
Or if you prefer [oca-autopep8](https://github.com/psf/black)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/maintenance/autopep8.sh ./addons/TechnoLibre_odoo-code-generator
|
./script/maintenance/autopep8.sh ./addons/TechnoLibre_odoo-code-generator
|
||||||
```
|
```
|
||||||
|
|
||||||
## HTML and css
|
## HTML and css
|
||||||
|
|
||||||
Use [prettier](https://github.com/prettier/prettier)
|
Use [prettier](https://github.com/prettier/prettier)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/maintenance/prettier.sh ./addons/TechnoLibre_odoo-code-generator
|
./script/maintenance/prettier.sh ./addons/TechnoLibre_odoo-code-generator
|
||||||
```
|
```
|
||||||
|
|
||||||
## Javascript
|
## Javascript
|
||||||
|
|
||||||
Use [prettier](https://github.com/prettier/prettier)
|
Use [prettier](https://github.com/prettier/prettier)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/maintenance/prettier.sh --tab-width 4 ./addons/TechnoLibre_odoo-code-generator
|
./script/maintenance/prettier.sh --tab-width 4 ./addons/TechnoLibre_odoo-code-generator
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,17 @@
|
||||||
# Discover
|
# Discover
|
||||||
|
|
||||||
Explore the ERPLibre solution.
|
Explore the ERPLibre solution.
|
||||||
|
|
||||||
## Fast installation
|
## Fast installation
|
||||||
|
|
||||||
### 1. Clone the project:
|
### 1. Clone the project:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/ERPLibre/ERPLibre.git
|
git clone https://github.com/ERPLibre/ERPLibre.git
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2. Run installation locally:
|
### 2. Run installation locally:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd ERPLibre
|
cd ERPLibre
|
||||||
./script/install_dev.sh
|
./script/install_dev.sh
|
||||||
|
|
@ -15,14 +19,17 @@ cd ERPLibre
|
||||||
```
|
```
|
||||||
|
|
||||||
### 3. Run ERPLibre
|
### 3. Run ERPLibre
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./run.sh
|
./run.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
## Add repo
|
## Add repo
|
||||||
|
|
||||||
To access a new repo, add your URL to file [source_repo_addons.csv](../source_repo_addons.csv)
|
To access a new repo, add your URL to file [source_repo_addons.csv](../source_repo_addons.csv)
|
||||||
|
|
||||||
Execute script:
|
Execute script:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/git_repo_manifest.py
|
./script/git_repo_manifest.py
|
||||||
git checkout -b NEW_BRANCH
|
git checkout -b NEW_BRANCH
|
||||||
|
|
@ -30,4 +37,5 @@ git commit -am "Add new repo"
|
||||||
./script/install_locally_dev.sh
|
./script/install_locally_dev.sh
|
||||||
./script/poetry_update.py
|
./script/poetry_update.py
|
||||||
```
|
```
|
||||||
|
|
||||||
[Update your repo.](./GIT_REPO.md)
|
[Update your repo.](./GIT_REPO.md)
|
||||||
|
|
|
||||||
13
doc/FAQ.md
13
doc/FAQ.md
|
|
@ -1,21 +1,31 @@
|
||||||
# FAQ
|
# FAQ
|
||||||
|
|
||||||
## Networking
|
## Networking
|
||||||
|
|
||||||
Show all open port
|
Show all open port
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo lsof -i -P -n | grep LISTEN
|
sudo lsof -i -P -n | grep LISTEN
|
||||||
```
|
```
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo netstat -lpnt | grep LISTEN
|
sudo netstat -lpnt | grep LISTEN
|
||||||
```
|
```
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo ss -lpnt | grep LISTEN
|
sudo ss -lpnt | grep LISTEN
|
||||||
```
|
```
|
||||||
|
|
||||||
## git-repo
|
## git-repo
|
||||||
|
|
||||||
### error.GitError fatal bad revision
|
### error.GitError fatal bad revision
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
```
|
```
|
||||||
error.GitError: manifests rev-list (u'^2736dfd46e8a30cf59a9cd6e93d9e56e87021f2a', 'HEAD', '--'): fatal: bad revision 'HEAD'
|
error.GitError: manifests rev-list (u'^2736dfd46e8a30cf59a9cd6e93d9e56e87021f2a', 'HEAD', '--'): fatal: bad revision 'HEAD'
|
||||||
```
|
```
|
||||||
|
|
@ -23,6 +33,7 @@ error.GitError: manifests rev-list (u'^2736dfd46e8a30cf59a9cd6e93d9e56e87021f2a'
|
||||||
Did you modify files in .repo?
|
Did you modify files in .repo?
|
||||||
|
|
||||||
To reset files from your branch into .repo:
|
To reset files from your branch into .repo:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd .repo/manifests
|
cd .repo/manifests
|
||||||
git branch -av
|
git branch -av
|
||||||
|
|
@ -32,4 +43,4 @@ git branch -av
|
||||||
# To reset the "remotes/origin" use the same as "remotes/m"
|
# To reset the "remotes/origin" use the same as "remotes/m"
|
||||||
git reset --hard REF_OF_REMOTES/m
|
git reset --hard REF_OF_REMOTES/m
|
||||||
> git reset --hard remotes/origin/rel/8953/zd552kl/7.1.1-11.40.208
|
> git reset --hard remotes/origin/rel/8953/zd552kl/7.1.1-11.40.208
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -1,27 +1,34 @@
|
||||||
# git-repo
|
# git-repo
|
||||||
|
|
||||||
This is a guide to understand git-repo. Scripts in ERPLibre use git-repo automatically.
|
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).
|
[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
|
## Setup repo
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl https://storage.googleapis.com/git-repo-downloads/repo > ./.venv/repo
|
curl https://storage.googleapis.com/git-repo-downloads/repo > ./.venv/repo
|
||||||
```
|
```
|
||||||
|
|
||||||
## prod
|
## prod
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./.venv/repo init -u https://github.com/ERPLibre/ERPLibre -b master
|
./.venv/repo init -u https://github.com/ERPLibre/ERPLibre -b master
|
||||||
./.venv/repo sync
|
./.venv/repo sync
|
||||||
```
|
```
|
||||||
|
|
||||||
## dev
|
## dev
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./.venv/repo init -u https://github.com/ERPLibre/ERPLibre -b 12.0_repo -m ./manifest/default.dev.xml
|
./.venv/repo init -u https://github.com/ERPLibre/ERPLibre -b 12.0_repo -m ./manifest/default.dev.xml
|
||||||
./.venv/repo sync
|
./.venv/repo sync
|
||||||
```
|
```
|
||||||
|
|
||||||
## local dev
|
## local dev
|
||||||
|
|
||||||
[Guide to setup locally git](https://railsware.com/blog/taming-the-git-daemon-to-quickly-share-git-repository/).
|
[Guide to setup locally git](https://railsware.com/blog/taming-the-git-daemon-to-quickly-share-git-repository/).
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose &
|
git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose &
|
||||||
|
|
||||||
|
|
@ -30,21 +37,31 @@ git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose
|
||||||
```
|
```
|
||||||
|
|
||||||
# Create Manifest
|
# 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.
|
|
||||||
|
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
|
## Make a new version of prod
|
||||||
|
|
||||||
It freezes all repo, from dev to prod.
|
It freezes all repo, from dev to prod.
|
||||||
|
|
||||||
This will add revision git hash in the manifest.
|
This will add revision git hash in the manifest.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./.venv/repo manifest -r -o ./default.xml
|
./.venv/repo manifest -r -o ./default.xml
|
||||||
```
|
```
|
||||||
|
|
||||||
Commit.
|
Commit.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git commit -am "[#ticket] subject: short sentence"
|
git commit -am "[#ticket] subject: short sentence"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Mix prod and dev to create a stage version
|
### 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:
|
|
||||||
|
When dev contains specific revision with default revision, you need to replace default revision with prod revision and
|
||||||
|
keep specific version:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/git_merge_repo_manifest.py --input1 ./manifest/default.dev.xml --input2 ./default.xml --output ./manifest/default.staged.xml
|
./script/git_merge_repo_manifest.py --input1 ./manifest/default.dev.xml --input2 ./default.xml --output ./manifest/default.staged.xml
|
||||||
git commit -am "Updated manifest/default.staged.xml"
|
git commit -am "Updated manifest/default.staged.xml"
|
||||||
|
|
@ -56,32 +73,41 @@ git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose
|
||||||
|
|
||||||
./.venv/repo manifest -r -o ./default.xml
|
./.venv/repo manifest -r -o ./default.xml
|
||||||
```
|
```
|
||||||
|
|
||||||
## Create a dev version
|
## Create a dev version
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./.venv/repo manifest -o ./manifest/default.dev.xml
|
./.venv/repo manifest -o ./manifest/default.dev.xml
|
||||||
```
|
```
|
||||||
|
|
||||||
Commit.
|
Commit.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git commit -am "[#ticket] subject: short sentence"
|
git commit -am "[#ticket] subject: short sentence"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Useful commands
|
## Useful commands
|
||||||
|
|
||||||
### Search all repos with a specific branch name
|
### Search all repos with a specific branch name
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./.venv/repo forall -pc "git branch -a|grep BRANCH"
|
./.venv/repo forall -pc "git branch -a|grep BRANCH"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Search missing branch in all repos
|
### Search missing branch in all repos
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./.venv/repo forall -pc 'git branch -a|(grep /BRANCH$||echo "no match")|grep "no match"'
|
./.venv/repo forall -pc 'git branch -a|(grep /BRANCH$||echo "no match")|grep "no match"'
|
||||||
```
|
```
|
||||||
|
|
||||||
### Search changed file in all repos
|
### Search changed file in all repos
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./.venv/repo forall -pc "git status -s"
|
./.venv/repo forall -pc "git status -s"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Clean all
|
### Clean all
|
||||||
|
|
||||||
Before cleaning, check changed file in all repos.
|
Before cleaning, check changed file in all repos.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
@ -95,6 +121,7 @@ Check the changed branch, and push changed if needed.
|
||||||
```
|
```
|
||||||
|
|
||||||
Maybe, some version diverge from your manifest. Simply clean all and relaunch your installation.
|
Maybe, some version diverge from your manifest. Simply clean all and relaunch your installation.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/clean_repo_manifest.sh
|
./script/clean_repo_manifest.sh
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
# HOW TO
|
# HOW TO
|
||||||
|
|
||||||
## Update changelog
|
## Update changelog
|
||||||
|
|
||||||
Please read the following documentation [keepachangelog.com](https://keepachangelog.com)
|
Please read the following documentation [keepachangelog.com](https://keepachangelog.com)
|
||||||
|
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
# ERPLibre
|
|
||||||
|
|
||||||
## Migration procedure in production
|
|
||||||
|
|
||||||
TODO
|
|
||||||
|
|
||||||
## Migration procedure in dev
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
update module helpdesk_mgmt and helpdesk_join_team
|
|
||||||
|
|
||||||
update translation all
|
|
||||||
|
|
||||||
Remove helpdesk_res_partner_team
|
|
||||||
|
|
||||||
Delete module not found
|
|
||||||
|
|
||||||
smile_upgrade?
|
|
||||||
|
|
||||||
update html categorie_id
|
|
||||||
|
|
||||||
join_team == 6
|
|
||||||
|
|
||||||
servicecall == 1
|
|
||||||
|
|
||||||
--limit-time-real 99999 -c config.conf --stop-after-init -d santelibre -i helpdesk_mrp -i erplibre_base_enterprise_mrp,erplibre_base_hackaton,helpdesk_mgmt -u helpdesk_join_team
|
|
||||||
|
|
||||||
--limit-time-real 99999 -c config.conf --stop-after-init -d santelibre -u helpdesk_join_team
|
|
||||||
|
|
@ -1,9 +1,13 @@
|
||||||
# Poetry
|
# Poetry
|
||||||
|
|
||||||
## Add dependencies automatically
|
## Add dependencies automatically
|
||||||
|
|
||||||
Add your dependencies in file [requirements.txt](../requirements.txt) and run script
|
Add your dependencies in file [requirements.txt](../requirements.txt) and run script
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/poetry_update.py
|
./script/poetry_update.py
|
||||||
```
|
```
|
||||||
|
|
||||||
This will search all `requirements.txt` files and update `pyproject.toml` and it will update poetry
|
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.
|
Priority dependencies in ./requirements.txt, after it's ./odoo/requirements.txt, after it's highest version values.
|
||||||
|
|
@ -11,7 +15,9 @@ Priority dependencies in ./requirements.txt, after it's ./odoo/requirements.txt,
|
||||||
TODO add option to only add missing dependencies and ignore update.
|
TODO add option to only add missing dependencies and ignore update.
|
||||||
|
|
||||||
## Add dependencies manually
|
## Add dependencies manually
|
||||||
|
|
||||||
The automatic script will erase this dependency, but you can add it for your local test.
|
The automatic script will erase this dependency, but you can add it for your local test.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
poetry add PYTHON_MODULE
|
poetry add PYTHON_MODULE
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,27 @@
|
||||||
# ERPLibre production guide
|
# ERPLibre production guide
|
||||||
|
|
||||||
## Requirement
|
## Requirement
|
||||||
|
|
||||||
- 5Go of disk space
|
- 5Go of disk space
|
||||||
|
|
||||||
## Production installation procedure
|
## Production installation procedure
|
||||||
|
|
||||||
### 1. Clone the project:
|
### 1. Clone the project:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/ERPLibre/ERPLibre.git
|
git clone https://github.com/ERPLibre/ERPLibre.git
|
||||||
cd ERPLibre
|
cd ERPLibre
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2. Modify the parameters
|
### 2. Modify the parameters
|
||||||
Modify the file env_var.sh for production installation.
|
|
||||||
Enable nginx if you need a proxy with `EL_INSTALL_NGINX`.
|
Modify the file env_var.sh for production installation. Enable nginx if you need a proxy with `EL_INSTALL_NGINX`.
|
||||||
Redirect your DNS to the proxy's ip and add your A and AAAA into `WL_WEBSITE_NAME` with space between.
|
Redirect your DNS to the proxy's ip and add your A and AAAA into `WL_WEBSITE_NAME` with space between.
|
||||||
|
|
||||||
### 3. Execute the scripts:
|
### 3. Execute the scripts:
|
||||||
|
|
||||||
#### With proxy nginx production, install certbot before for SSL
|
#### With proxy nginx production, install certbot before for SSL
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Snap installation
|
# Snap installation
|
||||||
# https://snapcraft.io/docs/installing-snap-on-debian
|
# https://snapcraft.io/docs/installing-snap-on-debian
|
||||||
|
|
@ -33,68 +36,84 @@ sudo ln -s /snap/bin/certbot /usr/bin/certbot
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Ubuntu 18.04 server
|
#### Ubuntu 18.04 server
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/install_dev.sh
|
./script/install_dev.sh
|
||||||
./script/install_production.sh
|
./script/install_production.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
A service is runned by SystemD. You can access it with the DNS name found in `env_var.sh`
|
A service is runned by SystemD. You can access it with the DNS name found in `env_var.sh`
|
||||||
|
|
||||||
#### Ubuntu 20.04 server
|
#### Ubuntu 20.04 server
|
||||||
|
|
||||||
Apply fix libpng12-0: https://www.linuxuprising.com/2018/05/fix-libpng12-0-missing-in-ubuntu-1804.html
|
Apply fix libpng12-0: https://www.linuxuprising.com/2018/05/fix-libpng12-0-missing-in-ubuntu-1804.html
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/install_dev.sh
|
./script/install_dev.sh
|
||||||
./script/install_production.sh
|
./script/install_production.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
A service is runned by SystemD, you can access it with the DNS name found in `env_var.sh`
|
A service is runned by SystemD, you can access it with the DNS name found in `env_var.sh`
|
||||||
|
|
||||||
### 4. SSL:
|
### 4. SSL:
|
||||||
|
|
||||||
Generate a ssl certificate
|
Generate a ssl certificate
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo certbot --nginx
|
sudo certbot --nginx
|
||||||
```
|
```
|
||||||
|
|
||||||
## Watch log
|
## Watch log
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo systemctl -feu [EL_USER]
|
sudo systemctl -feu [EL_USER]
|
||||||
```
|
```
|
||||||
|
|
||||||
## Run by address ip
|
## Run by address ip
|
||||||
|
|
||||||
Comment the following line in `/[EL_USER]/erplibre/config.conf`
|
Comment the following line in `/[EL_USER]/erplibre/config.conf`
|
||||||
|
|
||||||
```
|
```
|
||||||
#xmlrpc_interface = 127.0.0.1
|
#xmlrpc_interface = 127.0.0.1
|
||||||
#netrpc_interface = 127.0.0.1
|
#netrpc_interface = 127.0.0.1
|
||||||
#proxy_mode = True
|
#proxy_mode = True
|
||||||
```
|
```
|
||||||
|
|
||||||
Add your address ip server_name in nginx config `/etc/nginx/sites-available/[EL_WEBSITE_NAME]`
|
Add your address ip server_name in nginx config `/etc/nginx/sites-available/[EL_WEBSITE_NAME]`
|
||||||
|
|
||||||
Restart daemon:
|
Restart daemon:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo systemctl restart nginx
|
sudo systemctl restart nginx
|
||||||
sudo systemctl restart [EL_USER]
|
sudo systemctl restart [EL_USER]
|
||||||
```
|
```
|
||||||
|
|
||||||
## Production execution
|
## Production execution
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /[EL_USER]/erplibre
|
cd /[EL_USER]/erplibre
|
||||||
./run.sh -d [DATABASE] --no-database-list
|
./run.sh -d [DATABASE] --no-database-list
|
||||||
```
|
```
|
||||||
|
|
||||||
## Move prod database to dev
|
## 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.
|
When moving prod database to your dev environment, you want to remove email servers and install user test to test the
|
||||||
Run:
|
database. WARNING, this is not safe for production, you will expose all data. Run:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/migrate_prod_to_test.sh DATABASE
|
./script/migrate_prod_to_test.sh DATABASE
|
||||||
```
|
```
|
||||||
|
|
||||||
## Update production
|
## Update production
|
||||||
|
|
||||||
Update all features.
|
Update all features.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./run.sh --limit-time-real 99999 --stop-after-init -u all -d DATABASE
|
./run.sh --limit-time-real 99999 --stop-after-init -u all -d DATABASE
|
||||||
```
|
```
|
||||||
|
|
||||||
# Postgresql
|
# Postgresql
|
||||||
|
|
||||||
To show config files:
|
To show config files:
|
||||||
> psql -U postgres -c 'SHOW config_file'
|
> psql -U postgres -c 'SHOW config_file'
|
||||||
|
|
||||||
|
|
@ -102,7 +121,9 @@ Edit this file to accept interface from all networks:
|
||||||
> /var/lib/postgres/data/postgresql.conf
|
> /var/lib/postgres/data/postgresql.conf
|
||||||
|
|
||||||
# Delete an instance in production
|
# Delete an instance in production
|
||||||
|
|
||||||
CAUTION, this will delete user's home, it's irrevocable.
|
CAUTION, this will delete user's home, it's irrevocable.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/delete_production.sh
|
./script/delete_production.sh
|
||||||
```
|
```
|
||||||
|
|
@ -114,6 +135,7 @@ mkdir ~/.cloudflare
|
||||||
```
|
```
|
||||||
|
|
||||||
Edit ~/.cloudflare/cloudflare.cfg
|
Edit ~/.cloudflare/cloudflare.cfg
|
||||||
|
|
||||||
```
|
```
|
||||||
[PROFILE_NAME]
|
[PROFILE_NAME]
|
||||||
email=EMAIL
|
email=EMAIL
|
||||||
|
|
@ -121,6 +143,7 @@ token=TOKEN
|
||||||
```
|
```
|
||||||
|
|
||||||
Add your cron
|
Add your cron
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
vim /etc/crontab
|
vim /etc/crontab
|
||||||
# Add
|
# Add
|
||||||
|
|
@ -128,6 +151,7 @@ vim /etc/crontab
|
||||||
```
|
```
|
||||||
|
|
||||||
Check log with
|
Check log with
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo journalctl -feu cron
|
sudo journalctl -feu cron
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ A guide on how to generate a release.
|
||||||
|
|
||||||
## Clean environment before generating new release
|
## Clean environment before generating new release
|
||||||
|
|
||||||
Before the cleaning, check if existing file is not committed, not pushed or in stash.
|
Before the cleaning, check if existing file isn't committed, not pushed or in stash.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./.venv/repo forall -pc "git stash list"
|
./.venv/repo forall -pc "git stash list"
|
||||||
|
|
@ -26,29 +26,50 @@ And update all from dev to merge into prod.
|
||||||
## Validate environment
|
## Validate environment
|
||||||
|
|
||||||
- Check if [manifest/default.dev.xml](../manifest/default.dev.xml) is ready for production.
|
- Check if [manifest/default.dev.xml](../manifest/default.dev.xml) is ready for production.
|
||||||
- Run test with `make test`
|
- Run test :
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make test
|
||||||
|
```
|
||||||
|
|
||||||
### Format code
|
### Format code
|
||||||
|
|
||||||
Run `make format` to format all code.
|
To format all code, run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make format
|
||||||
|
```
|
||||||
|
|
||||||
### Update image_db
|
### Update image_db
|
||||||
|
|
||||||
Run `make image_db_create_all` to generate database images in directory `./image_db`.
|
To generate database images in directory `./image_db`, run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make image_db_create_all
|
||||||
|
```
|
||||||
|
|
||||||
### Update documentations
|
### Update documentations
|
||||||
|
|
||||||
Run `make doc_markdown` to generate Markdown in directory `./doc`.
|
To generate Markdown in directory `./doc`, run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make doc_markdown
|
||||||
|
```
|
||||||
|
|
||||||
### Test docker generate
|
### Test docker generate
|
||||||
|
|
||||||
Run `make docker_build` to generate a docker.
|
To generate a docker, run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make docker_build
|
||||||
|
```
|
||||||
|
|
||||||
### Test production Ubuntu environment
|
### Test production Ubuntu environment
|
||||||
|
|
||||||
Follow instructions in [PRODUCTION.md](./PRODUCTION.md).
|
Follow instructions in [PRODUCTION.md](./PRODUCTION.md).
|
||||||
|
|
||||||
Test installation with code generator Geomap:
|
Test installation with code generator Geomap:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make addons_install_code_generator_full
|
make addons_install_code_generator_full
|
||||||
```
|
```
|
||||||
|
|
@ -157,4 +178,3 @@ To generate a list of differences between repo git commit
|
||||||
```bash
|
```bash
|
||||||
./script/git_change_remote.py --sync_to /path/to/directory
|
./script/git_change_remote.py --sync_to /path/to/directory
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
18
doc/RUN.md
18
doc/RUN.md
|
|
@ -1,49 +1,65 @@
|
||||||
# Execute ERPLibre
|
# Execute ERPLibre
|
||||||
|
|
||||||
## Start database
|
## Start database
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo systemctl start postgresql.service
|
sudo systemctl start postgresql.service
|
||||||
```
|
```
|
||||||
|
|
||||||
## Run ERPLibre
|
## Run ERPLibre
|
||||||
|
|
||||||
### Method 1
|
### Method 1
|
||||||
|
|
||||||
Simply
|
Simply
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./run.sh
|
./run.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
With arguments
|
With arguments
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./run.sh -h
|
./run.sh -h
|
||||||
```
|
```
|
||||||
|
|
||||||
### Method 2
|
### Method 2
|
||||||
|
|
||||||
Execute your own python script:
|
Execute your own python script:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./run.sh --log-level debug
|
./run.sh --log-level debug
|
||||||
```
|
```
|
||||||
|
|
||||||
### Update all
|
### Update all
|
||||||
|
|
||||||
Great idea to run it when updating Odoo, it updates each module database.
|
Great idea to run it when updating Odoo, it updates each module database.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./run.sh -d [DATABASE] -u all --log-level debug
|
./run.sh -d [DATABASE] -u all --log-level debug
|
||||||
```
|
```
|
||||||
|
|
||||||
### Update module
|
### Update module
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./run.sh -d [DATABASE] -u [module] --log-level debug
|
./run.sh -d [DATABASE] -u [module] --log-level debug
|
||||||
```
|
```
|
||||||
|
|
||||||
### Test
|
### Test
|
||||||
|
|
||||||
First execution, install you requirements, choose a new database.
|
First execution, install you requirements, choose a new database.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./run.sh -d [DATABASE] -i [module to test] --test-enable --stop-after-init --log-level=test
|
./run.sh -d [DATABASE] -i [module to test] --test-enable --stop-after-init --log-level=test
|
||||||
```
|
```
|
||||||
|
|
||||||
Execute your test on a specific module.
|
Execute your test on a specific module.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./run.sh -d [DATABASE] -u [module to test] --test-enable --stop-after-init --log-level=test
|
./run.sh -d [DATABASE] -u [module to test] --test-enable --stop-after-init --log-level=test
|
||||||
```
|
```
|
||||||
|
|
||||||
Execute your test on a specific module with tags.
|
Execute your test on a specific module with tags.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./run.sh -d [DATABASE] -u [module to test] --test-enable --stop-after-init --log-level=test --test-tags [module_name][tags]
|
./run.sh -d [DATABASE] -u [module to test] --test-enable --stop-after-init --log-level=test --test-tags [module_name][tags]
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
# Note healtcheck
|
# Note healtcheck
|
||||||
|
|
||||||
Table à vérifier dans pgsql: ir_ui_view
|
Table à vérifier dans pgsql: ir_ui_view
|
||||||
|
|
||||||
Restore une BD:
|
Restore une BD:
|
||||||
|
|
||||||
- un module est installé mais n'est pas physiquement là
|
- un module est installé mais n'est pas physiquement là
|
||||||
|
|
||||||
Une DB est installé mais on n'arrive pas à l'exécuté
|
Une DB est installé mais on n'arrive pas à l'exécuté
|
||||||
|
|
||||||
HEALTHCHECK CMD curl --fail http://localhost:8069/web || exit 1
|
HEALTHCHECK CMD curl --fail http://localhost:8069/web || exit 1
|
||||||
|
|
||||||
TODO: having the DB variable configurable
|
TODO: having the DB variable configurable
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,25 @@
|
||||||
# Update ERPLibre
|
# Update ERPLibre
|
||||||
|
|
||||||
## Update all repos from the origin source
|
## Update all repos from the origin source
|
||||||
|
|
||||||
The update is possible on branch 12.0, you need to verify this branch existence.
|
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.
|
1. Make sure all git repos are conform, remove all argument depth from manifest and regenerate. You can clean all and
|
||||||
You can clean all and regenerate.
|
regenerate.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/clean_repo_manifest.sh
|
./script/clean_repo_manifest.sh
|
||||||
./script/install_locally_dev.sh
|
./script/install_locally_dev.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Update all remote with ssh/git
|
2. Update all remote with ssh/git
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/git_change_remote_https_to_git.py
|
./script/git_change_remote_https_to_git.py
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Run update script
|
3. Run update script
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/git_update_repo.py
|
./script/git_update_repo.py
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue