diff --git a/.travis.yml b/.travis.yml index fdd753292..a22b7f4f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,8 +21,10 @@ env: matrix: - LINT_CHECK="1" - - TESTS="1" ODOO_REPO="odoo/odoo" MAKEPOT="1" - - TESTS="1" ODOO_REPO="OCA/OCB + - TESTS="1" ODOO_REPO="odoo/odoo" MAKEPOT="1" INCLUDE="account_asset_disposal" + - TESTS="1" ODOO_REPO="OCA/OCB" INCLUDE="account_asset_disposal" + - TESTS="1" ODOO_REPO="odoo/odoo" MAKEPOT="1" EXCLUDE="account_asset_disposal" + - TESTS="1" ODOO_REPO="OCA/OCB" EXCLUDE="account_asset_disposal" install: diff --git a/account_asset_disposal/README.rst b/account_asset_disposal/README.rst index edff3e793..21856edc6 100644 --- a/account_asset_disposal/README.rst +++ b/account_asset_disposal/README.rst @@ -1,11 +1,30 @@ -.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License: AGPL-3 - ====================== Account asset disposal ====================== +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--financial--tools-lightgray.png?logo=github + :target: https://github.com/OCA/account-financial-tools/tree/11.0/account_asset_disposal + :alt: OCA/account-financial-tools +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/account-financial-tools-11-0/account-financial-tools-11-0-account_asset_disposal + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/92/11.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + This module enables a real asset disposal with the proper accounting entries. When an asset gets broken or is totally depreciated, you can close it and Odoo @@ -14,6 +33,11 @@ residual value is pending). You can also cancel this disposal for returning to the previous state. +**Table of contents** + +.. contents:: + :local: + Configuration ============= @@ -39,51 +63,50 @@ You can cancel afterwards the disposal: #. The disposal entry is removed. #. The depreciation board is restored with all the remaining depreciations. -.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas - :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/92/10.0 - - -Bug Tracker -=========== - -Bugs are tracked on `GitHub Issues -`_. In case of trouble, please -check there if your issue has already been reported. If you spotted it first, -help us smashing it by providing a detailed and welcomed feedback. - Known issues / Roadmap ====================== * Include a specific message type for notifying the disposal. +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + Credits ======= -Images ------- +Authors +~~~~~~~ -* Odoo Community Association: `Icon `_. +* Tecnativa Contributors ------------- +~~~~~~~~~~~~ * Tecnativa (https://www.tecnativa.com): * Pedro M. Baeza * Antonio Espinosa * Luis M. Ontalba -Maintainer ----------- +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. .. image:: https://odoo-community.org/logo.png :alt: Odoo Community Association :target: https://odoo-community.org -This module is maintained by the OCA. - OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -To contribute to this module, please visit https://odoo-community.org. +This module is part of the `OCA/account-financial-tools `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_asset_disposal/__manifest__.py b/account_asset_disposal/__manifest__.py index ad4581f85..dc573e6a2 100644 --- a/account_asset_disposal/__manifest__.py +++ b/account_asset_disposal/__manifest__.py @@ -1,13 +1,12 @@ -# -*- coding: utf-8 -*- # Copyright 2016 Tecnativa - Antonio Espinosa # Copyright 2017 Tecnativa - Luis M. Ontalba -# Copyright 2017 Tecnativa - Pedro M. Baeza +# Copyright 2017-2018 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Account asset disposal", "summary": "Makes asset close account move automatically", - "version": "10.0.2.0.0", + "version": "11.0.1.0.0", "category": "Accounting & Finance", "website": "http://github.com/OCA/account-financial-tools", "author": "Tecnativa, " diff --git a/account_asset_disposal/migrations/10.0.1.0.0/pre-migration.py b/account_asset_disposal/migrations/10.0.1.0.0/pre-migration.py deleted file mode 100644 index d3b6f7e42..000000000 --- a/account_asset_disposal/migrations/10.0.1.0.0/pre-migration.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2017 Tecnativa - Luis M. Ontalba -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - -from openupgradelib import openupgrade - - -def cleanup_modules(cr): - """Don't report as missing these modules, as they are integrated in - other modules.""" - openupgrade.update_module_names( - cr, [ - ('account_asset_disposal_analytic', 'account_asset_analytic'), - ], merge_modules=True, - ) - - -@openupgrade.migrate() -def migrate(env, version): - cleanup_modules(env.cr) diff --git a/account_asset_disposal/models/__init__.py b/account_asset_disposal/models/__init__.py index 94ba97d2f..957526b63 100644 --- a/account_asset_disposal/models/__init__.py +++ b/account_asset_disposal/models/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import account_asset_category diff --git a/account_asset_disposal/models/account_asset_asset.py b/account_asset_disposal/models/account_asset_asset.py index 7db0756f3..3d842edcc 100644 --- a/account_asset_disposal/models/account_asset_asset.py +++ b/account_asset_disposal/models/account_asset_asset.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2016 Tecnativa - Antonio Espinosa # Copyright 2017 Tecnativa - Luis M. Ontalba # Copyright 2017 Tecnativa - Pedro M. Baeza diff --git a/account_asset_disposal/models/account_asset_category.py b/account_asset_disposal/models/account_asset_category.py index 5bc2a3f3b..a1810f2ed 100644 --- a/account_asset_disposal/models/account_asset_category.py +++ b/account_asset_disposal/models/account_asset_category.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2016 Tecnativa - Antonio Espinosa # Copyright 2017 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). diff --git a/account_asset_disposal/readme/CONFIGURE.rst b/account_asset_disposal/readme/CONFIGURE.rst new file mode 100644 index 000000000..e16694220 --- /dev/null +++ b/account_asset_disposal/readme/CONFIGURE.rst @@ -0,0 +1,3 @@ +#. Go to *Accounting > Configuration > Management > Asset Types*. +#. There's a new field called "Loss Account" for setting the default loss + account when disposing assets. diff --git a/account_asset_disposal/readme/CONTRIBUTORS.rst b/account_asset_disposal/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..4d869e046 --- /dev/null +++ b/account_asset_disposal/readme/CONTRIBUTORS.rst @@ -0,0 +1,4 @@ +* Tecnativa (https://www.tecnativa.com): + * Pedro M. Baeza + * Antonio Espinosa + * Luis M. Ontalba diff --git a/account_asset_disposal/readme/DESCRIPTION.rst b/account_asset_disposal/readme/DESCRIPTION.rst new file mode 100644 index 000000000..61bb37979 --- /dev/null +++ b/account_asset_disposal/readme/DESCRIPTION.rst @@ -0,0 +1,7 @@ +This module enables a real asset disposal with the proper accounting entries. + +When an asset gets broken or is totally depreciated, you can close it and Odoo +will generate automatically the asset close move (and compute the loss if a +residual value is pending). + +You can also cancel this disposal for returning to the previous state. diff --git a/account_asset_disposal/readme/ROADMAP.rst b/account_asset_disposal/readme/ROADMAP.rst new file mode 100644 index 000000000..8a165d900 --- /dev/null +++ b/account_asset_disposal/readme/ROADMAP.rst @@ -0,0 +1 @@ +* Include a specific message type for notifying the disposal. diff --git a/account_asset_disposal/readme/USAGE.rst b/account_asset_disposal/readme/USAGE.rst new file mode 100644 index 000000000..2826f6eb8 --- /dev/null +++ b/account_asset_disposal/readme/USAGE.rst @@ -0,0 +1,14 @@ +#. Go to *Accounting > Adviser > Assets*. +#. There you will find a 'Dispose' button (instead of standard 'Set to Close'). +#. After clicking it, a wizard pops-up for asking disposal date and loss + account to use if any residual value is pending. +#. Click on "Dispose asset". +#. A new screen will appear with the disposal account entry. +#. On the asset, all remaining depreciation lines are removed, and a new one + appears for the disposal move. + +You can cancel afterwards the disposal: + +#. Click on "Undo disposal" on the asset. +#. The disposal entry is removed. +#. The depreciation board is restored with all the remaining depreciations. diff --git a/account_asset_disposal/static/description/index.html b/account_asset_disposal/static/description/index.html new file mode 100644 index 000000000..6371e4fdc --- /dev/null +++ b/account_asset_disposal/static/description/index.html @@ -0,0 +1,462 @@ + + + + + + +Account asset disposal + + + +
+

