Skip to content

Commit ef4b5f8

Browse files
aj-fuentesFeyensv
authored andcommitted
[IMP] doc: improve organization of upgrades docs
* Add autodoc directives to generate documentation directly from upgrade-util repo. * Group all upgrades-related reference documentation into one group in the sidebar, instead of having two entries. * Mention `upgrades` vs `migrations` directory. It has been supported since a while but nothing was explicit in the documentation. Original commit: 91a48bf closes #8836 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
1 parent 26fd5f3 commit ef4b5f8

File tree

6 files changed

+135
-286
lines changed

6 files changed

+135
-286
lines changed

content/developer/howtos/upgrade_custom_db.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,10 @@ To make sure the custom code is working flawlessly in the new version, follow th
187187
Migrate the data
188188
----------------
189189

190-
During the upgrade of the custom modules, you might have to use
191-
:doc:`upgrade scripts <../reference/upgrade_scripts>` to reflect changes from the source code
192-
to their corresponding data. Together with the upgrade scripts, you can also make use of the
193-
:doc:`../reference/upgrade_utils` and its helper functions.
190+
During the upgrade of the custom modules, you might have to use :doc:`upgrade scripts
191+
<../reference/upgrades/upgrade_scripts>` to reflect changes from the source code to their
192+
corresponding data. Together with the upgrade scripts, you can also make use of the
193+
:doc:`../reference/upgrades/upgrade_utils` and its helper functions.
194194

195195
- Any technical data that was renamed during the upgrade of the custom code (models, fields,
196196
external identifiers) should be renamed using upgrade scripts to avoid data loss during the
@@ -220,7 +220,7 @@ to their corresponding data. Together with the upgrade scripts, you can also mak
220220
"""
221221
)
222222
223-
Check the documentation for more information on :doc:`../reference/upgrade_scripts`.
223+
Check the documentation for more information on :doc:`../reference/upgrades/upgrade_scripts`.
224224

225225
Upgrade scripts can also be used to:
226226

content/developer/reference.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ Reference
1515
reference/user_interface
1616
reference/standard_modules
1717
reference/cli
18-
reference/upgrade_scripts
19-
reference/upgrade_utils
18+
reference/upgrades
2019
reference/external_api
2120
reference/extract_api

content/developer/reference/upgrade_utils.rst

Lines changed: 0 additions & 279 deletions
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
:nosearch:
2+
3+
========
4+
Upgrades
5+
========
6+
7+
.. toctree::
8+
:titlesonly:
9+
10+
upgrades/upgrade_scripts
11+
upgrades/upgrade_utils

content/developer/reference/upgrade_scripts.rst renamed to content/developer/reference/upgrades/upgrade_scripts.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ module (including Odoo's major version and the module's minor version) and `{pre
2626
the file that needs to be executed. The file's name will determine the :ref:`phase
2727
<upgrade-scripts/phases>` and order in which it is executed for that module and version.
2828

29+
.. note::
30+
From Odoo 13 the top-level directory for the upgrade scripts can also be named `upgrades`. This
31+
naming is preferred since it has the correct meaning: *migrate* can be confused with *moving out
32+
of Odoo*. Thus :file:`$module/upgrades/$version/` is also valid.
33+
2934
.. note::
3035
Upgrade scripts are only executed when the module is being updated. Therefore, the
3136
module's minor version set in the `$version` directory needs to be higher than the module's

0 commit comments

Comments
 (0)