2026-02-15 01:07:25 -05:00
|
|
|
|
2020-07-05 22:38:14 -04:00
|
|
|
# Execute ERPLibre
|
|
|
|
|
|
|
|
|
|
## Start database
|
2021-07-20 20:14:24 -04:00
|
|
|
|
2020-07-05 22:38:14 -04:00
|
|
|
```bash
|
|
|
|
|
sudo systemctl start postgresql.service
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Run ERPLibre
|
2021-07-20 20:14:24 -04:00
|
|
|
|
2020-07-05 22:38:14 -04:00
|
|
|
### Method 1
|
2021-07-20 20:14:24 -04:00
|
|
|
|
2020-07-05 22:38:14 -04:00
|
|
|
Simply
|
2021-07-20 20:14:24 -04:00
|
|
|
|
2020-07-05 22:38:14 -04:00
|
|
|
```bash
|
|
|
|
|
./run.sh
|
|
|
|
|
```
|
|
|
|
|
|
[ADD] run: choisir la base au démarrage, sans jamais bloquer
« ./run.sh » sans argument partait sans base et l'on choisissait dans le
gestionnaire web. Il choisit maintenant : une seule base, il démarre
dessus ; plusieurs, il affiche un menu numéroté.
Ce qui décide n'est pas le menu mais l'endroit où il ne doit PAS s'ouvrir.
systemd écrit « ExecStart=/bin/bash …/run.sh » sans argument, avec
Restart=always : une question posée là serait une boucle de redémarrage.
Le défaut implicite exige donc un terminal sur stdin ET sur stderr — pas
stdout, qui est toujours un tube dans la substitution qui nous lit.
Mesuré : sans terminal, la ligne d'arguments est identique à l'octet et
la sonde, qui coûte 0,8 s, n'est jamais appelée.
--- EN ---
« ./run.sh » with no argument started without a database and one picked
in the web manager. It now picks: a single database, it starts on it;
several, it shows a numbered menu.
What decides is not the menu but where it must NOT open. systemd writes
« ExecStart=/bin/bash …/run.sh » with no argument and Restart=always: a
question asked there would be a restart loop. The implicit default
therefore requires a terminal on stdin AND on stderr — not stdout, which
is always a pipe inside the substitution that reads us. Measured: with no
terminal the argument line is byte-for-byte identical and the 0.8 s probe
is never called.
Assisted-by: Claude Opus 5
2026-08-23 17:26:41 -04:00
|
|
|
Without any argument, ERPLibre picks the database for you: with a single
|
|
|
|
|
one it starts on it, with several it shows a numbered menu. It only asks
|
|
|
|
|
when a real terminal is there — a service started by systemd behaves
|
|
|
|
|
exactly as before.
|
|
|
|
|
|
|
|
|
|
Two options steer that, and neither reaches Odoo:
|
|
|
|
|
|
|
|
|
|
| option | effect |
|
|
|
|
|
|---|---|
|
|
|
|
|
| `--auto-erplibre` | pick the database even when other arguments are given |
|
|
|
|
|
| `--no-cli-erplibre` | never show the menu; a lone database is still taken |
|
|
|
|
|
|
|
|
|
|
Naming a database yourself — `-d`, `--database` — turns the whole thing
|
|
|
|
|
off, and so does a `db_name` set in the configuration file.
|
|
|
|
|
|
2020-07-05 22:38:14 -04:00
|
|
|
With arguments
|
2021-07-20 20:14:24 -04:00
|
|
|
|
2020-07-05 22:38:14 -04:00
|
|
|
```bash
|
|
|
|
|
./run.sh -h
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Method 2
|
2021-07-20 20:14:24 -04:00
|
|
|
|
2020-07-05 22:38:14 -04:00
|
|
|
Execute your own python script:
|
2021-07-20 20:14:24 -04:00
|
|
|
|
2020-07-05 22:38:14 -04:00
|
|
|
```bash
|
2020-07-12 15:20:39 -04:00
|
|
|
./run.sh --log-level debug
|
2020-07-05 22:38:14 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Update all
|
2021-07-20 20:14:24 -04:00
|
|
|
|
2020-09-30 20:49:35 -04:00
|
|
|
Great idea to run it when updating Odoo, it updates each module database.
|
2021-07-20 20:14:24 -04:00
|
|
|
|
2020-07-05 22:38:14 -04:00
|
|
|
```bash
|
2020-07-12 15:20:39 -04:00
|
|
|
./run.sh -d [DATABASE] -u all --log-level debug
|
2020-07-05 22:38:14 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Update module
|
2021-07-20 20:14:24 -04:00
|
|
|
|
2020-07-05 22:38:14 -04:00
|
|
|
```bash
|
2020-07-12 15:20:39 -04:00
|
|
|
./run.sh -d [DATABASE] -u [module] --log-level debug
|
2020-07-05 22:38:14 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Test
|
2021-07-20 20:14:24 -04:00
|
|
|
|
2020-07-12 15:20:39 -04:00
|
|
|
First execution, install you requirements, choose a new database.
|
2021-07-20 20:14:24 -04:00
|
|
|
|
2020-07-05 22:38:14 -04:00
|
|
|
```bash
|
2024-12-02 05:27:57 -05:00
|
|
|
./run.sh -d [DATABASE] -i [module to test] --test-enable --no-http --stop-after-init --log-level=test
|
2020-07-12 15:20:39 -04:00
|
|
|
```
|
2021-07-20 20:14:24 -04:00
|
|
|
|
2020-09-30 20:49:35 -04:00
|
|
|
Execute your test on a specific module.
|
2021-07-20 20:14:24 -04:00
|
|
|
|
2020-07-12 15:20:39 -04:00
|
|
|
```bash
|
2024-12-02 05:27:57 -05:00
|
|
|
./run.sh -d [DATABASE] -u [module to test] --test-enable --no-http --stop-after-init --log-level=test
|
2020-07-12 15:20:39 -04:00
|
|
|
```
|
2021-07-20 20:14:24 -04:00
|
|
|
|
2020-09-30 20:49:35 -04:00
|
|
|
Execute your test on a specific module with tags.
|
2021-07-20 20:14:24 -04:00
|
|
|
|
2020-07-12 15:20:39 -04:00
|
|
|
```bash
|
2024-12-02 05:27:57 -05:00
|
|
|
./run.sh -d [DATABASE] -u [module to test] --test-enable --no-http --stop-after-init --log-level=test --test-tags [module_name][tags]
|
2026-02-15 01:07:25 -05:00
|
|
|
```
|