summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-10-23 18:02:45 +0200
committerChristophe Simonis <chs@odoo.com>2018-10-23 18:02:45 +0200
commitce2eb8464b4387e98cd3b1081340cdebb586f2b3 (patch)
tree416031da80cbd85804f2b1ff48ccd6f763dab3b3 /doc
parentef670016e6df436e30fef12d1915c6cec2b9d62a (diff)
parentd5cc05c9948c744f8f011250380cea20f9f859b2 (diff)
[MERGE] forward port branch 10.0 up to d5cc05c9948
Diffstat (limited to 'doc')
-rw-r--r--doc/_extensions/github_link.py9
-rw-r--r--doc/_extensions/odoo_ext/__init__.py11
-rw-r--r--doc/howtos/backend/exercise-report8
-rw-r--r--doc/reference/orm.rst6
4 files changed, 17 insertions, 17 deletions
diff --git a/doc/_extensions/github_link.py b/doc/_extensions/github_link.py
index cd0c5380621..b09177cf6e2 100644
--- a/doc/_extensions/github_link.py
+++ b/doc/_extensions/github_link.py
@@ -94,11 +94,12 @@ def add_doc_link(app, pagename, templatename, context, doctree):
if not app.config.github_user and app.config.github_project:
return
- # FIXME: find other way to recover current document's source suffix
- # in Sphinx 1.3 it's possible to have mutliple source suffixes and that
- # may be useful in the future
source_suffix = app.config.source_suffix
- source_suffix = source_suffix if isinstance(source_suffix, basestring) else source_suffix[0]
+ # in 1.3 source_suffix can be a list
+ # in 1.8 source_suffix can be a mapping
+ # FIXME: will break if we ever add support for !rst markdown documents maybe
+ if not isinstance(source_suffix, basestring):
+ source_suffix = next(iter(source_suffix))
# can't use functools.partial because 3rd positional is line not mode
context['github_link'] = lambda mode='edit': make_github_link(
app, 'doc/%s%s' % (pagename, source_suffix), mode=mode)
diff --git a/doc/_extensions/odoo_ext/__init__.py b/doc/_extensions/odoo_ext/__init__.py
index 0ec55620497..c1637623e62 100644
--- a/doc/_extensions/odoo_ext/__init__.py
+++ b/doc/_extensions/odoo_ext/__init__.py
@@ -8,10 +8,13 @@ import sphinx.environment
import sphinx.builders.html
from docutils import nodes
def setup(app):
- if getattr(app.config, 'html_translator_class', None):
- app.warn("Overriding the explicitly set html_translator_class setting",
- location="odoo extension")
- app.config.html_translator_class = 'odoo_ext.translator.BootstrapTranslator'
+ if hasattr(app, 'set_translator'):
+ app.set_translator('html', translator.BootstrapTranslator)
+ else:
+ if getattr(app.config, 'html_translator_class', None):
+ app.warn("Overriding the explicitly set html_translator_class setting",
+ location="odoo extension")
+ app.config.html_translator_class = 'odoo_ext.translator.BootstrapTranslator'
switcher.setup(app)
app.add_config_value('odoo_cover_default', None, 'env')
diff --git a/doc/howtos/backend/exercise-report b/doc/howtos/backend/exercise-report
index 08ac677b5c0..00304254583 100644
--- a/doc/howtos/backend/exercise-report
+++ b/doc/howtos/backend/exercise-report
@@ -3,8 +3,8 @@
Index: addons/openacademy/__manifest__.py
===================================================================
---- addons.orig/openacademy/__manifest__.py 2014-08-26 17:26:21.535783052 +0200
-+++ addons/openacademy/__manifest__.py 2014-08-26 17:26:21.531783052 +0200
+--- addons.orig/openacademy/__manifest__.py 2014-08-29 08:39:43.975536806 +0200
++++ addons/openacademy/__manifest__.py 2014-08-29 08:39:52.000000000 +0200
@@ -21,7 +21,7 @@
'version': '0.1',
@@ -14,10 +14,6 @@ Index: addons/openacademy/__manifest__.py
# always loaded
'data': [
-Index: addons/openacademy/__manifest__.py
-===================================================================
---- addons.orig/openacademy/__manifest__.py 2014-08-29 08:39:43.975536806 +0200
-+++ addons/openacademy/__manifest__.py 2014-08-29 08:39:52.000000000 +0200
@@ -30,6 +30,7 @@
'templates.xml',
'views/openacademy.xml',
diff --git a/doc/reference/orm.rst b/doc/reference/orm.rst
index bec009411b7..a8a95895b01 100644
--- a/doc/reference/orm.rst
+++ b/doc/reference/orm.rst
@@ -942,17 +942,17 @@ them (e.g. to change their default sort order):
.. literalinclude:: ../../odoo/addons/test_documentation_examples/extension.py
:language: python
- :lines: 5-
+ :lines: 7-
.. literalinclude:: ../../odoo/addons/test_documentation_examples/tests/test_extension.py
:language: python
- :lines: 8,13
+ :lines: 10,15
will yield:
.. literalinclude:: ../../odoo/addons/test_documentation_examples/tests/test_extension.py
:language: text
- :lines: 11
+ :lines: 13
.. note:: it will also yield the various :ref:`automatic fields
<reference/orm/model/automatic>` unless they've been disabled