odoo/documentation#13519

Created by Upgrade, Alvaro Fuentes Suarez (afu)
Merged at 541c9d417257d4aa823fd28dda833c49899af490

Statuses:

label
odoo-dev:16.0-improve_upg_utils_docs-afu
head
e33f02c7672e62bb54bf638a039f5815cd662885
merged
2 days ago by Sales, Victor Feyens (vfe)
odoo/documentation
16.0 #13519
17.0 #13525 missing statuses
18.0
saas-18.1
saas-18.2
saas-18.3
master

[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