|
1 | 1 | # 🧰 Upgrade Utils
|
2 | 2 |
|
3 |
| -This repository contains helper functions to facilitate the writing of upgrade scripts. |
| 3 | +This repository contains helper functions[^1] to facilitate the writing of upgrade scripts. |
| 4 | + |
| 5 | +The functions in this repo are meant to work (sometimes just not fail) from Odoo 7.0 up to latest version. |
| 6 | +Thus the only supported version of this repo is `master` head. |
4 | 7 |
|
5 | 8 | ## Installation
|
6 | 9 |
|
7 |
| -### The usual one |
8 |
| -Once you have clone this repository locally, just start `odoo` with the `src` directory prepended to the `--upgrade-path` option. |
| 10 | +### Recommended |
| 11 | + |
| 12 | +Once you have cloned this repository locally, start `odoo` with the `src` directory prepended to the `--upgrade-path` option. |
9 | 13 | ```shell-session
|
10 | 14 | $ ./odoo-bin --upgrade-path=/path/to/upgrade-util/src,/path/to/other/upgrade/script/directory [...]
|
11 | 15 | ```
|
12 | 16 |
|
13 |
| -### The alternative one |
14 |
| -On platforms where you dont manage odoo yourself, you can install this package via pip: |
| 17 | +### Alternative |
| 18 | + |
| 19 | +On platforms where you don't manage Odoo yourself, you can install this package via pip: |
15 | 20 | ```shell-session
|
16 | 21 | $ python3 -m pip install git+https://github.com/odoo/upgrade-util@master
|
17 | 22 | ```
|
| 23 | + |
| 24 | +You can freeze the hash version when installing in this fashion. Just replace `master` by the hash of the commit you want to target. |
| 25 | + |
18 | 26 | On [Odoo.sh](https://www.odoo.sh/) it is recommended to add it to the `requirements.txt` of your repository:
|
19 | 27 | ```
|
20 | 28 | odoo_upgrade @ git+https://github.com/odoo/upgrade-util@master
|
21 | 29 | ```
|
22 |
| -## How to use them? |
| 30 | + |
| 31 | +## How to use the helper functions? |
| 32 | + |
23 | 33 | Once installed, the following packages are available
|
24 |
| - - `odoo.upgrade.util`: the helper themself. See the wiki for info. |
25 |
| - - `odoo.upgrade.testing`: base TestCase classes |
| 34 | + - `odoo.upgrade.util`: the helper functions. |
| 35 | + - `odoo.upgrade.testing`: base `TestCase` classes |
| 36 | + |
| 37 | +## Documentation |
| 38 | + |
| 39 | +- [Basic guide on how to write upgrade scripts](https://www.odoo.com/documentation/master/developer/reference/upgrades/upgrade_scripts.html) |
| 40 | +- [The reference documentation](https://www.odoo.com/documentation/master/developer/reference/upgrades/upgrade_utils.html) |
| 41 | + |
| 42 | +[^1]: We call them "utils". |
0 commit comments