This repository contains helper functions1 to facilitate the writing of upgrade scripts.
The functions in this repo are meant to work (sometimes just not fail) from Odoo 7.0 up to latest version.
Thus the only supported version of this repo is master
head.
Once you have cloned this repository locally, start odoo
with the src
directory prepended to the --upgrade-path
option.
$ ./odoo-bin --upgrade-path=/path/to/upgrade-util/src,/path/to/other/upgrade/script/directory [...]
On platforms where you don't manage Odoo yourself, you can install this package via pip:
$ python3 -m pip install git+https://github.com/odoo/upgrade-util@master
You can freeze the hash version when installing in this fashion. Just replace master
by the hash of the commit you want to target.
On Odoo.sh it is recommended to add it to the requirements.txt
of your repository:
odoo_upgrade @ git+https://github.com/odoo/upgrade-util@master
Once installed, the following packages are available
odoo.upgrade.util
: the helper functions.odoo.upgrade.testing
: baseTestCase
classes
Footnotes
-
We call them "utils". ↩