Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Board Alerts
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Board Alerts
Commits
1662102d
Commit
1662102d
authored
5 years ago
by
Vincent Hatakeyama
Browse files
Options
Downloads
Patches
Plain Diff
fix documentation generation
parent
5751236a
No related branches found
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
doc/Makefile
+3
-3
3 additions, 3 deletions
doc/Makefile
doc/autotodo.py
+8
-6
8 additions, 6 deletions
doc/autotodo.py
doc/conf.py
+10
-8
10 additions, 8 deletions
doc/conf.py
doc/manifest.py
+12
-7
12 additions, 7 deletions
doc/manifest.py
doc/requirements
+0
-2
0 additions, 2 deletions
doc/requirements
with
33 additions
and
26 deletions
doc/Makefile
+
3
−
3
View file @
1662102d
...
@@ -190,7 +190,7 @@
...
@@ -190,7 +190,7 @@
@
echo
@
echo
@
echo
"Build finished. The pseudo-XML files are in
$(
BUILDDIR
)
/pseudoxml."
@
echo
"Build finished. The pseudo-XML files are in
$(
BUILDDIR
)
/pseudoxml."
autotodo
:
autotodo
:
autotodo.py
@
python
autotodo.py ../ .py TODO,FIXME,XXX
@
./
autotodo.py ../ .py TODO,FIXME,XXX
manifest
:
../__manifest__.py manifest.py
manifest
:
../__manifest__.py manifest.py
...
@@ -195,3 +195,3 @@
...
@@ -195,3 +195,3 @@
manifest
:
../__manifest__.py manifest.py
manifest
:
../__manifest__.py manifest.py
@
python
manifest.py
@
./
manifest.py
This diff is collapsed.
Click to expand it.
doc/autotodo.py
100644 → 100755
+
8
−
6
View file @
1662102d
#
-*- coding: utf-8 -*-
#
!/usr/bin/env python3
##############################################################################
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# OpenERP, Open Source Management Solution
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
##############################################################################
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# OpenERP, Open Source Management Solution
# Copyright (C) 2014 XCG Consulting
# Copyright (C) 2014
, 2018
XCG Consulting
#
#
# This program is free software: you can redistribute it and/or modify
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# it under the terms of the GNU Affero General Public License as
...
@@ -34,7 +34,8 @@
...
@@ -34,7 +34,8 @@
tags
=
sys
.
argv
[
3
].
split
(
"
,
"
)
tags
=
sys
.
argv
[
3
].
split
(
"
,
"
)
todolist
=
{
tag
:
[]
for
tag
in
tags
}
todolist
=
{
tag
:
[]
for
tag
in
tags
}
os
.
path
.
walk
(
folder
,
scan_folder
,
(
exts
,
tags
,
todolist
))
for
root
,
dirs
,
files
in
os
.
walk
(
folder
):
scan_folder
((
exts
,
tags
,
todolist
),
root
,
files
)
create_autotodo
(
folder
,
todolist
)
create_autotodo
(
folder
,
todolist
)
...
@@ -63,7 +64,8 @@
...
@@ -63,7 +64,8 @@
"
\t\t
:language: python
\n
"
"
\t\t
:language: python
\n
"
"
\t\t
:lines: %s-%s
\n
"
"
\t\t
:lines: %s-%s
\n
"
"
\t\t
:emphasize-lines: %s
\n
"
"
\t\t
:emphasize-lines: %s
\n
"
%
(
%
(
class_name
,
class_name
,
"
-
"
*
len
(
class_name
),
"
-
"
*
len
(
class_name
),
line
,
line
,
...
@@ -85,8 +87,8 @@
...
@@ -85,8 +87,8 @@
write_info
(
f
,
info
,
folder
)
write_info
(
f
,
info
,
folder
)
def
scan_folder
(
xxx_todo_changem
e
,
dirname
,
names
):
def
scan_folder
(
data_tupl
e
,
dirname
,
names
):
(
exts
,
tags
,
res
)
=
xxx_todo_changem
e
(
exts
,
tags
,
res
)
=
data_tupl
e
file_info
=
{}
file_info
=
{}
for
name
in
names
:
for
name
in
names
:
(
root
,
ext
)
=
os
.
path
.
splitext
(
name
)
(
root
,
ext
)
=
os
.
path
.
splitext
(
name
)
...
...
This diff is collapsed.
Click to expand it.
doc/conf.py
+
10
−
8
View file @
1662102d
...
@@ -306,6 +306,4 @@
...
@@ -306,6 +306,4 @@
# If true, do not generate a @detailmenu in the "Top" node's menu.
# If true, do not generate a @detailmenu in the "Top" node's menu.
# texinfo_no_detailmenu = False
# texinfo_no_detailmenu = False
todo_include_todos
=
True
# Example configuration for intersphinx: refer to the Python standard library.
# Example configuration for intersphinx: refer to the Python standard library.
...
@@ -311,8 +309,8 @@
...
@@ -311,8 +309,8 @@
# Example configuration for intersphinx: refer to the Python standard library.
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping
=
{
"
https://docs.python.org/
2
/
"
:
None
}
intersphinx_mapping
=
{
"
https://docs.python.org/
3
/
"
:
None
}
#
#
# odoo-sphinx-autodoc
# odoo-sphinx-autodoc
#
#
...
@@ -313,11 +311,11 @@
...
@@ -313,11 +311,11 @@
#
#
# odoo-sphinx-autodoc
# odoo-sphinx-autodoc
#
#
# sphinxodoo_addons
:
List
of addons
name
to load
(if empty, no addon will be loaded)
# sphinxodoo_addons:
Names
of addons to load
this_module
=
os
.
path
.
basename
(
this_module
=
os
.
path
.
basename
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))
)
)
sphinxodoo_addons
=
[
this_module
]
sphinxodoo_addons
=
[
this_module
]
...
@@ -320,8 +318,8 @@
...
@@ -320,8 +318,8 @@
this_module
=
os
.
path
.
basename
(
this_module
=
os
.
path
.
basename
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))
)
)
sphinxodoo_addons
=
[
this_module
]
sphinxodoo_addons
=
[
this_module
]
# sphinxodoo_root_path
: Path of the Odoo root directory
# sphinxodoo_root_path: Path of the Odoo root directory
sphinxodoo_root_path
=
os
.
path
.
dirname
(
sphinxodoo_root_path
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
odoo
.
__file__
))
os
.
path
.
dirname
(
os
.
path
.
abspath
(
odoo
.
__file__
))
)
)
...
@@ -325,9 +323,9 @@
...
@@ -325,9 +323,9 @@
sphinxodoo_root_path
=
os
.
path
.
dirname
(
sphinxodoo_root_path
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
odoo
.
__file__
))
os
.
path
.
dirname
(
os
.
path
.
abspath
(
odoo
.
__file__
))
)
)
# sphinxodoo_addons_path
: List of paths were Odoo addons to load are located
# sphinxodoo_addons_path: List of paths were Odoo addons to load are located
superproject_path
=
os
.
path
.
dirname
(
superproject_path
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
getenv
(
"
PWD
"
)))
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
getenv
(
"
PWD
"
)))
)
)
c
=
configparser
.
ConfigParser
()
c
=
configparser
.
ConfigParser
()
c
.
read
(
os
.
path
.
join
(
superproject_path
,
"
setup.cfg
"
))
c
.
read
(
os
.
path
.
join
(
superproject_path
,
"
setup.cfg
"
))
...
@@ -329,7 +327,7 @@
...
@@ -329,7 +327,7 @@
superproject_path
=
os
.
path
.
dirname
(
superproject_path
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
getenv
(
"
PWD
"
)))
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
getenv
(
"
PWD
"
)))
)
)
c
=
configparser
.
ConfigParser
()
c
=
configparser
.
ConfigParser
()
c
.
read
(
os
.
path
.
join
(
superproject_path
,
"
setup.cfg
"
))
c
.
read
(
os
.
path
.
join
(
superproject_path
,
"
setup.cfg
"
))
sphinxodoo_addons_path
=
[
os
.
path
.
join
(
sphinxodoo_root_path
,
"
addons
"
)
]
sphinxodoo_addons_path
=
[]
...
@@ -335,3 +333,7 @@
...
@@ -335,3 +333,7 @@
for
line
in
c
.
get
(
"
odoo_scripts
"
,
"
addon_dirs
"
,
""
).
splitlines
():
addon_dirs
=
set
(
os
.
path
.
dirname
(
path
)
for
path
in
c
.
get
(
"
odoo_scripts
"
,
"
modules
"
).
split
())
for
line
in
addon_dirs
:
sphinxodoo_addons_path
.
append
(
os
.
path
.
join
(
superproject_path
,
line
))
sphinxodoo_addons_path
.
append
(
os
.
path
.
join
(
superproject_path
,
line
))
This diff is collapsed.
Click to expand it.
doc/manifest.py
+
12
−
7
View file @
1662102d
#!/usr/bin/env python
#!/usr/bin/env python
3
###############################################################################
###############################################################################
#
#
# OpenERP, Open Source Management Solution
# OpenERP, Open Source Management Solution
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
###############################################################################
###############################################################################
#
#
# OpenERP, Open Source Management Solution
# OpenERP, Open Source Management Solution
# Copyright (C) 2016 XCG Consulting (http://www.xcg-consulting.fr/)
# Copyright (C) 2016
, 2018
XCG Consulting (http://www.xcg-consulting.fr/)
#
#
# This program is free software: you can redistribute it and/or modify
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# it under the terms of the GNU Affero General Public License as
...
@@ -18,4 +18,5 @@
...
@@ -18,4 +18,5 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#
###############################################################################
###############################################################################
import
os
...
@@ -21,5 +22,5 @@
...
@@ -21,5 +22,5 @@
import
ast
from
odoo.modules
import
load_information_from_description_file
def
main
():
def
main
():
...
@@ -23,7 +24,7 @@
...
@@ -23,7 +24,7 @@
def
main
():
def
main
():
with
open
(
"
../__manifest__.py
"
,
"
r
"
)
as
f
:
module
=
os
.
path
.
basename
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
read_data
=
f
.
read
(
)
os
.
path
.
realpath
(
__file__
)))
)
d
=
ast
.
literal_eval
(
read_data
)
d
=
load_information_from_description_file
(
module
)
with
open
(
"
manifest
"
,
"
w
"
)
as
out
:
with
open
(
"
manifest
"
,
"
w
"
)
as
out
:
...
@@ -29,5 +30,9 @@
...
@@ -29,5 +30,9 @@
with
open
(
"
manifest
"
,
"
w
"
)
as
out
:
with
open
(
"
manifest
"
,
"
w
"
)
as
out
:
out
.
write
(
d
[
"
description
"
])
manifest_content
=
(
d
[
"
description
"
]
if
"
description
"
in
d
else
d
[
"
summary
"
]
if
"
summary
"
in
d
else
""
)
out
.
write
(
manifest_content
)
if
__name__
==
"
__main__
"
:
if
__name__
==
"
__main__
"
:
...
...
This diff is collapsed.
Click to expand it.
doc/requirements
deleted
100644 → 0
+
0
−
2
View file @
5751236a
sphinx
git+https://github.com/OCA/odoo-sphinx-autodoc#egg=odoo-sphinx-autodoc
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment