|
1 | | -click-odoo-migrate |
2 | | -================== |
| 1 | +xodoo |
| 2 | +===== |
3 | 3 |
|
4 | 4 | .. image:: https://img.shields.io/badge/license-LGPL--3-blue.svg |
5 | 5 | :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html |
6 | 6 | :alt: License: LGPL-3 |
7 | 7 |
|
8 | | -``click-odoo-migrate`` is migration tool intended to run various migrations |
9 | | -scripts for Odoo. It should be used when migration scripts on modules directly |
10 | | -do not make sense (e.g. need to generate some customer specific data that is not directly related with any module). |
| 8 | +``xodoo`` is collection of various scripts intended to be used for odoo. |
| 9 | +It is based on ``click-odoo`` to connect and manage odoo. |
| 10 | + |
| 11 | +Scripts |
| 12 | +~~~~~~~ |
| 13 | + |
| 14 | +xodoo-migrate |
| 15 | +------------- |
| 16 | + |
| 17 | +Migration tool intended to run various migration scripts for Odoo. It should |
| 18 | +be used when migration scripts directly on modules do not make sense (e.g. need |
| 19 | +to generate some customer specific data that is not directly related with any |
| 20 | +module). |
| 21 | + |
| 22 | +.. code:: |
| 23 | +
|
| 24 | + Usage: xodoo-migrate [OPTIONS] PATH |
| 25 | +
|
| 26 | + PATH: migration file or directory of migration files. |
| 27 | +
|
| 28 | + Migration file must end with .py extension and must have 'migrate' function |
| 29 | + that expects 'env' argument. |
| 30 | +
|
| 31 | + Options: |
| 32 | + -c, --config FILE Specify the Odoo configuration file. Other ways |
| 33 | + to provide it are with the ODOO_RC or |
| 34 | + OPENERP_SERVER environment variables, or |
| 35 | + ~/.odoorc (Odoo >= 10) or ~/.openerp_serverrc. |
| 36 | + -d, --database TEXT Specify the database name. If present, this |
| 37 | + parameter takes precedence over the database |
| 38 | + provided in the Odoo configuration file. |
| 39 | + --log-level TEXT Specify the logging level. Accepted values depend |
| 40 | + on the Odoo version, and include debug, info, |
| 41 | + warn, error. [default: warn] |
| 42 | + --logfile FILE Specify the log file. |
| 43 | + --rollback Rollback the transaction even if the script does |
| 44 | + not raise an exception. Note that if the script |
| 45 | + itself commits, this option has no effect. This |
| 46 | + is why it is not named dry run. This option is |
| 47 | + implied when an interactive console is started. |
| 48 | + -f, --force TEXT Specify migration file names (without extension) |
| 49 | + to force migrate. It will migrate even if it was |
| 50 | + already migrated. Must be subset of migration |
| 51 | + files provided in a path. |
| 52 | + -s, --sort-algorithm TEXT Sort algorithm to sort migration files before |
| 53 | + migration. Possible choices: sorted, natsorted |
| 54 | + --help Show this message and exit. |
| 55 | +
|
| 56 | +If you use ``--rollback`` option, make sure you do not run ``cr.commit()`` in |
| 57 | +your scripts, otherwise it will have no effect (script changes are automatically |
| 58 | +committed if they do not fail at the end of transaction). |
0 commit comments