[IMP] conf.py, *: interpolate the version and releases in the content

This commit replaces hard-coded occurrences of the version and of the
last, current and next releases' version with placeholders interpolated
at build time to avoid manually updating these after each freeze.

task-2917614

closes odoo/documentation#3142

X-original-commit: 0b9279d5
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
Antoine Vandevenne (anv)
2022-11-25 16:30:48 +00:00
parent 7a57fb3c81
commit 359ab4d028
16 changed files with 89 additions and 67 deletions
@@ -249,10 +249,10 @@ Here are some useful Git commands for your day-to-day work.
.. code-block:: console
$ cd $HOME/src/odoo
$ git switch 15.0
$ git switch {BRANCH}
$ cd $HOME/src/enterprise
$ git switch 15.0
$ git switch {BRANCH}
- Fetch and rebase:
@@ -260,11 +260,11 @@ Here are some useful Git commands for your day-to-day work.
$ cd $HOME/src/odoo
$ git fetch --all --prune
$ git rebase --autostash odoo/15.0
$ git rebase --autostash odoo/{BRANCH}
$ cd $HOME/src/enterprise
$ git fetch --all --prune
$ git rebase --autostash enterprise/15.0
$ git rebase --autostash enterprise/{BRANCH}
Code Editor
-----------
@@ -12,10 +12,10 @@ ACL stands for "Access Control List"
<howto/rdtraining>`.
To follow the exercise, it is recommended that you fetch the branch
15.0-core from the
`technical training solutions <https://github.com/odoo/technical-training-solutions/tree/15.0-core>`__ repository.
It contains a version of the module created during the core training we can use
as a starting point.
{BRANCH}-core from the `technical training solutions
<https://github.com/odoo/technical-training-solutions/tree/{BRANCH}-core>`_ repository. It
contains a version of the module created during the core training we can use as a starting
point.
So far we have mostly concerned ourselves with implementing useful features.
However in most business scenarios *security* quickly becomes a concern:
@@ -6,9 +6,9 @@ Advanced C: Master and Demo Data
.. tip:: This tutorial assumes you followed the Core Training.
To do the exercise, fetch the branch 15.0-core from the
`technical training solutions <https://github.com/odoo/technical-training-solutions/tree/15.0-core>`__ repository.
It contains a basic module we will use as a starting point
To do the exercise, fetch the branch {BRANCH}-core from the `technical training solutions
<https://github.com/odoo/technical-training-solutions/tree/{BRANCH}-core>`_ repository. It
contains a basic module we will use as a starting point
Data Types
==========
@@ -6,9 +6,9 @@ Advanced E: Python Unit Tests
.. tip:: This tutorial assumes you followed the Core Training.
To do the exercise, fetch the branch 15.0-core from the
`technical training solutions <https://github.com/odoo/technical-training-solutions/tree/15.0-core>`__ repository.
It contains a basic module we will use as a starting point
To do the exercise, fetch the branch {BRANCH}-core from the `technical training solutions
<https://github.com/odoo/technical-training-solutions/tree/{BRANCH}-core>`_ repository. It
contains a basic module we will use as a starting point
**Reference**:
`Odoo's Test Framework: Learn Best Practices <https://www.youtube.com/watch?v=JEIscps0OOQ>`__
@@ -284,7 +284,7 @@ These test classes are built on top of the ``unittest`` python module.
.. note:: For better readability, split your tests into multiple files depending on the scope of the
tests. You can also have a Common class that most of the tests should inherit from; this common
class can define the whole set up for the module. For instance in
`account <https://github.com/odoo/odoo/blob/14.0/addons/account/tests/common.py>`__.
`account <{GITHUB_PATH}/addons/account/tests/common.py>`__.
.. exercise:: Update the code so no one can:
@@ -9,11 +9,11 @@ Advanced J: PDF Reports
This tutorial assumes you have completed the :ref:`Core Training <howto/rdtraining>`
and have installed :ref:`wkhtmltopdf <setup/install/source/linux/prepare>`.
To follow the exercise, it is recommended that you fetch the branch
15.0-core from the
`technical training solutions <https://github.com/odoo/technical-training-solutions/tree/15.0-core>`__ repository.
It contains a version of the module created during the core training we can use
as a starting point.
To follow the exercise, it is recommended that you fetch the branch {BRANCH}-core from the
`technical training solutions
<https://github.com/odoo/technical-training-solutions/tree/{BRANCH}-core>`_ repository. It
contains a version of the module created during the core training we can use as a starting
point.
We were previously :ref:`introduced to QWeb <howto/rdtraining/15_qwebintro>`
in the Core Training where it was used to build a kanban view. Now we will expand on one of QWeb's
@@ -96,9 +96,10 @@ If you don't have a set of data like this already, you can either:
* Complete :ref:`howto/rdtraining/C_data` (if you haven't done so already) and add the extra
cases to your demo data (you may need to create a new database to load in the demo data).
* Manually create the data in your database.
* Copy this `data file <https://github.com/odoo/technical-training-solutions/blob/15.0-J_reports/estate/data/estate_demo.xml>`__
into a new directory (data) in your estate module and copy
`these lines <https://github.com/odoo/technical-training-solutions/blob/15.0-J_reports/estate/__manifest__.py#L21-L23>`__
* Copy this `data file
<https://github.com/odoo/technical-training-solutions/blob/{BRANCH}-J_reports/estate/data/estate_demo.xml>`_
into a new directory (data) in your estate module and copy `these lines
<https://github.com/odoo/technical-training-solutions/blob/{BRANCH}-J_reports/estate/__manifest__.py#L21-L23>`_
into your __manifest__.py file (you may need to create a new database to load in the demo data).
Before continuing, click through your data in your database and make sure your data is as expected.
@@ -10,10 +10,10 @@ Advanced K: Dashboards
access to Odoo Enterprise features.
To follow the exercise, it is recommended that you fetch the branch
15.0-core from the
`technical training solutions <https://github.com/odoo/technical-training-solutions/tree/15.0-core>`__ repository.
It contains a version of the module created during the core training we can use
as a starting point.
{BRANCH}-core from the `technical training solutions
<https://github.com/odoo/technical-training-solutions/tree/{BRANCH}-core>`_ repository. It
contains a version of the module created during the core training we can use as a starting
point.
The term "Dashboard" is used in Odoo for objects that display data, but involves different
implementations. This tutorial will only focus on the Enterprise view that is used to provide
@@ -119,9 +119,10 @@ If you don't have a set of data like this already, you can either:
* Complete :ref:`howto/rdtraining/C_data` (if you haven't done so already) and add the extra
cases to your demo data (you may need to create a new database to load in the demo data).
* Manually create the data in your database.
* Copy this `data file <https://github.com/odoo/technical-training-solutions/blob/15.0-K_dashboard/estate/data/estate_demo.xml>`__
into a new directory called ``data`` in your estate module and copy
`these lines <https://github.com/odoo/technical-training-solutions/blob/15.0-K_dashboard/estate/__manifest__.py#L21-L23>`__
* Copy this `data file
<https://github.com/odoo/technical-training-solutions/blob/{BRANCH}-K_dashboard/estate/data/estate_demo.xml>`_
into a new directory called ``data`` in your estate module and copy `these lines
<https://github.com/odoo/technical-training-solutions/blob/{BRANCH}-K_dashboard/estate/__manifest__.py#L21-L23>`_
into your __manifest__.py file (you may need to create a new database to load in the demo data).
Click through your database data and make sure it is what you expect. Of course you can add the
@@ -208,8 +209,8 @@ The `ref` attribute can be added to `<view>` elements to use a specific xml id f
no xml id is provided for a graph or pivot view then the default view will be used.
The cohort view will not work in the dashboard without a specific xml id. If you have already
created some of these views then you are welcome to add them to your dashboard! Sample graph and
pivot views are included in the
`solution code <https://github.com/odoo/technical-training-solutions/blob/15.0-K_dashboard/estate/views/estate_property_views.xml#L169-L191>`__
pivot views are included in the `solution code
<https://github.com/odoo/technical-training-solutions/blob/{BRANCH}-K_dashboard/estate/views/estate_property_views.xml#L169-L191>`_
that you are welcome to use as well.
.. exercise:: Add subviews.
@@ -363,7 +364,7 @@ graph views), then you can add ``store=False`` to it and it will not show.
The *select* and *from* methods remain the same.
`Here is an example <https://github.com/odoo/odoo/blob/14.0/addons/account/report/account_invoice_report.py>`__
`Here is an example <{GITHUB_PATH}/addons/account/report/account_invoice_report.py>`__
of a report that depends on the currently selected companies (in a multi-company environment) context to
determine the currency exchange rates to use for accurately displaying amounts when the selected companies
have different currencies.