From 85ddcbd92fc9330015ac78eb777218885cb23edc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 22 Jul 2024 17:24:28 +0200 Subject: [PATCH] Update documentation of account asset --- modules/account_asset/CHANGELOG | 19 +++ modules/account_asset/doc/design.rst | 155 +++++++++++++++++++++++++ modules/account_asset/doc/index.rst | 49 +------- modules/account_asset/doc/releases.rst | 7 ++ modules/account_asset/setup.py | 8 +- 5 files changed, 193 insertions(+), 45 deletions(-) create mode 100644 modules/account_asset/doc/design.rst create mode 100644 modules/account_asset/doc/releases.rst diff --git a/modules/account_asset/CHANGELOG b/modules/account_asset/CHANGELOG index 8980f6f6a1..2b1b6021ec 100644 --- a/modules/account_asset/CHANGELOG +++ b/modules/account_asset/CHANGELOG @@ -20,76 +20,95 @@ 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 revisions when updating an asset * Allow resetting running assets without moves to draft * Allow refreshing pending asset lines 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) * Add configuration value for frequency * Use fixed year of 365 days Version 5.4.0 - 2019-11-04 +-------------------------- * Bug fixes (see mercurial logs for details) * Add depreciated amount Version 5.2.0 - 2019-05-06 +-------------------------- * Bug fixes (see mercurial logs for details) * Add asset on account type Version 5.0.0 - 2018-10-01 +-------------------------- * Bug fixes (see mercurial logs for details) * Allow to set when the depreciation move should be created * Remove support for Python 2.7 Version 4.8.0 - 2018-04-23 +-------------------------- * Bug fixes (see mercurial logs for details) * Don't allow to close a period with asset moves not posted 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) * Change depreciation_duration into Integer on the template 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) * Rename Asset reference into number * 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 * Add asset depreciation report Version 3.4.0 - 2014-10-20 +-------------------------- * Bug fixes (see mercurial logs for details) Version 3.2.0 - 2014-04-21 +-------------------------- * Bug fixes (see mercurial logs for details) Version 3.0.0 - 2013-10-21 +-------------------------- * Bug fixes (see mercurial logs for details) Version 2.8.0 - 2013-04-22 +-------------------------- * Initial release diff --git a/modules/account_asset/doc/design.rst b/modules/account_asset/doc/design.rst new file mode 100644 index 0000000000..cba1601b18 --- /dev/null +++ b/modules/account_asset/doc/design.rst @@ -0,0 +1,155 @@ +****** +Design +****** + +The *Account Asset Module* introduces the following concepts: + +.. _model-account.asset: + +Asset +===== + +The main concept introduced by the *Account Asset Module* is the *Asset*. +It contains details of how to calculate the depreciation of a purchased +quantity of fixed assets. + +Each asset has a product of type :guilabel:`Assets`, a number and the values to +be depreciated. + +.. note:: + + Most of the properties are filled automatically when a supplier invoice line + is set. + +When the asset is run, lines are calculated for each date based on the frequency +and the method for the period defined by the start and end dates. +Each line stores the actual value and the depreciation of the asset for that +date. + +.. note:: + + The asset lines can be tested before the asset is run using the + :guilabel:`Create Lines` and :guilabel:`Clear Lines` buttons. + + +.. seealso:: + + The Assets can be found by opening the main menu item: + + |Financial --> Assets --> Assets|__ + + .. |Financial --> Assets --> Assets| replace:: :menuselection:`Financial --> Assets --> Assets` + __ https://demo.tryton.org/model/account.asset + +Wizards +------- + +.. _wizard-account.asset.create_moves: + +Create Assets Moves +^^^^^^^^^^^^^^^^^^^ + +The *Create Assets Moves* wizard creates and posts the `Account Moves +` for each line of running *assets* up to the date +entered. + +.. seealso:: + + The Create Assets Moves can be launched from the main menu item: + + |Financial --> Assets --> Create Assets Moves|__ + + .. |Financial --> Assets --> Create Assets Moves| replace:: :menuselection:`Financial --> Assets --> Create Assets Moves` + __ https://demo.tryton.org/wizard/account.asset.create_moves + +.. _wizard-account.asset.update: + +Update Asset +^^^^^^^^^^^^ + +The *Update Asset* wizard allows the modification of the values or the end date +of a running *asset*. +A revision is created and an `Account Move ` is +posted to record the change in value, and the remaining lines are recalculated +based on the new values and date. + +Reports +------- + +.. _report-account.asset.depreciation_table: + +Depreciation Table +^^^^^^^^^^^^^^^^^^ + +The *Depreciation Table* report prints an amortization table of all the running +assets for a given period. + +.. _model-account.configuration: + +Account Configuration +===================== + +The *Account Configuration* is extended to store the settings for the *assets* +such as the numbering sequence or the rules for calculating the date for +posting the depreciation `moves `. + +.. seealso:: + + The `Account Configuration ` concept is + introduced by the :doc:`Account Module `. + +.. _model-account.account.type: + +Account Type +============ + +The *Account Type* is extended to define which `Accounts +` can be used to post the depreciation of fixed +assets. + +.. seealso:: + + The `Account Type ` concept is + introduced by the :doc:`Account Module `. + + +.. _model-account.journal: + +Account Journal +=============== + +When the *Account Asset Module* is activated, the *Account Journal* gets a new +type :guilabel:`Asset`, which is used to post the depreciation of the *assets*. + +.. seealso:: + + The `Account Journal ` concept is introduced + by the :doc:`Account Module `. + +.. _concept-product: + +Product +======= + +The *Product* concept is extended to specify whether an asset is depreciable +and over what duration. + +.. seealso:: + + The `Product ` concept is introduced by the + :doc:`Product Module `. + +.. _model-product.category: + +Product Category +================ + +When the *Account Asset Module* is activated, the accounting *Product Category* +acquires some additional accounting properties such as the depreciation +`account ` and asset account used for posting. + +.. seealso:: + + The accounting `Product Category ` + concept is introduced by the :doc:`Account Product Module + `. diff --git a/modules/account_asset/doc/index.rst b/modules/account_asset/doc/index.rst index a46afd95f7..4f6842eb94 100644 --- a/modules/account_asset/doc/index.rst +++ b/modules/account_asset/doc/index.rst @@ -1,48 +1,11 @@ +#################### Account Asset Module #################### -The account_asset module adds the depreciation of fixed assets. +The *Account Asset Module* calculates the depreciation of fixed assets. -Asset -***** +.. toctree:: + :maxdepth: 2 -An Asset defines how an asset is depreciated. It is mainly defined by: - -- Product (of type "Assets"). -- Journal. -- Value, Depreciated Amount and Residual Value. -- Start and End Date. -- Depreciation Method: - - - Linear - -- Frequency: - - - Monthly - - Yearly (using fixed year of 365 days) - -- Lines. - -The asset can be in one of this states: - -* Draft - - The depreciation lines can be created. - -* Running - - The accounting moves of depreciation lines are posted. - -* Closed - - The value of the asset has been completely depreciated. - -A wizard "Create Assets Moves" allows to post all accounting move up to a date. - -The day and the month when the move will posted are defined on the accounting -configuration. - -Asset Line -********** - -An Asset Line defines for a date the value to depreciate. + design + releases diff --git a/modules/account_asset/doc/releases.rst b/modules/account_asset/doc/releases.rst new file mode 100644 index 0000000000..21b13c4745 --- /dev/null +++ b/modules/account_asset/doc/releases.rst @@ -0,0 +1,7 @@ +.. _releases-index: + +============= +Release notes +============= + +.. include:: ../CHANGELOG diff --git a/modules/account_asset/setup.py b/modules/account_asset/setup.py index 86db4c416c..3908a916f4 100755 --- a/modules/account_asset/setup.py +++ b/modules/account_asset/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): @@ -60,7 +63,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-asset'), "Forum": 'https://www.tryton.org/forum', "Source Code": 'https://code.tryton.org/tryton', },