[DOC] hightlight code

This commit is contained in:
Sylvain LE GAL 2024-10-08 01:28:30 +02:00
parent 4c244fa445
commit 2aefc0da6f
2 changed files with 22 additions and 20 deletions

View File

@ -77,7 +77,7 @@ in all the command lines below.
## Command: ``init`` ## Command: ``init``
``` ```shell
odoo-openupgrade-wizard init\ odoo-openupgrade-wizard init\
--initial-version=10.0\ --initial-version=10.0\
--final-version=12.0\ --final-version=12.0\
@ -184,7 +184,7 @@ synchronize the repository, instead of copy past the ``repos.yml`` manually.
In that case, you can add extra values, in the ``config.yml`` file in the section In that case, you can add extra values, in the ``config.yml`` file in the section
``` ```yaml
odoo_version_settings: odoo_version_settings:
12.0: 12.0:
repo_url: url_of_the_repo_that_contains_a_repos_yml_file repo_url: url_of_the_repo_that_contains_a_repos_yml_file
@ -194,7 +194,7 @@ odoo_version_settings:
then run following command : then run following command :
``` ```shell
odoo-openupgrade-wizard pull-submodule odoo-openupgrade-wizard pull-submodule
``` ```
@ -204,7 +204,7 @@ odoo-openupgrade-wizard pull-submodule
**Prerequites:** init **Prerequites:** init
``` ```shell
odoo-openupgrade-wizard get-code odoo-openupgrade-wizard get-code
``` ```
@ -222,7 +222,7 @@ directory ``repo_submodule`` if you use ``pull-submodule`` feature.)
if you want to update the code of some given versions, you can provide an extra parameter: if you want to update the code of some given versions, you can provide an extra parameter:
``` ```shell
odoo-openupgrade-wizard get-code --versions 10.0,11.0 odoo-openupgrade-wizard get-code --versions 10.0,11.0
``` ```
@ -237,9 +237,10 @@ This will build local docker images that will be used in the following steps.
At this end of this step executing the following command should show a docker image per version. At this end of this step executing the following command should show a docker image per version.
```shell
docker images --filter "reference=odoo-openupgrade-wizard-*"
```
``` ```
$ docker images --filter "reference=odoo-openupgrade-wizard-*"
REPOSITORY TAG IMAGE ID CREATED SIZE REPOSITORY TAG IMAGE ID CREATED SIZE
odoo-openupgrade-wizard-image---my-customer-10-12---12.0 latest ef664c366208 2 weeks ago 1.39GB odoo-openupgrade-wizard-image---my-customer-10-12---12.0 latest ef664c366208 2 weeks ago 1.39GB
odoo-openupgrade-wizard-image---my-customer-10-12---11.0 latest 24e283fe4ae4 2 weeks ago 1.16GB odoo-openupgrade-wizard-image---my-customer-10-12---11.0 latest 24e283fe4ae4 2 weeks ago 1.16GB
@ -262,7 +263,7 @@ odoo-openupgrade-wizard-image---my-customer-10-12---10.0 latest 9d94dce2bd4
**Prerequites:** init + get-code + build **Prerequites:** init + get-code + build
``` ```shell
odoo-openupgrade-wizard run\ odoo-openupgrade-wizard run\
--step 1\ --step 1\
--database DB_NAME --database DB_NAME
@ -290,7 +291,7 @@ at your host, at the following url : http://localhost:9069
**Prerequites:** init + get-code + build **Prerequites:** init + get-code + build
``` ```shell
odoo-openupgrade-wizard install-from-csv\ odoo-openupgrade-wizard install-from-csv\
--database DB_NAME --database DB_NAME
``` ```
@ -301,7 +302,7 @@ given database.
The database will be created, if it doesn't exists. The database will be created, if it doesn't exists.
To get a correct ``modules.csv`` file, the following query can be used: To get a correct ``modules.csv`` file, the following query can be used:
``` ```shell
psql -c "copy (select name, shortdesc from ir_module_module where state = 'installed' order by 1) to stdout csv" coopiteasy psql -c "copy (select name, shortdesc from ir_module_module where state = 'installed' order by 1) to stdout csv" coopiteasy
``` ```
@ -312,7 +313,7 @@ psql -c "copy (select name, shortdesc from ir_module_module where state = 'insta
**Prerequites:** init + get-code + build **Prerequites:** init + get-code + build
``` ```shell
odoo-openupgrade-wizard upgrade\ odoo-openupgrade-wizard upgrade\
--database DB_NAME --database DB_NAME
``` ```
@ -340,7 +341,7 @@ For each step, it will :
**Prerequites:** init + get-code + build **Prerequites:** init + get-code + build
``` ```shell
odoo-openupgrade-wizard generate-module-analysis\ odoo-openupgrade-wizard generate-module-analysis\
--database DB_NAME --database DB_NAME
--step 2 --step 2
@ -359,7 +360,7 @@ between several versions, in case of refactoring.
**Prerequites:** init + get-code **Prerequites:** init + get-code
``` ```shell
odoo-openupgrade-wizard estimate-workload odoo-openupgrade-wizard estimate-workload
``` ```
@ -376,7 +377,7 @@ the work to do for the migration.
**Prerequites:** init **Prerequites:** init
``` ```shell
odoo-openupgrade-wizard psql odoo-openupgrade-wizard psql
--database DB_NAME --database DB_NAME
--command "SQL_REQUEST" --command "SQL_REQUEST"
@ -388,7 +389,7 @@ Execute an SQL Request on the target database.
* If no ``database`` is provided, default ``postgres`` database will be used. exemple: * If no ``database`` is provided, default ``postgres`` database will be used. exemple:
``` ```shell
odoo-openupgrade-wizard psql --command "\l"; odoo-openupgrade-wizard psql --command "\l";
``` ```
Result: Result:
@ -414,14 +415,14 @@ Note : Pager is enabled by default.
* you can pass extra psql arguments inline. * you can pass extra psql arguments inline.
``` ```shell
odoo-openupgrade-wizard psql odoo-openupgrade-wizard psql
--database=test_psql --database=test_psql
--command "select id, name from res_partner where name ilike '%admin%';" --command "select id, name from res_partner where name ilike '%admin%';"
-H -H
``` ```
Result: Result:
``` ```html
<table border="1"> <table border="1">
<tr> <tr>
<th align="center">id</th> <th align="center">id</th>
@ -445,7 +446,7 @@ See all the options here https://www.postgresql.org/docs/current/app-psql.html
**Prerequites:** init **Prerequites:** init
``` ```shell
odoo-openupgrade-wizard copydb odoo-openupgrade-wizard copydb
--source DB_NAME --source DB_NAME
--dest NEW_DB_NAME --dest NEW_DB_NAME
@ -462,7 +463,7 @@ the filestore.
**Prerequites:** init **Prerequites:** init
``` ```shell
odoo-openupgrade-wizard dropdb odoo-openupgrade-wizard dropdb
--database DB_NAME --database DB_NAME
``` ```
@ -477,7 +478,7 @@ This command will always success even if DB_NAME does not exists.
**Prerequites:** init **Prerequites:** init
``` ```shell
odoo-openupgrade-wizard dumpdb odoo-openupgrade-wizard dumpdb
--database DB_NAME --database DB_NAME
--database-path DATABASE_PATH --database-path DATABASE_PATH

View File

@ -0,0 +1 @@
* Improve the README.md file, hightlighting code section.