[MERGE] Forward port of 9.0 to 10.0
To fix opw-2167071
This commit is contained in:
commit
afc32a9baf
@ -47,6 +47,7 @@
|
|||||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||||
|
|
||||||
ga('create', '{{ google_analytics_key }}', 'auto');
|
ga('create', '{{ google_analytics_key }}', 'auto');
|
||||||
|
ga('set', 'anonymizeIp', true);
|
||||||
ga('send','pageview');
|
ga('send','pageview');
|
||||||
</script>
|
</script>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
@ -79,8 +80,8 @@
|
|||||||
<li><a href="https://www.odoo.com/page/e-commerce">eCommerce</a></li>
|
<li><a href="https://www.odoo.com/page/e-commerce">eCommerce</a></li>
|
||||||
<li><a href="https://www.odoo.com/page/blog-engine">Blogs</a></li>
|
<li><a href="https://www.odoo.com/page/blog-engine">Blogs</a></li>
|
||||||
<li><a href="https://www.odoo.com/page/community-builder">Forums</a></li>
|
<li><a href="https://www.odoo.com/page/community-builder">Forums</a></li>
|
||||||
<li><a href="https://www.odoo.com/page/slides">Slides</a></li>
|
<li><a href="https://www.odoo.com/page/learning-management-system">eLearning</a></li>
|
||||||
<li><a href="https://adspike.odoo.com">SEA</a></li>
|
<li><a href="https://www.odoo.com/page/live-chat">Live Chat</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-3 o_sale_apps">
|
<div class="col-sm-3 o_sale_apps">
|
||||||
@ -97,10 +98,12 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li><a href="https://www.odoo.com/page/point-of-sale">Shops</a></li>
|
<li><a href="https://www.odoo.com/page/point-of-sale">Shops</a></li>
|
||||||
<li><a href="https://www.odoo.com/page/pos-restaurant">Restaurants</a></li>
|
<li><a href="https://www.odoo.com/page/pos-restaurant">Restaurants</a></li>
|
||||||
|
<li><a href="https://www.odoo.com/page/point-of-sale-hardware">Hardware</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="https://www.odoo.com/page/subscriptions">Subscriptions</a></li>
|
<li><a href="https://www.odoo.com/page/subscriptions">Subscriptions</a></li>
|
||||||
<li><a href="https://www.odoo.com/page/sign">Sign</a></li>
|
<li><a href="https://www.odoo.com/page/sign">Sign</a></li>
|
||||||
|
<li><a href="https://www.odoo.com/page/rental">Rental</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-3 o_operation_apps">
|
<div class="col-sm-3 o_operation_apps">
|
||||||
@ -114,12 +117,12 @@
|
|||||||
<li class="dropdown">
|
<li class="dropdown">
|
||||||
<a href="#0" class="dropdown-toggle">Human Resources</a>
|
<a href="#0" class="dropdown-toggle">Human Resources</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="https://www.odoo.com/page/recruitment">Recruitment</a></li>
|
<li><a href="https://www.odoo.com/page/referral">Referral</a></li>
|
||||||
<li><a href="https://www.odoo.com/page/employees">Employees</a></li>
|
<li><a href="https://www.odoo.com/page/employees">Employees</a></li>
|
||||||
<li><a href="https://www.odoo.com/page/expenses">Expenses</a></li>
|
<li><a href="https://www.odoo.com/page/expenses">Expenses</a></li>
|
||||||
<li><a href="https://www.odoo.com/page/appraisal">Appraisal</a></li>
|
<li><a href="https://www.odoo.com/page/appraisal">Appraisal</a></li>
|
||||||
<li><a href="https://www.odoo.com/page/fleet">Fleet</a></li>
|
<li><a href="https://www.odoo.com/page/fleet">Fleet</a></li>
|
||||||
<li><a href="https://www.odoo.com/page/leaves">Leaves</a></li>
|
<li><a href="https://www.odoo.com/page/leaves">Time Off</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="https://www.odoo.com/page/warehouse">Inventory</a></li>
|
<li><a href="https://www.odoo.com/page/warehouse">Inventory</a></li>
|
||||||
@ -133,6 +136,8 @@
|
|||||||
<li><a href="https://www.odoo.com/page/quality">Quality</a></li>
|
<li><a href="https://www.odoo.com/page/quality">Quality</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
<li><a href="https://www.odoo.com/page/helpdesk">Helpdesk</a></li>
|
||||||
|
<li><a href="https://www.odoo.com/page/field-service-management">Field Service</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-3 o_productivity_apps">
|
<div class="col-sm-3 o_productivity_apps">
|
||||||
@ -147,15 +152,23 @@
|
|||||||
<li><a href="https://www.odoo.com/page/discuss">Discuss</a></li>
|
<li><a href="https://www.odoo.com/page/discuss">Discuss</a></li>
|
||||||
<li><a href="https://www.odoo.com/page/discuss-groups">Mailing Lists</a></li>
|
<li><a href="https://www.odoo.com/page/discuss-groups">Mailing Lists</a></li>
|
||||||
<li><a href="https://www.odoo.com/page/notes">Notes</a></li>
|
<li><a href="https://www.odoo.com/page/notes">Notes</a></li>
|
||||||
<li><a href="#">Help desk</a></li>
|
|
||||||
<li><a href="#">Appointment</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="https://www.odoo.com/page/timesheet">Timesheet</a></li>
|
<li><a href="https://www.odoo.com/page/timesheet">Timesheet</a></li>
|
||||||
<li><a href="https://www.odoo.com/page/email-marketing">Email Marketing</a></li>
|
|
||||||
<li><a href="https://www.odoo.com/page/events">Events</a></li>
|
<li><a href="https://www.odoo.com/page/events">Events</a></li>
|
||||||
|
<li class="dropdown">
|
||||||
|
<a href="#0" class="dropdown-toggle">Marketing</a>
|
||||||
|
<ul>
|
||||||
|
<li><a href="https://www.odoo.com/page/marketing-automation">Automation</a></li>
|
||||||
|
<li><a href="https://www.odoo.com/page/email-marketing">Email</a></li>
|
||||||
|
<li><a href="https://www.odoo.com/page/social-marketing">Social</a></li>
|
||||||
|
<li><a href="https://www.odoo.com/page/sms-marketing">SMS</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
<li><a href="https://www.odoo.com/page/survey">Survey</a></li>
|
<li><a href="https://www.odoo.com/page/survey">Survey</a></li>
|
||||||
<li><a href="https://www.odoo.com/page/live-chat">Live Chat</a></li>
|
<li><a href="https://www.odoo.com/page/approval-workflow">Approvals</a></li>
|
||||||
|
<li><a href="https://www.odoo.com/page/appointments">Appointments</a></li>
|
||||||
|
<li><a href="https://www.odoo.com/page/documents">Documents</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -250,7 +263,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<article class="doc-body {% if 'has-toc' in meta %}doc-toc{% endif %}{% if pagename in toc%}index-category{% endif %}">
|
<article class="doc-body {% if 'has-toc' in meta %}doc-toc{% endif %} {% if pagename in toc%}index-category{% endif %}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% block body %} {% endblock %}
|
{% block body %} {% endblock %}
|
||||||
{% if pagename != master_doc %}</article>
|
{% if pagename != master_doc %}</article>
|
||||||
|
17
conf.py
17
conf.py
@ -351,8 +351,11 @@ def versionize(app, pagename, templatename, context, doctree):
|
|||||||
if not (app.config.canonical_root and app.config.versions):
|
if not (app.config.canonical_root and app.config.versions):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# remove last fragment containing the version
|
||||||
|
root = '/'.join(app.config.canonical_root.rstrip('/').split('/')[:-1])
|
||||||
|
|
||||||
context['versions'] = [
|
context['versions'] = [
|
||||||
(vs, _build_url(app.config.canonical_root, vs, pagename))
|
(vs, _build_url(root, vs, pagename))
|
||||||
for vs in app.config.versions.split(',')
|
for vs in app.config.versions.split(',')
|
||||||
if vs != app.config.version
|
if vs != app.config.version
|
||||||
]
|
]
|
||||||
@ -405,16 +408,24 @@ def canonicalize(app, pagename, templatename, context, doctree):
|
|||||||
""" Adds a 'canonical' URL for the current document in the rendering
|
""" Adds a 'canonical' URL for the current document in the rendering
|
||||||
context. Requires the ``canonical_root`` setting being set. The canonical
|
context. Requires the ``canonical_root`` setting being set. The canonical
|
||||||
branch is ``master`` but can be overridden using ``canonical_branch``.
|
branch is ``master`` but can be overridden using ``canonical_branch``.
|
||||||
|
/documentation/user/12.0/sale.html -> /documentation/user/13.0/sale.html
|
||||||
|
/documentation/user/11.0/fr/website.html -> /documentation/user/13.0/fr/website.html
|
||||||
"""
|
"""
|
||||||
if not app.config.canonical_root:
|
if not app.config.canonical_root:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# remove last fragment containing the version
|
||||||
|
root = '/'.join(app.config.canonical_root.rstrip('/').split('/')[:-1])
|
||||||
|
root += '/' + app.config.canonical_branch
|
||||||
|
current_lang = app.config.language or 'en'
|
||||||
|
|
||||||
context['canonical'] = _build_url(
|
context['canonical'] = _build_url(
|
||||||
app.config.canonical_root, app.config.canonical_branch, pagename)
|
root, (current_lang != 'en' and current_lang or ''), pagename)
|
||||||
|
|
||||||
def _build_url(root, branch, pagename):
|
def _build_url(root, branch, pagename):
|
||||||
if not branch:
|
|
||||||
root = root.rstrip('/')
|
root = root.rstrip('/')
|
||||||
|
if branch:
|
||||||
|
root += '/'
|
||||||
return "{canonical_url}{canonical_branch}/{canonical_page}".format(
|
return "{canonical_url}{canonical_branch}/{canonical_page}".format(
|
||||||
canonical_url=root,
|
canonical_url=root,
|
||||||
canonical_branch=branch,
|
canonical_branch=branch,
|
||||||
|
Loading…
Reference in New Issue
Block a user