Add rstcheck
This commit is contained in:
+2
-1
@@ -57,11 +57,12 @@ documentation:
|
||||
paths:
|
||||
- .cache/pip/http
|
||||
before_script:
|
||||
- pip install sphinx-lint
|
||||
- pip install sphinx-lint rstcheck[sphinx]
|
||||
script:
|
||||
- cd "${PACKAGE}"
|
||||
- python -m sphinx -T -E -W -n -b html ${DOC_DIR} _build/html
|
||||
- python -m sphinxlint ${DOC_DIR}
|
||||
- rstcheck --recursive ${DOC_DIR}
|
||||
- |
|
||||
if [ "${CHECK_LINK}" ]; then
|
||||
python -m sphinx -T -E -W -n -b linkcheck ${DOC_DIR} _build;
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
[rstcheck]
|
||||
ignore_directives = include
|
||||
ignore_messages = (Hyperlink target .* is not referenced)|(Duplicate implicit target name:.*)
|
||||
@@ -33,8 +33,8 @@ the `Postal Codes <model-country.postal_code>` in Tryton from the `GeoNames
|
||||
Database`_.
|
||||
It is run with:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
trytond_import_postal_codes -c trytond.conf -d <database> <two_letter_country_code>
|
||||
$ trytond_import_postal_codes -c trytond.conf -d <database> <two_letter_country_code>
|
||||
|
||||
.. _GeoNames Database: https://www.geonames.org/
|
||||
|
||||
@@ -15,6 +15,6 @@ updates `Currencies <model-currency.currency>`.
|
||||
|
||||
You can run it with:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
trytond_import_currencies -c trytond.conf -d <database>
|
||||
$ trytond_import_currencies -c trytond.conf -d <database>
|
||||
|
||||
@@ -24,9 +24,8 @@ product variant is based exclusively on one product template.
|
||||
|
||||
A product's full code is made up from a prefix code which is defined on the
|
||||
product template and a suffix code which is specified on the product variant.
|
||||
The full product code can then be used as the product's |SKU|_.
|
||||
The full product code can then be used as the product's SKU_.
|
||||
|
||||
.. |SKU| replace:: :abbr:`SKU (Stock Keeping Unit)`
|
||||
.. _SKU: https://en.wikipedia.org/wiki/Stock_keeping_unit
|
||||
|
||||
.. _model-product.template:
|
||||
|
||||
@@ -45,16 +45,13 @@ you must enter this initial stock in the correct way.
|
||||
The right way of doing this is to create a set of individual
|
||||
`Stock Moves <model-stock.move>`.
|
||||
These moves can be created in the view that is opened from the
|
||||
|Inventory & Stock --> Moves|__ main menu item.
|
||||
:menuselection:`Inventory & Stock --> Moves` main menu item.
|
||||
Each of the stock moves should move some stock of a `Product <concept-product>`
|
||||
from a supplier `Location <model-stock.location>` to the appropriate storage
|
||||
location.
|
||||
These stock moves must have their unit prices set to their product's cost
|
||||
price.
|
||||
|
||||
.. |Inventory & Stock --> Moves| replace:: :menuselection:`Inventory & Stock --> Moves`
|
||||
__ https://demo.tryton.org/model/stock.move
|
||||
|
||||
.. note::
|
||||
|
||||
As these moves are for your initial stock they have no origin, and
|
||||
|
||||
@@ -9,6 +9,7 @@ is set with the default value if exists.
|
||||
|
||||
The following class method:
|
||||
|
||||
.. rstcheck: ignore-next-code-block
|
||||
.. code-block:: python
|
||||
|
||||
Model.default_<field name>()
|
||||
|
||||
@@ -122,7 +122,7 @@ Additional objects can be passed to a report.
|
||||
This is discussed below in `Passing custom values to a report`_
|
||||
|
||||
Within Tryton the model, the report is based on, can be found by opening the
|
||||
menu item:
|
||||
menu item::
|
||||
|
||||
|Administration --> Models --> Models|__
|
||||
|
||||
@@ -130,7 +130,7 @@ menu item:
|
||||
__ https://demo.tryton.org/model/ir.model
|
||||
|
||||
Furthermore in Tryton the fields for that model can be found by opening the
|
||||
menu item:
|
||||
menu item::
|
||||
|
||||
|Administration --> Models --> Models --> Fields|__
|
||||
|
||||
@@ -142,7 +142,7 @@ Creating a simple report template for a model from the client
|
||||
-------------------------------------------------------------
|
||||
|
||||
Once you have created a report template it has to be uploaded to the server.
|
||||
This can be done by creating a new record by opening the menu item:
|
||||
This can be done by creating a new record by opening the menu item::
|
||||
|
||||
|Administration --> User Interface --> Actions --> Reports|__
|
||||
|
||||
@@ -214,6 +214,7 @@ Then you must create your new sale report:
|
||||
|
||||
.. code-block:: xml
|
||||
|
||||
<data>
|
||||
<record model="ir.action.report" id="report_sale">
|
||||
<field name="name">Sale</field>
|
||||
<field name="report_name">sale.sale</field>
|
||||
@@ -226,6 +227,7 @@ Then you must create your new sale report:
|
||||
<field name="model">sale.sale,-1</field>
|
||||
<field name="action" ref="report_sale"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
Passing custom values to a report
|
||||
---------------------------------
|
||||
|
||||
@@ -78,7 +78,7 @@ selected record instances.
|
||||
|
||||
Here is an example of the directives to insert in the document:
|
||||
|
||||
.. code-block::
|
||||
.. code-block:: text
|
||||
|
||||
<for each="opportunity in records">
|
||||
Opportunity: <opportunity.rec_name>
|
||||
|
||||
@@ -74,7 +74,7 @@ the :class:`~trytond.pool.Pool` as type ``model`` in :file:`__init__.py`:
|
||||
def register():
|
||||
...
|
||||
Pool.register(
|
||||
...
|
||||
...,
|
||||
opportunity.OpportunityMonthly,
|
||||
module='opportunity', type_='model')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user