diff --git a/account_asset_batch_compute/README.rst b/account_asset_batch_compute/README.rst index fa64141be..0fa7bc52c 100644 --- a/account_asset_batch_compute/README.rst +++ b/account_asset_batch_compute/README.rst @@ -14,13 +14,13 @@ Account Asset Batch Compute :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/12.0/account_asset_batch_compute + :target: https://github.com/OCA/account-financial-tools/tree/13.0/account_asset_batch_compute :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-12-0/account-financial-tools-12-0-account_asset_batch_compute + :target: https://translation.odoo-community.org/projects/account-financial-tools-13-0/account-financial-tools-13-0-account_asset_batch_compute :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/12.0 + :target: https://runbot.odoo-community.org/runbot/92/13.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -29,7 +29,6 @@ Add the possibility to compute assets in batch. This module adds a flag on compute assets wizard in order to execute this process in batch. - **Table of contents** .. contents:: @@ -41,7 +40,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -52,13 +51,14 @@ Authors ~~~~~~~ * ACSONE SA/NV -* Eficent +* ForgeFlow Contributors ~~~~~~~~~~~~ * Adrien Peiffer -* Jordi Ballester Alomar +* Jordi Ballester Alomar +* Alba Riera Maintainers ~~~~~~~~~~~ @@ -73,6 +73,6 @@ 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. +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_batch_compute/__manifest__.py b/account_asset_batch_compute/__manifest__.py index 1b941025e..6138dad20 100644 --- a/account_asset_batch_compute/__manifest__.py +++ b/account_asset_batch_compute/__manifest__.py @@ -5,10 +5,10 @@ "name": "Account Asset Batch Compute", "summary": """ Add the possibility to compute assets in batch""", - "version": "12.0.1.0.0", + "version": "13.0.1.0.0", "license": "AGPL-3", - "author": "ACSONE SA/NV," "Eficent," "Odoo Community Association (OCA)", + "author": "ACSONE SA/NV,ForgeFlow,Odoo Community Association (OCA)", "website": "https://github.com/OCA/account-financial-tools", - "depends": ["account_asset_management", "queue_job",], - "data": ["wizards/account_asset_compute_views.xml",], + "depends": ["account_asset_management", "queue_job"], + "data": ["wizards/account_asset_compute_views.xml", "data/queue_data.xml"], } diff --git a/account_asset_batch_compute/data/queue_data.xml b/account_asset_batch_compute/data/queue_data.xml new file mode 100644 index 000000000..ebb5ca8cc --- /dev/null +++ b/account_asset_batch_compute/data/queue_data.xml @@ -0,0 +1,23 @@ + + + + account_asset_batch_compute + + + + + _compute_entries + + + + + asset_compute + + + diff --git a/account_asset_batch_compute/models/account_asset.py b/account_asset_batch_compute/models/account_asset.py index 4112dcba1..761c7f585 100644 --- a/account_asset_batch_compute/models/account_asset.py +++ b/account_asset_batch_compute/models/account_asset.py @@ -1,24 +1,13 @@ # Copyright 2016 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -import logging - -from odoo import _, api, models - -_logger = logging.getLogger(__name__) - -try: - from odoo.addons.queue_job.job import job -except ImportError: - _logger.debug("Can not `import queue_job`.") +from odoo import _, models class AccountAsset(models.Model): _inherit = "account.asset" - @api.multi - @job(default_channel="root.account_asset_batch_compute") def _compute_entries(self, date_end, check_triggers=False): if self.env.context.get( "asset_batch_processing", False diff --git a/account_asset_batch_compute/readme/CONTRIBUTORS.rst b/account_asset_batch_compute/readme/CONTRIBUTORS.rst index 615367e6f..13321599b 100644 --- a/account_asset_batch_compute/readme/CONTRIBUTORS.rst +++ b/account_asset_batch_compute/readme/CONTRIBUTORS.rst @@ -1,2 +1,3 @@ * Adrien Peiffer -* Jordi Ballester Alomar +* Jordi Ballester Alomar +* Alba Riera diff --git a/account_asset_batch_compute/static/description/index.html b/account_asset_batch_compute/static/description/index.html index 716ae194e..d689f3680 100644 --- a/account_asset_batch_compute/static/description/index.html +++ b/account_asset_batch_compute/static/description/index.html @@ -3,7 +3,7 @@ - + Account Asset Batch Compute