update replace rst-class to container
This commit is contained in:
parent
fb57c796ee
commit
d9cb9d975f
4
Makefile
4
Makefile
@ -64,7 +64,7 @@ clean:
|
|||||||
|
|
||||||
html: $(HTML_BUILD_DIR)/_static/style.css
|
html: $(HTML_BUILD_DIR)/_static/style.css
|
||||||
@echo "Starting build..."
|
@echo "Starting build..."
|
||||||
$(SPHINX_BUILD) -c $(CONFIG_DIR) -b html $(SPHINXOPTS) $(SOURCE_DIR) $(HTML_BUILD_DIR)
|
$(SPHINX_BUILD) -q -c $(CONFIG_DIR) -b html $(SPHINXOPTS) $(SOURCE_DIR) $(HTML_BUILD_DIR)
|
||||||
@echo "Build finished."
|
@echo "Build finished."
|
||||||
|
|
||||||
livehtml: SPHINXOPTS += -A collapse_menu=True
|
livehtml: SPHINXOPTS += -A collapse_menu=True
|
||||||
@ -74,7 +74,7 @@ livehtml:
|
|||||||
--port 8000 --host $(SERVER_IP) \
|
--port 8000 --host $(SERVER_IP) \
|
||||||
--watch $(THEME) --watch $(LOCALE) --watch $(STATIC) --watch $(REDIRECTS) --watch $(THEME_STATIC) --watch . \
|
--watch $(THEME) --watch $(LOCALE) --watch $(STATIC) --watch $(REDIRECTS) --watch $(THEME_STATIC) --watch . \
|
||||||
--pre-build "sh -c 'mkdir -p $(HTML_BUILD_DIR)/_static && python3 -m pysassc $(THEME)/static/style.scss $(HTML_BUILD_DIR)/_static/style.css'" \
|
--pre-build "sh -c 'mkdir -p $(HTML_BUILD_DIR)/_static && python3 -m pysassc $(THEME)/static/style.scss $(HTML_BUILD_DIR)/_static/style.css'" \
|
||||||
$(SPHINXOPTS) -c $(CONFIG_DIR) -b html
|
$(SPHINXOPTS) -c $(CONFIG_DIR) -b html -q
|
||||||
|
|
||||||
|
|
||||||
# To call *after* `make html`
|
# To call *after* `make html`
|
||||||
|
@ -9,24 +9,24 @@ custom-js: accounts.js,chart-of-accounts.js,entries.js,misc.js,reconciliation.js
|
|||||||
```{eval-rst}
|
```{eval-rst}
|
||||||
.. h:div:: intro-list
|
.. h:div:: intro-list
|
||||||
|
|
||||||
.. rst-class:: intro-balance
|
.. container:: intro-balance
|
||||||
|
|
||||||
The **Balance Sheet** is a snapshot of the company's finances at a specific date (as opposed to
|
The **Balance Sheet** is a snapshot of the company's finances at a specific date (as opposed to
|
||||||
the Profit and Loss, which is an analysis over a period).
|
the Profit and Loss, which is an analysis over a period).
|
||||||
|
|
||||||
* .. rst-class:: intro-assets
|
* .. container:: intro-assets
|
||||||
|
|
||||||
**Assets** represent the company's wealth and the goods it owns. Fixed assets include buildings
|
**Assets** represent the company's wealth and the goods it owns. Fixed assets include buildings
|
||||||
and offices, while current assets include bank accounts and cash. The money owed by a client is
|
and offices, while current assets include bank accounts and cash. The money owed by a client is
|
||||||
an asset. An employee is not an asset.
|
an asset. An employee is not an asset.
|
||||||
|
|
||||||
* .. rst-class:: intro-liabilities
|
* .. container:: intro-liabilities
|
||||||
|
|
||||||
**Liabilities** are obligations from past events that the company will have to pay in the
|
**Liabilities** are obligations from past events that the company will have to pay in the
|
||||||
future (utility bills, debts, unpaid suppliers). Liabilities could also be defined as a source
|
future (utility bills, debts, unpaid suppliers). Liabilities could also be defined as a source
|
||||||
of financing which is provided to the company, also called *leverage*.
|
of financing which is provided to the company, also called *leverage*.
|
||||||
|
|
||||||
* .. rst-class:: intro-equity
|
* .. container:: intro-equity
|
||||||
|
|
||||||
**Equity** is the amount of the funds contributed by the owners of the company (founders or
|
**Equity** is the amount of the funds contributed by the owners of the company (founders or
|
||||||
shareholders) plus previously retained earnings (or losses). Each year, net profits (or losses)
|
shareholders) plus previously retained earnings (or losses). Each year, net profits (or losses)
|
||||||
@ -46,25 +46,25 @@ A difference is made between **assets** and **expenses**:
|
|||||||
```{eval-rst}
|
```{eval-rst}
|
||||||
.. h:div:: intro-list
|
.. h:div:: intro-list
|
||||||
|
|
||||||
.. rst-class:: intro-p-l
|
.. container:: intro-p-l
|
||||||
|
|
||||||
The **profit and loss** (P&L) report shows the company's performance over a specific period of
|
The **profit and loss** (P&L) report shows the company's performance over a specific period of
|
||||||
time, usually a quarter or a fiscal year.
|
time, usually a quarter or a fiscal year.
|
||||||
|
|
||||||
* .. rst-class:: intro-gross-profit
|
* .. container:: intro-gross-profit
|
||||||
|
|
||||||
The **revenue** refers to the money earned by the company by selling goods and/or services.
|
The **revenue** refers to the money earned by the company by selling goods and/or services.
|
||||||
|
|
||||||
* .. rst-class:: intro-gross-profit
|
* .. container:: intro-gross-profit
|
||||||
|
|
||||||
The **cost of goods sold** (COGS, or also known as "Cost of Sale") refers to the sale of
|
The **cost of goods sold** (COGS, or also known as "Cost of Sale") refers to the sale of
|
||||||
goods' costs (e.g., the cost of the materials and labor used to create the goods).
|
goods' costs (e.g., the cost of the materials and labor used to create the goods).
|
||||||
|
|
||||||
* .. rst-class:: intro-gross-profit
|
* .. container:: intro-gross-profit
|
||||||
|
|
||||||
The **Gross profit** equals the revenues from sales minus the cost of goods sold.
|
The **Gross profit** equals the revenues from sales minus the cost of goods sold.
|
||||||
|
|
||||||
* .. rst-class:: intro-opex
|
* .. container:: intro-opex
|
||||||
|
|
||||||
**Operating expenses** (OPEX) include administration, sales and R&D salaries, rent and
|
**Operating expenses** (OPEX) include administration, sales and R&D salaries, rent and
|
||||||
utilities, miscellaneous costs, insurances, and anything beyond the costs of products sold
|
utilities, miscellaneous costs, insurances, and anything beyond the costs of products sold
|
||||||
@ -78,7 +78,7 @@ A difference is made between **assets** and **expenses**:
|
|||||||
```
|
```
|
||||||
|
|
||||||
```{eval-rst}
|
```{eval-rst}
|
||||||
.. rst-class:: doc-aside
|
.. container:: doc-aside
|
||||||
```
|
```
|
||||||
|
|
||||||
```{eval-rst}
|
```{eval-rst}
|
||||||
@ -177,7 +177,7 @@ Reconciliation is performed automatically by the system when:
|
|||||||
|
|
||||||
.. rubric:: Customer Statement Example
|
.. rubric:: Customer Statement Example
|
||||||
|
|
||||||
.. rst-class:: table-sm d-c-table
|
.. container:: table-sm d-c-table
|
||||||
|
|
||||||
+-------------------------+-------------------------+-----------------------+
|
+-------------------------+-------------------------+-----------------------+
|
||||||
|Accounts Receivable |Debit |Credit |
|
|Accounts Receivable |Debit |Credit |
|
||||||
@ -217,7 +217,7 @@ the bank reconciliation process is finished, the balance on the bank account in
|
|||||||
the bank statement's balance.
|
the bank statement's balance.
|
||||||
|
|
||||||
```{eval-rst}
|
```{eval-rst}
|
||||||
.. rst-class:: checks-handling
|
.. container:: checks-handling
|
||||||
```
|
```
|
||||||
|
|
||||||
## Checks Handling
|
## Checks Handling
|
||||||
@ -233,7 +233,7 @@ There are two approaches to managing checks and internal wire transfers:
|
|||||||
The first journal entry is created by registering the payment on the
|
The first journal entry is created by registering the payment on the
|
||||||
invoice. The second one is created when registering the bank statement.
|
invoice. The second one is created when registering the bank statement.
|
||||||
|
|
||||||
.. rst-class:: table-sm d-c-table
|
.. container:: table-sm d-c-table
|
||||||
|
|
||||||
+-------------------------+--------------+------------+---------------+
|
+-------------------------+--------------+------------+---------------+
|
||||||
|Account |Debit |Credit |Reconciliation |
|
|Account |Debit |Credit |Reconciliation |
|
||||||
@ -243,7 +243,7 @@ There are two approaches to managing checks and internal wire transfers:
|
|||||||
|Undeposited funds |100 | |Check 0123 |
|
|Undeposited funds |100 | |Check 0123 |
|
||||||
+-------------------------+--------------+------------+---------------+
|
+-------------------------+--------------+------------+---------------+
|
||||||
|
|
||||||
.. rst-class:: table-sm d-c-table
|
.. container:: table-sm d-c-table
|
||||||
|
|
||||||
+-------------------------+--------------+------------+---------------+
|
+-------------------------+--------------+------------+---------------+
|
||||||
|Account |Debit |Credit |Reconciliation |
|
|Account |Debit |Credit |Reconciliation |
|
||||||
@ -261,7 +261,7 @@ There are two approaches to managing checks and internal wire transfers:
|
|||||||
reconciling the bank statement, the statement line is linked to the
|
reconciling the bank statement, the statement line is linked to the
|
||||||
existing journal entry.
|
existing journal entry.
|
||||||
|
|
||||||
.. rst-class:: table-sm d-c-table
|
.. container:: table-sm d-c-table
|
||||||
|
|
||||||
+-------------------------+--------------+------------+---------------+---------------+
|
+-------------------------+--------------+------------+---------------+---------------+
|
||||||
|Account |Debit |Credit |Reconciliation |Bank Statement |
|
|Account |Debit |Credit |Reconciliation |Bank Statement |
|
||||||
|
@ -1112,7 +1112,7 @@ Avoid creating hyper-specific classes and variable names. When naming nested ele
|
|||||||
"Grandchild" approach.
|
"Grandchild" approach.
|
||||||
|
|
||||||
```{eval-rst}
|
```{eval-rst}
|
||||||
.. rst-class:: bg-light
|
.. container:: bg-light
|
||||||
```
|
```
|
||||||
|
|
||||||
```{eval-rst}
|
```{eval-rst}
|
||||||
|
@ -100,7 +100,7 @@ is to use a header tag (`<h1>`, `<h2>`, ...). Besides reboot rules, mostly all t
|
|||||||
styles defined by Odoo.
|
styles defined by Odoo.
|
||||||
|
|
||||||
```{eval-rst}
|
```{eval-rst}
|
||||||
.. rst-class:: bg-light
|
.. container:: bg-light
|
||||||
```
|
```
|
||||||
|
|
||||||
```{eval-rst}
|
```{eval-rst}
|
||||||
|
@ -311,7 +311,7 @@ When working with recordsets, it is almost always better to batch operations.
|
|||||||
Don't call a method that runs SQL queries while looping over a recordset because it will do so
|
Don't call a method that runs SQL queries while looping over a recordset because it will do so
|
||||||
for each record of the set.
|
for each record of the set.
|
||||||
|
|
||||||
.. rst-class:: bad-example
|
.. container:: bad-example
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
def _compute_count(self):
|
def _compute_count(self):
|
||||||
@ -322,7 +322,7 @@ When working with recordsets, it is almost always better to batch operations.
|
|||||||
Instead, replace the `search_count` with a `_read_group` to execute one SQL query for the entire
|
Instead, replace the `search_count` with a `_read_group` to execute one SQL query for the entire
|
||||||
batch of records.
|
batch of records.
|
||||||
|
|
||||||
.. rst-class:: good-example
|
.. container:: good-example
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
def _compute_count(self):
|
def _compute_count(self):
|
||||||
@ -341,7 +341,7 @@ When working with recordsets, it is almost always better to batch operations.
|
|||||||
.. example::
|
.. example::
|
||||||
Don't create records one after another.
|
Don't create records one after another.
|
||||||
|
|
||||||
.. rst-class:: bad-example
|
.. container:: bad-example
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
for name in ['foo', 'bar']:
|
for name in ['foo', 'bar']:
|
||||||
@ -350,7 +350,7 @@ When working with recordsets, it is almost always better to batch operations.
|
|||||||
Instead, accumulate the create values and call the `create` method on the batch. Doing so has
|
Instead, accumulate the create values and call the `create` method on the batch. Doing so has
|
||||||
mostly no impact and helps the framework optimize fields computation.
|
mostly no impact and helps the framework optimize fields computation.
|
||||||
|
|
||||||
.. rst-class:: good-example
|
.. container:: good-example
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
create_values = []
|
create_values = []
|
||||||
@ -363,7 +363,7 @@ When working with recordsets, it is almost always better to batch operations.
|
|||||||
.. example::
|
.. example::
|
||||||
Fail to prefetch the fields of a recordset while browsing a single record inside a loop.
|
Fail to prefetch the fields of a recordset while browsing a single record inside a loop.
|
||||||
|
|
||||||
.. rst-class:: bad-example
|
.. container:: bad-example
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
for record_id in record_ids:
|
for record_id in record_ids:
|
||||||
@ -372,7 +372,7 @@ When working with recordsets, it is almost always better to batch operations.
|
|||||||
|
|
||||||
Instead, browse the entire recordset first.
|
Instead, browse the entire recordset first.
|
||||||
|
|
||||||
.. rst-class:: good-example
|
.. container:: good-example
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
records = model.browse(record_ids)
|
records = model.browse(record_ids)
|
||||||
@ -404,7 +404,7 @@ data correctly.
|
|||||||
For a given problem, let's consider a naive algorithm crafted with two nested loops for which the
|
For a given problem, let's consider a naive algorithm crafted with two nested loops for which the
|
||||||
complexity in in O(n²).
|
complexity in in O(n²).
|
||||||
|
|
||||||
.. rst-class:: bad-example
|
.. container:: bad-example
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
for record in self:
|
for record in self:
|
||||||
@ -415,7 +415,7 @@ data correctly.
|
|||||||
|
|
||||||
Assuming that all results have a different id, we can prepare the data to reduce the complexity.
|
Assuming that all results have a different id, we can prepare the data to reduce the complexity.
|
||||||
|
|
||||||
.. rst-class:: good-example
|
.. container:: good-example
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
mapped_result = {result['id']: result['foo'] for result in results}
|
mapped_result = {result['id']: result['foo'] for result in results}
|
||||||
@ -427,7 +427,7 @@ data correctly.
|
|||||||
.. example::
|
.. example::
|
||||||
Choosing the bad data structure to hold the input can lead to quadratic complexity.
|
Choosing the bad data structure to hold the input can lead to quadratic complexity.
|
||||||
|
|
||||||
.. rst-class:: bad-example
|
.. container:: bad-example
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
invalid_ids = self.search(domain).ids
|
invalid_ids = self.search(domain).ids
|
||||||
@ -439,7 +439,7 @@ data correctly.
|
|||||||
|
|
||||||
Instead, prefer using set operations like casting `invalid_ids` to a set.
|
Instead, prefer using set operations like casting `invalid_ids` to a set.
|
||||||
|
|
||||||
.. rst-class:: good-example
|
.. container:: good-example
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
invalid_ids = set(invalid_ids)
|
invalid_ids = set(invalid_ids)
|
||||||
@ -449,7 +449,7 @@ data correctly.
|
|||||||
|
|
||||||
Depending on the input, recordset operations can also be used.
|
Depending on the input, recordset operations can also be used.
|
||||||
|
|
||||||
.. rst-class:: good-example
|
.. container:: good-example
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
invalid_ids = self.search(domain)
|
invalid_ids = self.search(domain)
|
||||||
|
@ -657,7 +657,7 @@ Here are some possible arguments for your personalized steps:
|
|||||||
trigger element:
|
trigger element:
|
||||||
|
|
||||||
```{eval-rst}
|
```{eval-rst}
|
||||||
.. rst-class:: o-definition-list
|
.. container:: o-definition-list
|
||||||
```
|
```
|
||||||
|
|
||||||
`check`
|
`check`
|
||||||
|
@ -311,7 +311,7 @@ manifest counterparts.
|
|||||||
```
|
```
|
||||||
|
|
||||||
```{eval-rst}
|
```{eval-rst}
|
||||||
.. rst-class:: o-definition-list
|
.. container:: o-definition-list
|
||||||
```
|
```
|
||||||
|
|
||||||
`name`
|
`name`
|
||||||
|
@ -165,7 +165,7 @@ variables for various data points:
|
|||||||
:::
|
:::
|
||||||
|
|
||||||
```{eval-rst}
|
```{eval-rst}
|
||||||
.. rst-class:: o-definition-list
|
.. container:: o-definition-list
|
||||||
```
|
```
|
||||||
|
|
||||||
{samp}`{$as}_all` (deprecated)
|
{samp}`{$as}_all` (deprecated)
|
||||||
@ -242,7 +242,7 @@ on the output node. This is done via the `t-att` (attribute) directive which
|
|||||||
exists in 3 different forms:
|
exists in 3 different forms:
|
||||||
|
|
||||||
```{eval-rst}
|
```{eval-rst}
|
||||||
.. rst-class:: o-definition-list
|
.. container:: o-definition-list
|
||||||
```
|
```
|
||||||
|
|
||||||
{samp}`t-att-{$name}`
|
{samp}`t-att-{$name}`
|
||||||
@ -479,7 +479,7 @@ other operand was *not* escaped before the concatenation.
|
|||||||
### Deprecated output directives
|
### Deprecated output directives
|
||||||
|
|
||||||
```{eval-rst}
|
```{eval-rst}
|
||||||
.. rst-class:: o-definition-list
|
.. container:: o-definition-list
|
||||||
```
|
```
|
||||||
|
|
||||||
`esc`
|
`esc`
|
||||||
@ -524,7 +524,7 @@ is `widget`, other options are field- or widget-dependent.
|
|||||||
### Debugging
|
### Debugging
|
||||||
|
|
||||||
```{eval-rst}
|
```{eval-rst}
|
||||||
.. rst-class:: o-definition-list
|
.. container:: o-definition-list
|
||||||
```
|
```
|
||||||
|
|
||||||
`t-debug`
|
`t-debug`
|
||||||
@ -800,7 +800,7 @@ At a deeper level than the previous helper is the `_render` method on
|
|||||||
You can use ``minimal_qcontext=False`` option to avoid this default
|
You can use ``minimal_qcontext=False`` option to avoid this default
|
||||||
value like the public method ``render``:
|
value like the public method ``render``:
|
||||||
|
|
||||||
.. rst-class:: o-definition-list
|
.. container:: o-definition-list
|
||||||
|
|
||||||
``request``
|
``request``
|
||||||
the current :class:`~odoo.http.Request` object, if any
|
the current :class:`~odoo.http.Request` object, if any
|
||||||
@ -941,7 +941,7 @@ on the extended template to select *context nodes* to which the specified
|
|||||||
`t-operation` is applied:
|
`t-operation` is applied:
|
||||||
|
|
||||||
```{eval-rst}
|
```{eval-rst}
|
||||||
.. rst-class:: o-definition-list
|
.. container:: o-definition-list
|
||||||
```
|
```
|
||||||
|
|
||||||
`append`
|
`append`
|
||||||
@ -993,7 +993,7 @@ No operation
|
|||||||
The javascript QWeb implementation provides a few debugging hooks:
|
The javascript QWeb implementation provides a few debugging hooks:
|
||||||
|
|
||||||
```{eval-rst}
|
```{eval-rst}
|
||||||
.. rst-class:: o-definition-list
|
.. container:: o-definition-list
|
||||||
```
|
```
|
||||||
|
|
||||||
`t-log`
|
`t-log`
|
||||||
|
Loading…
Reference in New Issue
Block a user