update replace rst-class to container

This commit is contained in:
hoangvv 2025-02-28 00:37:20 +07:00
parent fb57c796ee
commit d9cb9d975f
8 changed files with 39 additions and 39 deletions

View File

@ -64,7 +64,7 @@ clean:
html: $(HTML_BUILD_DIR)/_static/style.css
@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."
livehtml: SPHINXOPTS += -A collapse_menu=True
@ -74,7 +74,7 @@ livehtml:
--port 8000 --host $(SERVER_IP) \
--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'" \
$(SPHINXOPTS) -c $(CONFIG_DIR) -b html
$(SPHINXOPTS) -c $(CONFIG_DIR) -b html -q
# To call *after* `make html`

View File

@ -9,24 +9,24 @@ custom-js: accounts.js,chart-of-accounts.js,entries.js,misc.js,reconciliation.js
```{eval-rst}
.. 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 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
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.
* .. rst-class:: intro-liabilities
* .. container:: intro-liabilities
**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
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
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}
.. 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
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.
* .. 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
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.
* .. rst-class:: intro-opex
* .. container:: intro-opex
**Operating expenses** (OPEX) include administration, sales and R&D salaries, rent and
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}
.. rst-class:: doc-aside
.. container:: doc-aside
```
```{eval-rst}
@ -177,7 +177,7 @@ Reconciliation is performed automatically by the system when:
.. rubric:: Customer Statement Example
.. rst-class:: table-sm d-c-table
.. container:: table-sm d-c-table
+-------------------------+-------------------------+-----------------------+
|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.
```{eval-rst}
.. rst-class:: checks-handling
.. container:: 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
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 |
@ -243,7 +243,7 @@ There are two approaches to managing checks and internal wire transfers:
|Undeposited funds |100 | |Check 0123 |
+-------------------------+--------------+------------+---------------+
.. rst-class:: table-sm d-c-table
.. container:: table-sm d-c-table
+-------------------------+--------------+------------+---------------+
|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
existing journal entry.
.. rst-class:: table-sm d-c-table
.. container:: table-sm d-c-table
+-------------------------+--------------+------------+---------------+---------------+
|Account |Debit |Credit |Reconciliation |Bank Statement |

View File

@ -1112,7 +1112,7 @@ Avoid creating hyper-specific classes and variable names. When naming nested ele
"Grandchild" approach.
```{eval-rst}
.. rst-class:: bg-light
.. container:: bg-light
```
```{eval-rst}

View File

@ -100,7 +100,7 @@ is to use a header tag (`<h1>`, `<h2>`, ...). Besides reboot rules, mostly all t
styles defined by Odoo.
```{eval-rst}
.. rst-class:: bg-light
.. container:: bg-light
```
```{eval-rst}

View File

@ -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
for each record of the set.
.. rst-class:: bad-example
.. container:: bad-example
.. code-block:: python
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
batch of records.
.. rst-class:: good-example
.. container:: good-example
.. code-block:: python
def _compute_count(self):
@ -341,7 +341,7 @@ When working with recordsets, it is almost always better to batch operations.
.. example::
Don't create records one after another.
.. rst-class:: bad-example
.. container:: bad-example
.. code-block:: python
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
mostly no impact and helps the framework optimize fields computation.
.. rst-class:: good-example
.. container:: good-example
.. code-block:: python
create_values = []
@ -363,7 +363,7 @@ When working with recordsets, it is almost always better to batch operations.
.. example::
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
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.
.. rst-class:: good-example
.. container:: good-example
.. code-block:: python
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
complexity in in O(n²).
.. rst-class:: bad-example
.. container:: bad-example
.. code-block:: python
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.
.. rst-class:: good-example
.. container:: good-example
.. code-block:: python
mapped_result = {result['id']: result['foo'] for result in results}
@ -427,7 +427,7 @@ data correctly.
.. example::
Choosing the bad data structure to hold the input can lead to quadratic complexity.
.. rst-class:: bad-example
.. container:: bad-example
.. code-block:: python
invalid_ids = self.search(domain).ids
@ -439,7 +439,7 @@ data correctly.
Instead, prefer using set operations like casting `invalid_ids` to a set.
.. rst-class:: good-example
.. container:: good-example
.. code-block:: python
invalid_ids = set(invalid_ids)
@ -449,7 +449,7 @@ data correctly.
Depending on the input, recordset operations can also be used.
.. rst-class:: good-example
.. container:: good-example
.. code-block:: python
invalid_ids = self.search(domain)

View File

@ -657,7 +657,7 @@ Here are some possible arguments for your personalized steps:
trigger element:
```{eval-rst}
.. rst-class:: o-definition-list
.. container:: o-definition-list
```
`check`

View File

@ -311,7 +311,7 @@ manifest counterparts.
```
```{eval-rst}
.. rst-class:: o-definition-list
.. container:: o-definition-list
```
`name`

View File

@ -165,7 +165,7 @@ variables for various data points:
:::
```{eval-rst}
.. rst-class:: o-definition-list
.. container:: o-definition-list
```
{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:
```{eval-rst}
.. rst-class:: o-definition-list
.. container:: o-definition-list
```
{samp}`t-att-{$name}`
@ -479,7 +479,7 @@ other operand was *not* escaped before the concatenation.
### Deprecated output directives
```{eval-rst}
.. rst-class:: o-definition-list
.. container:: o-definition-list
```
`esc`
@ -524,7 +524,7 @@ is `widget`, other options are field- or widget-dependent.
### Debugging
```{eval-rst}
.. rst-class:: o-definition-list
.. container:: o-definition-list
```
`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
value like the public method ``render``:
.. rst-class:: o-definition-list
.. container:: o-definition-list
``request``
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:
```{eval-rst}
.. rst-class:: o-definition-list
.. container:: o-definition-list
```
`append`
@ -993,7 +993,7 @@ No operation
The javascript QWeb implementation provides a few debugging hooks:
```{eval-rst}
.. rst-class:: o-definition-list
.. container:: o-definition-list
```
`t-log`