odoo/documentation#13553
Created by fw-bot
Statuses:
- ci/documentation: (runtime 934s)
- ci/codeowner_coverage: (runtime 15s)
- label
- odoo-dev:saas-18.3-16.0-improve_upg_utils_docs-afu-438796-fw
- head
- 10b97e2b29cf1a5f1ad9df00beb2bedf85d7b708
- merged
- 4 days ago by Upgrade, Alvaro Fuentes Suarez (afu)
odoo/documentation | |
---|---|
16.0 | #13519 |
17.0 | #13525 |
18.0 | #13547 |
saas-18.1 | #13549 |
saas-18.2 | #13551 |
saas-18.3 | #13553 |
master | #13554 |
[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