odoo/documentation#13525
Created by fw-bot
Blocked
- Merge method
- Review
-
CI
- ci/documentation: (runtime 1012s)
- ci/codeowner_coverage: (runtime 5s)
- label
- odoo-dev:17.0-16.0-improve_upg_utils_docs-afu-438515-fw
- head
- 040504158bb97f4b7fcad1c365d6d6b2f44158d9
odoo/documentation | |
---|---|
16.0 | #13519 |
17.0 | #13525 missing statuses |
18.0 | |
saas-18.1 | |
saas-18.2 | |
saas-18.3 | |
master |
[FW][IMP] conf.py: strip module path from upgrade utils
The full module path in upgrade utils docs causes confusion for users.
See issues odoo/upgrade-util#272 and odoo/upgrade-util#175.
All utils we document online should be used via the top-level module
--i.e. util.name
instead of util.submodule.name
Stripping the module path can be achieved in the configuration with
add_module_name=False
Unfortunately this is a global setting that could affect other parts of
Odoo documentation. Thus in current patch we strip the module path from
the signature of odoo.upgrade.util
functions and classes.
Technical links:
https://www.sphinx-doc.org/en/master/extdev/event_callbacks.html#event-object-description-transform
https://www.sphinx-doc.org/en/master/extdev/nodes.html#sphinx.addnodes.desc_signature
https://github.com/sphinx-doc/sphinx/blob/v4.3.2/sphinx/domains/python.py#L512
https://sphinx-docutils.readthedocs.io/en/latest/docutils.nodes.html#docutils.nodes
Forward-Port-Of: #13519