summaryrefslogtreecommitdiff
path: root/doc/_extensions
diff options
context:
space:
mode:
authorSébastien Mottet (oms) <oms@odoo.com>2020-10-27 16:23:44 +0000
committerSébastien Mottet (oms) <oms@odoo.com>2020-11-17 15:41:57 +0000
commitaf486cb87a0086d29ea45a31f3667458ad73e7fd (patch)
treebd638d23da43f319ba6fa879a3479768bd73d9eb /doc/_extensions
parent4265a131d6ee26c6dbe6f59ea98c18d9f6827844 (diff)
[DOC] A doc page for the extract API
This doc page details the extract API and has the following structure: - Service explanation. - Expected successful flow - Description of the 3 routes (request and response structure) - /parse - /get_results - /validate - Hint for integration testing closes odoo/odoo#61051 Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
Diffstat (limited to 'doc/_extensions')
-rw-r--r--doc/_extensions/odoo_ext/translator.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/_extensions/odoo_ext/translator.py b/doc/_extensions/odoo_ext/translator.py
index 982e6040c44..914d0a81313 100644
--- a/doc/_extensions/odoo_ext/translator.py
+++ b/doc/_extensions/odoo_ext/translator.py
@@ -515,6 +515,20 @@ class BootstrapTranslator(nodes.NodeVisitor, object):
self.body.append(self.starttag(node, 'a', **attrs))
def depart_reference(self, node):
self.body.append(u'</a>')
+ def visit_download_reference(self, node):
+ # type: (nodes.Node) -> None
+ if node.hasattr('filename'):
+ self.body.append(
+ '<a class="reference download internal" href="%s" download="">' %
+ posixpath.join(self.builder.dlpath, node['filename']))
+ self.body.append(node.astext())
+ self.body.append('</a>')
+ raise nodes.SkipNode
+ else:
+ self.context.append('')
+ def depart_download_reference(self, node):
+ # type: (nodes.Node) -> None
+ self.body.append(self.context.pop())
def visit_target(self, node): pass
def depart_target(self, node): pass
def visit_footnote(self, node):