# HG changeset patch
# User Vincent Hatakeyama <vincent.hatakeyama@xcg-consulting.fr>
# Date 1675845217 -3600
#      Wed Feb 08 09:33:37 2023 +0100
# Branch 16.0
# Node ID 0ce14b51bba18c794989839bf2bb9cd55f87ff45
# Parent  e9c737d098dbeea67881e65bd85568f52ee96ba9
📚 use package version in documentation

diff --git a/doc/conf.py b/doc/conf.py
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -11,6 +11,7 @@
 import configparser
 import os
 import sys
+from importlib.metadata import version
 
 from odoo_scripts.config import Configuration
 
@@ -29,10 +30,8 @@
 extensions = [
     "sphinx.ext.autodoc",
     "sphinx.ext.doctest",
-    "sphinx.ext.intersphinx",
     "sphinx.ext.todo",
     "sphinx.ext.coverage",
-    "sphinx.ext.graphviz",
     "sphinx.ext.viewcode",
     "sphinxodoo.ext.autodoc",
 ]
@@ -50,18 +49,19 @@
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the
 # built documents.
-#
+
+# The full version, including alpha/beta/rc tags.
+release = version("odoo-addon-converter")
+# The short X.Y version.
+version = ".".join(release.split(".")[:2])
+
 with open(os.path.join("..", "__manifest__.py"), "r") as f:
     read_data = f.read()
 d = ast.literal_eval(read_data)
-# The full version, including alpha/beta/rc tags.
-release = d["version"]
-# The short X.Y version.
-version = ".".join(release.split(".")[:4])
 
 # General information about the project.
 project = d["name"]
-copyright = "2020, 2022 XCG Consulting"
+copyright = "2020, 2022, 2023 XCG Consulting"
 author = d["author"]
 module_nospace = project.replace(" ", "")
 module_description = d.get("summary", "")
@@ -141,12 +141,8 @@
     )
 ]
 
-# Example configuration for intersphinx: refer to the Python standard library.
-intersphinx_mapping = {"https://docs.python.org/3/": None}
-
-
 #
-# odoo-sphinx-autodoc
+# sphinx-odoo-autodoc
 #
 
 # sphinxodoo_addons : List of addons name to load (if empty, no addon will be loaded)