Update documentation of customs

This commit is contained in:
Cédric Krier committed 2024-08-04 17:07:10 +02:00
1 parent 5d04179b15
commit bee1f094bc
5 files changed
+117 -28

No files matched your search

+14
View File
@@ -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
+85
View File
@@ -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
<country:model-country.country>` or `Organization
<country:model-country.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
<model-customs.tariff.code>` over a period and a `Country
<country:model-country.country>` or `Organization
<country:model-country.organization>`.
The rate can be expressed as a fixed amount or an amount per `Unit of Measure
<product:model-product.uom>` in a `Currency
<currency:model-currency.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 <model-customs.tariff.code>` based on criteria.
The tariff codes can be set directly on the product or on a special type of
`Product Category <model-product.category>`.
Unlike standard product categories, each product can only have a single customs
category.
.. seealso::
The `Product <product:concept-product>` concept is introduced by the
:doc:`Product Module <product:index>`.
.. _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
<model-customs.tariff.code>` 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 <product:model-product.category>` concept is
introduced by the :doc:`Product Module <product:index>`.
.. _`Harmonized System`: http://en.wikipedia.org/wiki/Harmonized_System
+6 -26
View File
@@ -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
+7
View File
@@ -0,0 +1,7 @@
.. _releases-index:
=============
Release notes
=============
.. include:: ../CHANGELOG
+5 -2
View File
@@ -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',
},