diff --git a/modules/customs/CHANGELOG b/modules/customs/CHANGELOG index d63649780b..2340d34e49 100644 --- a/modules/customs/CHANGELOG +++ b/modules/customs/CHANGELOG @@ -24,50 +24,64 @@ Version 6.6.0 - 2022-10-31 * Bug fixes (see mercurial logs for details) Version 6.4.0 - 2022-05-02 +-------------------------- * Bug fixes (see mercurial logs for details) * Add support for Python 3.10 * Remove support for Python 3.6 Version 6.2.0 - 2021-11-01 +-------------------------- * Bug fixes (see mercurial logs for details) * Add country of origin Version 6.0.0 - 2021-05-03 +-------------------------- * Bug fixes (see mercurial logs for details) Version 5.8.0 - 2020-11-02 +-------------------------- * Bug fixes (see mercurial logs for details) * Remove support for Python 3.5 Version 5.6.0 - 2020-05-04 +-------------------------- * Bug fixes (see mercurial logs for details) Version 5.4.0 - 2019-11-04 +-------------------------- * Bug fixes (see mercurial logs for details) Version 5.2.0 - 2019-05-06 +-------------------------- * Bug fixes (see mercurial logs for details) Version 5.0.0 - 2018-10-01 +-------------------------- * Bug fixes (see mercurial logs for details) * Remove support for Python 2.7 Version 4.8.0 - 2018-04-23 +-------------------------- * Bug fixes (see mercurial logs for details) Version 4.6.0 - 2017-10-30 +-------------------------- * Bug fixes (see mercurial logs for details) Version 4.4.0 - 2017-05-01 +-------------------------- * Bug fixes (see mercurial logs for details) Version 4.2.0 - 2016-11-28 +-------------------------- * Bug fixes (see mercurial logs for details) Version 4.0.0 - 2016-05-02 +-------------------------- * Bug fixes (see mercurial logs for details) * Move category into customs_category * Add Python3 support Version 3.8.0 - 2015-11-02 +-------------------------- * Initial release diff --git a/modules/customs/doc/design.rst b/modules/customs/doc/design.rst new file mode 100644 index 0000000000..0c65bffb8b --- /dev/null +++ b/modules/customs/doc/design.rst @@ -0,0 +1,85 @@ +****** +Design +****** + +The *Customs Modules* introduces or extends the following concepts: + +.. _model-customs.tariff.code: + +Tariff Code +=========== + +The *Tariff Code* stores the `Harmonized System`_ code for a `Country +` or `Organization +` active for a period of the year. + +.. seealso:: + + The *Tariff Codes* can be found by opening the main menu item: + + |Products --> Customs --> Tariff Codes|__ + + .. |Products --> Customs --> Tariff Codes| replace:: :menuselection:`Products --> Customs --> Tariff Codes` + __ https://demo.tryton.org/model/customs.tariff.code + +.. _model-customs.duty.rate: + +Duty Rate +========= + +The *Duty Rate* stores the import or export rate applied for a `Tariff Code +` over a period and a `Country +` or `Organization +`. +The rate can be expressed as a fixed amount or an amount per `Unit of Measure +` in a `Currency +`. + +.. seealso:: + + The *Duty Rates* can be found by opening the main menu item: + + |Products --> Customs --> Duty Rates|__ + + .. |Products --> Customs --> Duty Rates| replace:: :menuselection:`Products --> Customs --> Duty Rates` + __ https://demo.tryton.org/model/customs.duty.rate + +.. _concept-product: + +Product +======= + +The *Product* concept is extended with a set of methods that allow retrieving +the product's `Tariff codes ` based on criteria. + +The tariff codes can be set directly on the product or on a special type of +`Product Category `. +Unlike standard product categories, each product can only have a single customs +category. + +.. seealso:: + + The `Product ` concept is introduced by the + :doc:`Product Module `. + +.. _model-product.category: + +Product Category +================ + +The *Customs Module* allows some *Product Categories* to be marked as customs +categories. +These product categories can have customs properties such as `Tariff Codes +` associated with them. + +When placing categories into a structure all the categories in the structure +must be either standard categories or customs categories. +This means a customs category cannot have a standard category as its parent or +as any of its subcategories. + +.. seealso:: + + The `Product Category ` concept is + introduced by the :doc:`Product Module `. + +.. _`Harmonized System`: http://en.wikipedia.org/wiki/Harmonized_System diff --git a/modules/customs/doc/index.rst b/modules/customs/doc/index.rst index 45355e2a48..00e30d138c 100644 --- a/modules/customs/doc/index.rst +++ b/modules/customs/doc/index.rst @@ -1,31 +1,11 @@ +############## Customs Module ############## -The customs module allows to define customs duty based on the tariff code. +The *Customs Module* adds customs duties based on the tariff code. +.. toctree:: + :maxdepth: 2 -Tarif Code -********** - -It stores the `Harmonized System`_ that can be set on *Product*. - -- The *Code* from the HS. -- The *Country* in case of a country specific code. -- The *Organization* in case of a country organization code. -- The *Start* / *End* period of the year for which the code is valid. - -.. _`Harmonized System`: http://en.wikipedia.org/wiki/Harmonized_System - -Duty Rate -********* - -It stores the rate of a *Tarif Code* for a country over a period. - -- The *Tariff Code*. -- The *Country* for which the rate is. -- The *Organization* for which the rate is. -- The *Type*: *Import* or *Export* -- The *Start* and *End* date of validity. -- The *Computation Type*: - - *Amount*: fixed amount with currency. - - *Quantity*: amount (in currency) per unit of measure. + design + releases diff --git a/modules/customs/doc/releases.rst b/modules/customs/doc/releases.rst new file mode 100644 index 0000000000..21b13c4745 --- /dev/null +++ b/modules/customs/doc/releases.rst @@ -0,0 +1,7 @@ +.. _releases-index: + +============= +Release notes +============= + +.. include:: ../CHANGELOG diff --git a/modules/customs/setup.py b/modules/customs/setup.py index 3398783bdf..dcfe8d04a3 100755 --- a/modules/customs/setup.py +++ b/modules/customs/setup.py @@ -11,9 +11,12 @@ from setuptools import find_packages, setup 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): @@ -57,7 +60,7 @@ setup(name=name, download_url=download_url, project_urls={ "Bug Tracker": 'https://bugs.tryton.org/', - "Documentation": 'https://docs.tryton.org/', + "Documentation": 'https://docs.tryton.org/latest/modules-customs', "Forum": 'https://www.tryton.org/forum', "Source Code": 'https://code.tryton.org/tryton', },