From a4d3989874ebc1659ea9a494cd92d37108193223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 17 Oct 2024 10:16:03 +0000 Subject: [PATCH] Update documentation of account stock continental --- modules/account_stock_continental/CHANGELOG | 24 +++++++ .../account_stock_continental/doc/design.rst | 69 +++++++++++++++++++ .../account_stock_continental/doc/index.rst | 29 ++------ .../doc/releases.rst | 7 ++ modules/account_stock_continental/setup.py | 9 ++- modules/account_stock_continental/tryton.cfg | 1 + 6 files changed, 115 insertions(+), 24 deletions(-) create mode 100644 modules/account_stock_continental/doc/design.rst create mode 100644 modules/account_stock_continental/doc/releases.rst diff --git a/modules/account_stock_continental/CHANGELOG b/modules/account_stock_continental/CHANGELOG index bf01580f23..75ee6cff5e 100644 --- a/modules/account_stock_continental/CHANGELOG +++ b/modules/account_stock_continental/CHANGELOG @@ -21,86 +21,110 @@ 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) * Do not create moves with a single empty line 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) * Use only 3 stock accounts Version 5.4.0 - 2019-11-04 +-------------------------- * Bug fixes (see mercurial logs for details) * Replace 'Update Cost Price' by 'Modify Cost Price' Version 5.2.0 - 2019-05-06 +-------------------------- * Bug fixes (see mercurial logs for details) * Enforce balance and income statement on stock accounts 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 reversed drop move 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 +-------------------------- * Bug fixes (see mercurial logs for details) * Add support for PyPy + Version 3.4.0 - 2014-10-20 +-------------------------- * Bug fixes (see mercurial logs for details) * Add account stock method on fiscal year Version 3.2.0 - 2014-04-21 +-------------------------- * Bug fixes (see mercurial logs for details) * Remove account_move Version 3.0.0 - 2013-10-21 +-------------------------- * Bug fixes (see mercurial logs for details) Version 2.8.0 - 2013-04-22 +-------------------------- * Bug fixes (see mercurial logs for details) Version 2.6.0 - 2012-10-22 +-------------------------- * Bug fixes (see mercurial logs for details) * Updating cost price must update stock accounting Version 2.4.0 - 2012-04-23 +-------------------------- * Bug fixes (see mercurial logs for details) * Create move also from supplier to customer * Define "Stock Journal" on "Account Configuration" * Use cost price instead of unit price when cost method is "fixed" Version 2.2.0 - 2011-10-24 +-------------------------- * Bug fixes (see mercurial logs for details) Version 2.0.0 - 2011-04-27 +-------------------------- * Initial release diff --git a/modules/account_stock_continental/doc/design.rst b/modules/account_stock_continental/doc/design.rst new file mode 100644 index 0000000000..5da46defe7 --- /dev/null +++ b/modules/account_stock_continental/doc/design.rst @@ -0,0 +1,69 @@ +****** +Design +****** + +The *Account Stock Continental Module* extends the following concepts: + +.. _model-stock.move: + +Stock Move +========== + +When the :guilabel:`Account Stock Method` is set for the current `Fiscal Year +`, an `Account Move ` is +created for each *Stock Move* done with one `Location +` of type :guilabel:`Storage` and the other of type +:guilabel:`Supplier`, :guilabel:`Customer`, :guilabel:`Production` or +:guilabel:`Lost and Found`. + +When the stock enters the `Warehouse ` +the :guilabel:`Account Stock` is debited and the :guilabel:`Account Stock IN` +is credited with the value of the *Stock Move*. +The value is calculated from the :guilabel:`Unit Price` of the *Stock Move* or +the :guilabel:`Cost Price` of the `Product ` if +the cost method is :guilabel:`Fixed`. +When the stock leaves the warehouse, the :guilabel:`Account Stock` is credited +and the :guilabel:`Account Stock OUT` is debited. + +.. _model-product.category: + +Product Category +================ + +When the *Account Stock Continental Module* is activated, the *Product +Categories* marked as accounting categories gain new properties for the +`Accounts ` to use for the stock valuation. + +.. seealso:: + + The accounting `Product Category ` + concept is introduced by the :doc:`Account Product Module + `. + +.. _model-account.configuration: + +Account Configuration +===================== + +When the *Account Stock Continental Module* is activated, the *Account +Configuration* gains a new property for the `Journal +` to use for stock `Account Moves +`. + +.. seealso:: + + The `Account Configuration ` concept is + introduced by the :doc:`Account Module `. + +.. _model-account.fiscalyear: + +Fiscal Year +=========== + +The *Account Stock Continental Module* adds a new property to the *Fiscal Year* +which defines the :guilabel:`Account Stock Method` to follow during that year. + +.. seealso:: + + The `Fiscal Year ` concept is introduced + by the :doc:`Account Module `. diff --git a/modules/account_stock_continental/doc/index.rst b/modules/account_stock_continental/doc/index.rst index 2f0daa0dc7..1190861bc4 100644 --- a/modules/account_stock_continental/doc/index.rst +++ b/modules/account_stock_continental/doc/index.rst @@ -1,27 +1,12 @@ +################################ Account Stock Continental Module ################################ -The account_stock_continental module adds continental accounting model for -stock valuation. +The *Account Stock Continental Module* provides the ability to use the +continental stock valuation method. -A new configuration field for accounting is added: +.. toctree:: + :maxdepth: 2 -- Journal Stock: The journal used for stock move. - -Three new fields are added to Accounting categories: - -- Account Stock: The account which is used to record stock value. -- Account Stock IN: The counter part account for incoming stock moves. -- Account Stock OUT: The counter part account for outgoing stock moves. - -An Account Move is created for each Stock Move done under a fiscal year with -the account stock method set and for which one Stock Location has the type -"Storage" and an the other has the type "Supplier", "Customer", "Production" or -"Lost and Found". - -When the stock enters the warehouse the Account Stock of the Product is -debited and the Account Stock IN of the Product is credited. -The amount used is the Unit Price of the move or the Cost Price of the Product -if it uses the "fixed" method. -The account move uses the Account Stock OUT when the products leave the -warehouse. + design + releases diff --git a/modules/account_stock_continental/doc/releases.rst b/modules/account_stock_continental/doc/releases.rst new file mode 100644 index 0000000000..21b13c4745 --- /dev/null +++ b/modules/account_stock_continental/doc/releases.rst @@ -0,0 +1,7 @@ +.. _releases-index: + +============= +Release notes +============= + +.. include:: ../CHANGELOG diff --git a/modules/account_stock_continental/setup.py b/modules/account_stock_continental/setup.py index 5002f91bf7..408d76819c 100755 --- a/modules/account_stock_continental/setup.py +++ b/modules/account_stock_continental/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): @@ -62,7 +65,9 @@ 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-stock-continental'), "Forum": 'https://www.tryton.org/forum', "Source Code": 'https://code.tryton.org/tryton', }, diff --git a/modules/account_stock_continental/tryton.cfg b/modules/account_stock_continental/tryton.cfg index fbbabb3b9f..915dba1ca8 100644 --- a/modules/account_stock_continental/tryton.cfg +++ b/modules/account_stock_continental/tryton.cfg @@ -4,6 +4,7 @@ depends: account account_product ir + product res stock xml: