odoo/documentation#13547

Created by fw-bot
Merged at a4a5c9d4a0c396f533a6be8b641c4c111c690e58

Statuses:

label
odoo-dev:18.0-16.0-improve_upg_utils_docs-afu-438586-fw
head
bd5cd8019c2f5304360a7d478aebe28f7ef688ee
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

Forward-Port-Of: #13525
Forward-Port-Of: #13519