Merge branch 'readme-highlight' into 'main'

[DOC] hightlight code

See merge request odoo-openupgrade-wizard/odoo-openupgrade-wizard!93
This commit is contained in:
Rémy Taymans 2024-10-08 09:24:12 +00:00
commit d5c9919139
2 changed files with 22 additions and 20 deletions

View File

@ -77,7 +77,7 @@ in all the command lines below.
## Command: ``init``
```
```shell
odoo-openupgrade-wizard init\
--initial-version=10.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
```
```yaml
odoo_version_settings:
12.0:
repo_url: url_of_the_repo_that_contains_a_repos_yml_file
@ -194,7 +194,7 @@ odoo_version_settings:
then run following command :
```
```shell
odoo-openupgrade-wizard pull-submodule
```
@ -204,7 +204,7 @@ odoo-openupgrade-wizard pull-submodule
**Prerequites:** init
```
```shell
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:
```
```shell
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.
```shell
docker images --filter "reference=odoo-openupgrade-wizard-*"
```
```
$ docker images --filter "reference=odoo-openupgrade-wizard-*"
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---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
```
```shell
odoo-openupgrade-wizard run\
--step 1\
--database DB_NAME
@ -290,7 +291,7 @@ at your host, at the following url : http://localhost:9069
**Prerequites:** init + get-code + build
```
```shell
odoo-openupgrade-wizard install-from-csv\
--database DB_NAME
```
@ -301,7 +302,7 @@ given database.
The database will be created, if it doesn't exists.
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
```
@ -312,7 +313,7 @@ psql -c "copy (select name, shortdesc from ir_module_module where state = 'insta
**Prerequites:** init + get-code + build
```
```shell
odoo-openupgrade-wizard upgrade\
--database DB_NAME
```
@ -340,7 +341,7 @@ For each step, it will :
**Prerequites:** init + get-code + build
```
```shell
odoo-openupgrade-wizard generate-module-analysis\
--database DB_NAME
--step 2
@ -359,7 +360,7 @@ between several versions, in case of refactoring.
**Prerequites:** init + get-code
```
```shell
odoo-openupgrade-wizard estimate-workload
```
@ -376,7 +377,7 @@ the work to do for the migration.
**Prerequites:** init
```
```shell
odoo-openupgrade-wizard psql
--database DB_NAME
--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:
```
```shell
odoo-openupgrade-wizard psql --command "\l";
```
Result:
@ -414,14 +415,14 @@ Note : Pager is enabled by default.
* you can pass extra psql arguments inline.
```
```shell
odoo-openupgrade-wizard psql
--database=test_psql
--command "select id, name from res_partner where name ilike '%admin%';"
-H
```
Result:
```
```html
<table border="1">
<tr>
<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
```
```shell
odoo-openupgrade-wizard copydb
--source DB_NAME
--dest NEW_DB_NAME
@ -462,7 +463,7 @@ the filestore.
**Prerequites:** init
```
```shell
odoo-openupgrade-wizard dropdb
--database DB_NAME
```
@ -477,7 +478,7 @@ This command will always success even if DB_NAME does not exists.
**Prerequites:** init
```
```shell
odoo-openupgrade-wizard dumpdb
--database DB_NAME
--database-path DATABASE_PATH

View File

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