Skip to content

Commit 76a7e10

Browse files
committed
Cherry pick of 05499f0 failed
stdout: stderr: 15:25:46.936096 git.c:463 trace: built-in: git cherry-pick 05499f0 error: Cherry-picking is not possible because you have unmerged files. hint: Fix them up in the work tree, and then use 'git add/rm <file>' hint: as appropriate to mark resolution and make a commit. fatal: cherry-pick failed ---------- status:
1 parent 2810daf commit 76a7e10

File tree

9 files changed

+203
-312
lines changed

9 files changed

+203
-312
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- Python dependencies listed in the file `requirements.txt`.
1010
- Make
1111
- A local copy of the [odoo/odoo repository](https://github.com/odoo/odoo) (optional)
12+
- A local copy of the [odoo/upgrade-util repository](https://github.com/odoo/upgrade-util) (optional)
1213

1314
### Instructions
1415

@@ -18,8 +19,9 @@
1819
3. See [this guide](https://www.odoo.com/documentation/latest/contributing/documentation.html)
1920
for more detailed instructions.
2021

21-
Optional: place your local copy of the `odoo/odoo` repository in the parent directory or in the root
22-
directory of the documentation to build the latter with the documented Python docstrings.
22+
Optional: place your local copy of the `odoo/odoo` and `odoo/upgrade-util` repositories in
23+
the parent directory or in the root directory of the documentation to build the latter
24+
with the documented Python docstrings.
2325

2426
## Contribute to the documentation
2527

conf.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,24 @@
133133
)
134134
odoo_dir_in_path = True
135135

136+
if odoo_dir_in_path:
137+
upgrade_util_dir = next(filter(Path.exists, [Path('upgrade-util'), Path('../upgrade-util')]), None)
138+
if not upgrade_util_dir:
139+
_logger.warning(
140+
"Could not find Upgrade Utils sources directory in `upgrade_util`.\n"
141+
"The developer documentation will be built but autodoc directives will be skipped.\n"
142+
"In order to fully build the 'Developer' documentation, clone the repository with "
143+
"`git clone https://github.com/odoo/upgrade-util` or create a symbolic link."
144+
)
145+
odoo_dir_in_path = False
146+
else:
147+
_logger.info(
148+
"Found Upgrade Util sources in %(directory)s",
149+
{'directory': upgrade_util_dir.resolve()},
150+
)
151+
from odoo import upgrade
152+
upgrade.__path__.append(str((upgrade_util_dir / 'src').resolve()))
153+
136154
# Mapping between odoo models related to master data and the declaration of the
137155
# data. This is used to point users to available xml_ids when giving values for
138156
# a field with the autodoc_field extension.
@@ -250,6 +268,9 @@
250268
sphinx_tabs_disable_tab_closing = True
251269
sphinx_tabs_disable_css_loading = True
252270

271+
# Autodoc ordering
272+
autodoc_member_order = 'bysource'
273+
253274
#=== Options for HTML output ===#
254275

255276
html_theme = 'odoo_theme'

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: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Reference
1010
.. toctree::
1111
:maxdepth: 3
1212

13+
<<<<<<< HEAD
1314
reference/backend
1415
reference/frontend
1516
reference/user_interface
@@ -19,3 +20,23 @@ Reference
1920
reference/upgrade_utils
2021
reference/external_api
2122
reference/extract_api
23+
||||||| parent of e5d9ab3ed (temp)
24+
reference/backend
25+
reference/frontend
26+
reference/user_interface
27+
reference/standard_modules
28+
reference/cli
29+
reference/upgrade_scripts
30+
reference/upgrade_utils
31+
reference/external_api
32+
reference/extract_api
33+
=======
34+
reference/backend
35+
reference/frontend
36+
reference/user_interface
37+
reference/standard_modules
38+
reference/cli
39+
reference/upgrades
40+
reference/external_api
41+
reference/extract_api
42+
>>>>>>> e5d9ab3ed (temp)

content/developer/reference/upgrade_utils.rst

Lines changed: 0 additions & 279 deletions
This file was deleted.

0 commit comments

Comments
 (0)