diff --git a/modules/account_tax_rule_country/CHANGELOG b/modules/account_tax_rule_country/CHANGELOG index fb9aa306a8..c1d90b5b91 100644 --- a/modules/account_tax_rule_country/CHANGELOG +++ b/modules/account_tax_rule_country/CHANGELOG @@ -20,53 +20,68 @@ 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) 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) * Add subdivision as criteria 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) * Add support for stock_consigment 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) * Add Python3 support Version 3.8.0 - 2015-11-02 +-------------------------- * Bug fixes (see mercurial logs for details) Version 3.6.0 - 2015-04-20 +-------------------------- * Initial release diff --git a/modules/account_tax_rule_country/doc/design.rst b/modules/account_tax_rule_country/doc/design.rst new file mode 100644 index 0000000000..b680830305 --- /dev/null +++ b/modules/account_tax_rule_country/doc/design.rst @@ -0,0 +1,45 @@ +****** +Design +****** + +The *Account Tax Rule Country Module* extends the following concepts: + +.. _model-account.tax.rule: + +Tax Rule +======== + +When the *Account Tax Rule Country Module* is activated, the *Tax Rule* gains +additional criteria for the origin and destination `Country +` and `Subdivision +` to match against. + +The countries and subdivisions are taken from the origin document that applies +the tax rule: + +- `Sale `: + + - The country and subdivision of origin are taken from the `Warehouse + ` address. + - The country and subdivision of the destination are taken from the shipping + address. + +- `Purchase `: + + - The country and subdivision of origin are taken from the invoice address. + - The country and subdivision of the destination are taken from the warehouse + address. + +- Stock Consignment `Move `: + + - The country and subdivision of origin are taken from the warehouse address + of the `Location ` or the delivery address of + the `Customer Return Shipment `. + - The country and subdivision of the destination are taken from the warehouse + address of the location or the delivery address of `Customer Shipment + `. + +.. seealso:: + + The `Tax Rule ` concept is introduced by the + :doc:`Account Module `. diff --git a/modules/account_tax_rule_country/doc/index.rst b/modules/account_tax_rule_country/doc/index.rst index ba42051fa1..4d0c1af8d3 100644 --- a/modules/account_tax_rule_country/doc/index.rst +++ b/modules/account_tax_rule_country/doc/index.rst @@ -1,34 +1,12 @@ -Account Tax Rule Country -######################## +############################### +Account Tax Rule Country Module +############################### -The account_tax_rule module extends the tax rule to add origin and destination -countries and subdivisions as criteria. +The *Account Tax Rule Country Module* adds the country and subdivision of +origin and destination as criteria for the tax rule. -Tax Rule Line -************* +.. toctree:: + :maxdepth: 2 -Four criteria fields are added: - -- From Country: The country of origin -- From Subdivision: The subdivision of origin -- To Country: The country of destination -- To Subdivision: The subdivision of destination - -The countries are picked from the origin document: - -- Sale: - - - The origin country and subdivision come from the address of the warehouse. - - The destination country and subdivision come from the shipping address. - -- Purchase: - - - The origin country and subdivision come from the invoice address. - - The destination country and subdivision come from the address of the warehouse. - -- Stock Consignment: - - - The origin country and subdivision come from the warehouse's address of the - location or the delivery address for returned customer shipment. - - The destination country and subdivision come from the warehouse's address - of the location or the delivery address for customer shipment. + design + releases diff --git a/modules/account_tax_rule_country/doc/releases.rst b/modules/account_tax_rule_country/doc/releases.rst new file mode 100644 index 0000000000..21b13c4745 --- /dev/null +++ b/modules/account_tax_rule_country/doc/releases.rst @@ -0,0 +1,7 @@ +.. _releases-index: + +============= +Release notes +============= + +.. include:: ../CHANGELOG diff --git a/modules/account_tax_rule_country/setup.py b/modules/account_tax_rule_country/setup.py index f0814cd67b..b94ceb0220 100755 --- a/modules/account_tax_rule_country/setup.py +++ b/modules/account_tax_rule_country/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): @@ -61,7 +64,8 @@ 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-account-tax-rule-country'), "Forum": 'https://www.tryton.org/forum', "Source Code": 'https://code.tryton.org/tryton', }, diff --git a/modules/account_tax_rule_country/tryton.cfg b/modules/account_tax_rule_country/tryton.cfg index acdddbb4db..375d263ea3 100644 --- a/modules/account_tax_rule_country/tryton.cfg +++ b/modules/account_tax_rule_country/tryton.cfg @@ -8,5 +8,6 @@ extras_depend: purchase sale stock + stock_consignment xml: account.xml