Account asset disposal

+ + +

Beta License: AGPL-3 OCA/account-financial-tools Translate me on Weblate Try me on Runbot

+

This module enables a real asset disposal with the proper accounting entries.

+

When an asset gets broken or is totally depreciated, you can close it and Odoo +will generate automatically the asset close move (and compute the loss if a +residual value is pending).

+

You can also cancel this disposal for returning to the previous state.

+

Table of contents

+ +
+

Configuration

+
    +
  1. Go to Accounting > Configuration > Management > Asset Types.
  2. +
  3. There’s a new field called “Loss Account” for setting the default loss +account when disposing assets.
  4. +
+
+
+

Usage

+
    +
  1. Go to Accounting > Adviser > Assets.
  2. +
  3. There you will find a ‘Dispose’ button (instead of standard ‘Set to Close’).
  4. +
  5. After clicking it, a wizard pops-up for asking disposal date and loss +account to use if any residual value is pending.
  6. +
  7. Click on “Dispose asset”.
  8. +
  9. A new screen will appear with the disposal account entry.
  10. +
  11. On the asset, all remaining depreciation lines are removed, and a new one +appears for the disposal move.
  12. +
+

You can cancel afterwards the disposal:

+
    +
  1. Click on “Undo disposal” on the asset.
  2. +
  3. The disposal entry is removed.
  4. +
  5. The depreciation board is restored with all the remaining depreciations.
  6. +
