[DOC] update documentation

This commit is contained in:
Sylvain LE GAL 2022-05-31 17:31:40 +02:00
parent 7df051acfa
commit 3554f92564
3 changed files with 50 additions and 4 deletions

View File

@ -1,3 +1,18 @@
# Tools to understand
The library is using many tools. It is recommanded to understand that tools
to contribute to that project.
* Docker (https://www.docker.com/)
* Dind (Docker In Docker) for running docker in gitlab-ci. (https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#use-docker-in-docker)
* Gitlab CI (https://docs.gitlab.com/ee/ci/quick_start/index.html)
* openupgrade project (https://github.com/oca/openupgrade) and related openupgradelib (https://github.com/oca/openupgradelib)
* poetry (https://python-poetry.org/)
* odoorpc (https://github.com/OCA/odoorpc)
* git-aggregator (https://github.com/acsone/git-aggregator)
* click-odoo (https://github.com/acsone/click-odoo)
# Extra Developper Requirements # Extra Developper Requirements
If you want to use this library without installing anything in your If you want to use this library without installing anything in your

View File

@ -27,6 +27,8 @@ To develop and contribute to the library, refer to the ``DEVELOP.md`` file.
# Usage # Usage
## ``odoo-openupgrade-wizard init`` ## ``odoo-openupgrade-wizard init``
``` ```
@ -90,6 +92,8 @@ src/
before beginning the step. before beginning the step.
- ``post-migration.py`` can contains extra python command to execute - ``post-migration.py`` can contains extra python command to execute
after the execution of the step. (the orm will be available) after the execution of the step. (the orm will be available)
Script will be executed with ``click-odoo`` command. All the ORM is available
via the ``env`` variable.
* ``src`` folder contains a folder per Odoo version. In each environment folder: * ``src`` folder contains a folder per Odoo version. In each environment folder:
@ -107,18 +111,23 @@ src/
- ``debian_requirements.txt`` enumerates the list of extra system librairies - ``debian_requirements.txt`` enumerates the list of extra system librairies
required to run the odoo instance. required to run the odoo instance.
- ``odoo.cfg`` file. Add here extra configuration required for your custom modules.
the classical keys (``db_host``, ``db_port``, etc...) are automatically autogenerated.
At this step, you should change the autogenerated files. At this step, you should change the autogenerated files.
You can use default files, if you have a very simple odoo instance without custom code, You can use default files, if you have a very simple odoo instance without custom code,
extra repositories, or dependencies... extra repositories, or dependencies...
## ``odoo-openupgrade-wizard get-code`` ## ``odoo-openupgrade-wizard get-code``
``` ```
odoo-openupgrade-wizard get-code odoo-openupgrade-wizard get-code
``` ```
This command will simply get all the Odoo code required to run all the steps for your migration with the ``gitaggregate`` tools. This command will simply get all the Odoo code required to run all the steps
for your migration with the ``gitaggregate`` tools.
The code is defined in the ``repos.yml`` of each sub folders. The code is defined in the ``repos.yml`` of each sub folders.
@ -134,6 +143,8 @@ if you want to update the code of some given releases, you can provide an extra
odoo-openupgrade-wizard get-code --releases 10.0,11.0 odoo-openupgrade-wizard get-code --releases 10.0,11.0
``` ```
## ``odoo-openupgrade-wizard docker-build`` ## ``odoo-openupgrade-wizard docker-build``
This will build local docker images that will be used in the following steps. This will build local docker images that will be used in the following steps.
@ -163,6 +174,8 @@ odoo-openupgrade-wizard-image---my-customer-10-12---10.0 latest 9d94dce2bd4
* This step could take a big while also ! * This step could take a big while also !
## ``odoo-openupgrade-wizard run`` ## ``odoo-openupgrade-wizard run``
``` ```
@ -186,6 +199,8 @@ at your host, at the following url : http://localhost:9069
* You can add ``stop-after-init`` flag to turn off the process at the end * You can add ``stop-after-init`` flag to turn off the process at the end
of the installation. of the installation.
## ``odoo-openupgrade-wizard install-from-csv`` ## ``odoo-openupgrade-wizard install-from-csv``
``` ```
@ -198,6 +213,8 @@ given database.
The database will be created, if it doesn't exists. The database will be created, if it doesn't exists.
## ``odoo-openupgrade-wizard upgrade`` ## ``odoo-openupgrade-wizard upgrade``
``` ```
@ -220,3 +237,20 @@ For each step, it will :
* You can add ``--first-step=2`` to start at the second step. * You can add ``--first-step=2`` to start at the second step.
* You can add ``--last-step=3`` to end at the third step. * You can add ``--last-step=3`` to end at the third step.
## ``odoo-openupgrade-wizard generate-module-analysis``
```
odoo-openupgrade-wizard generate-module-analysis\
--database DB_NAME
--step 2
--modules MODULE_LIST
```
Realize an analyze between the target version (in parameter via the step argument)
and the previous version. It will generate analysis_file.txt files present
in OpenUpgrade project.
You can also use this fonction to analyze differences for custom / OCA modules
between several versions, in case of refactoring.

View File

@ -67,9 +67,6 @@ docker exec db psql --username=odoo --dbname=test_v12 -c "update res_partner set
locally. (there are extra bugs locally that doesn't occures on gitlab, locally. (there are extra bugs locally that doesn't occures on gitlab,
in ``cli_B_03_run_test.py``... in ``cli_B_03_run_test.py``...
- ``.absolute()`` has been added in test to try to fix some things,
but maybe it's not necessary.
- Check if there are default values for containers, limiting ressources. - Check if there are default values for containers, limiting ressources.