changeset 4fdb6a6de540 in modules/product:default
details: https://hg.tryton.org/modules/product?cmd=changeset;node=4fdb6a6de540
description:
        Improve documentation

        issue9635
        review308231002
diffstat:

 doc/index.rst |  98 ++++++----------------------------------------------------
 setup.py      |   7 +++-
 2 files changed, 15 insertions(+), 90 deletions(-)

diffs (133 lines):

diff -r d0b4ceecd55c -r 4fdb6a6de540 doc/index.rst
--- a/doc/index.rst     Wed Dec 23 21:55:13 2020 +0100
+++ b/doc/index.rst     Tue Jan 05 16:37:37 2021 +0000
@@ -1,93 +1,15 @@
+##############
 Product Module
 ##############
 
-The Product module defines the following models: Category of Unit of
-Measure, Unit of Measure, Product Template, Product and Product
-Category.
-
-
-Category of Unit of Measure
-***************************
-
-A Category of Unit of Measure is simply defined by a name.
-
-
-Unit of Measure
-***************
-
-A Unit of Measure is defined by:
-
-- Name.
-- Symbol.
-- UOM category.
-- Rate and a Factor (the later is the inverse of the former).
-- Rounding Precision and Display Digits, used to round and display
-  quantities expressed in the given UOM.
-- Active, allow to disable a UOM.
-
-
-Product category
-****************
-
-The Product Category Model is just composed of a name. Product
-Categories are organised in a tree structure.
-
-
-Product Template and Product
-****************************
-
-The product concept in Tryton is composed of two models: Product
-Template and Product.
-
-The Product Template model contains the following fields:
+The *Product Module* defines the essential concepts needed to describe
+products in Tryton.
+It lets you define the basic properties of products and their variants,
+and allows you to record how the quantity of a product is measured.
 
-- Name.
-- Code, a common prefix for all products. If a sequence is set on product
-  configuration the code will be read-only and filled using the sequence.
-- Type, whose value can be *Goods*, *Assets*, *Service*.
-- Category.
-- List Price, the default sale price expressed in the List Price UOM.
-  product.
-- List Price UOM.
-- Cost Price, the cost for one unit of this product expressed in the
-  Cost Price UOM.
-- Cost Price UOM.
-- Cost Price Method, which can be *Fixed* or *Average*. Defines how
-  the cost price should be updated. *Fixed* means that the cost price
-  stay unchanged. *Average* means that the cost price is the average
-  cost of all the items that are in stock. It's default value can be defined
-  on product configuration.
-- Default UOM. The default UOM for this product. Used for example to
-  express stock levels.
-- Active, allow to disable a product.
-
+.. toctree::
+   :maxdepth: 2
 
-The Product model extends the Product Template with two fields: Code (aka SKU_)
-and Description. If a sequence is set on product configuration the code will be
-read-only and will be filled in using the sequence. It's also possible to
-define a list of identifiers on product. An identifier is composed by a type
-and a code. The following types are available:
-
-    * International Article Number (EAN)
-    * International Standard Audiovisual Number (ISAN)
-    * International Standard Book Number (ISBN)
-    * International Standard Identifier for Libraries (ISIL)
-    * International Securities Identification Number (ISIN)
-    * International Standard Music Number (ISMN)
-
-.. _SKU: https://en.wikipedia.org/wiki/Stock_keeping_unit
-
-Configuration
-*************
-
-The product module uses the section `product` to retrieve some parameters:
-
-- `price_decimal`: defines the number of decimal digits with which the unit
-  prices are stored. The default value is `4`.
-
-- `uom_conversion_decimal`: defines the number of decimal digits with which the
-  conversion rates and factors of UoM are stored. The default value is `12`.
-
-.. warning::
-    They can not be lowered once a database is created.
-..
+   usage
+   configuration
+   design
diff -r d0b4ceecd55c -r 4fdb6a6de540 setup.py
--- a/setup.py  Wed Dec 23 21:55:13 2020 +0100
+++ b/setup.py  Tue Jan 05 16:37:37 2021 +0000
@@ -10,9 +10,12 @@
 
 
 def read(fname):
-    return io.open(
+    content = io.open(
         os.path.join(os.path.dirname(__file__), fname),
         'r', encoding='utf-8').read()
+    content = re.sub(
+        r'(?m)^\.\. toctree::\r?\n((^$|^\s.*$)\r?\n)*', '', content)
+    return content
 
 
 def get_require_version(name):
@@ -80,7 +83,7 @@
     download_url=download_url,
     project_urls={
         "Bug Tracker": 'https://bugs.tryton.org/',
-        "Documentation": 'https://docs.tryton.org/',
+        "Documentation": 'https://docs.tryton.org/projects/modules-product/',
         "Forum": 'https://www.tryton.org/forum',
         "Source Code": 'https://hg.tryton.org/modules/product',
         },

Reply via email to