Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Converter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
XCG
Odoo modules
Converter
Merge requests
!62
Backport 18.0 changes
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Backport 18.0 changes
topic/17.0/backport
into
branch/17.0
Overview
0
Commits
18
Pipelines
0
Changes
2
Merged
Vincent Hatakeyama
requested to merge
topic/17.0/backport
into
branch/17.0
1 month ago
Overview
0
Commits
18
Pipelines
0
Changes
2
Expand
0
0
Merge request reports
Viewing commit
3cf99f4b
Prev
Next
Show latest version
2 files
+
19
−
14
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
3cf99f4b
mypy
· 3cf99f4b
Vincent Hatakeyama
authored
1 month ago
doc/conf.py
+
16
−
11
Options
@@ -15,7 +15,7 @@
from
importlib.metadata
import
version
as
import_version
import
odoo
# type: ignore[import-untyped]
from
odoo_scripts.config
import
Configuration
from
odoo_scripts.config
import
Configuration
# type: ignore[import-untyped]
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@@ -158,5 +158,5 @@
os
.
path
.
dirname
(
os
.
path
.
abspath
(
odoo
.
__file__
))
)
# sphinxodooautodoc_addons_path : List of paths were Odoo addons to load are located
c
=
None
c
:
Configuration
|
None
=
None
# find setup file of superproject, if any
@@ -162,5 +162,10 @@
# find setup file of superproject, if any
directory
=
os
.
path
.
dirname
(
os
.
getenv
(
"
PWD
"
))
pwd
=
os
.
getenv
(
"
PWD
"
)
directory
:
str
|
None
if
pwd
is
not
None
:
directory
=
os
.
path
.
dirname
(
pwd
)
else
:
directory
=
None
while
not
c
and
directory
:
setup_path
=
os
.
path
.
join
(
directory
,
"
setup.cfg
"
)
if
os
.
path
.
isfile
(
setup_path
):
@@ -164,9 +169,9 @@
while
not
c
and
directory
:
setup_path
=
os
.
path
.
join
(
directory
,
"
setup.cfg
"
)
if
os
.
path
.
isfile
(
setup_path
):
c
=
configparser
.
ConfigParser
()
c
.
read
(
setup_path
)
if
c
.
has_section
(
"
odoo_scripts
"
):
setup_cfg
=
configparser
.
ConfigParser
()
setup_cfg
.
read
(
setup_path
)
if
setup_cfg
.
has_section
(
"
odoo_scripts
"
):
# reload with odoo_scripts
c
=
Configuration
(
directory
)
else
:
@@ -182,7 +187,8 @@
if
c
:
addon_dirs
=
set
(
os
.
path
.
dirname
(
path
)
for
path
in
c
.
modules
)
for
line
in
addon_dirs
:
sphinxodooautodoc_addons_path
.
append
(
os
.
path
.
join
(
directory
,
line
))
if
directory
is
not
None
:
for
line
in
addon_dirs
:
sphinxodooautodoc_addons_path
.
append
(
os
.
path
.
join
(
directory
,
line
))
else
:
# add this directory top dir
@@ -187,8 +193,7 @@
else
:
# add this directory top dir
sphinxodooautodoc_addons_path
.
append
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
getenv
(
"
PWD
"
)))
)
if
pwd
is
not
None
:
sphinxodooautodoc_addons_path
.
append
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
pwd
)))
other_addons
=
os
.
getenv
(
"
ODOO_ADDONS_PATH
"
,
default
=
None
)
if
other_addons
:
for
addon_path
in
other_addons
.
split
(
"
,
"
):
Loading