+
+
+

Known issues / Roadmap

+
    +
  • Include a specific message type for notifying the disposal.
  • +
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Tecnativa
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/account-financial-tools project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/account_asset_disposal/tests/__init__.py b/account_asset_disposal/tests/__init__.py index c17e1a11b..370d5bbff 100644 --- a/account_asset_disposal/tests/__init__.py +++ b/account_asset_disposal/tests/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import test_account_asset_disposal diff --git a/account_asset_disposal/tests/test_account_asset_disposal.py b/account_asset_disposal/tests/test_account_asset_disposal.py index 537f1b960..7fe9d21a4 100644 --- a/account_asset_disposal/tests/test_account_asset_disposal.py +++ b/account_asset_disposal/tests/test_account_asset_disposal.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2016 Tecnativa - Antonio Espinosa # Copyright 2017 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). diff --git a/account_asset_disposal/wizards/__init__.py b/account_asset_disposal/wizards/__init__.py index 5536e88ab..d8300e19b 100644 --- a/account_asset_disposal/wizards/__init__.py +++ b/account_asset_disposal/wizards/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import account_asset_disposal_wizard diff --git a/account_asset_disposal/wizards/account_asset_disposal_wizard.py b/account_asset_disposal/wizards/account_asset_disposal_wizard.py index 29ffd866a..10e1f3966 100644 --- a/account_asset_disposal/wizards/account_asset_disposal_wizard.py +++ b/account_asset_disposal/wizards/account_asset_disposal_wizard.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2016 Tecnativa - Antonio Espinosa # Copyright 2017 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). diff --git a/account_asset_disposal/wizards/account_asset_disposal_wizard_view.xml b/account_asset_disposal/wizards/account_asset_disposal_wizard_view.xml index be4b6e4dc..ce691c205 100644 --- a/account_asset_disposal/wizards/account_asset_disposal_wizard_view.xml +++ b/account_asset_disposal/wizards/account_asset_disposal_wizard_view.xml @@ -1,8 +1,8 @@ - - - + account.asset.disposal.wizard.form @@ -23,5 +23,4 @@ - - +