diff --git a/account_move_batch_validate/__init__.py b/account_move_batch_validate/__init__.py index c52677679..9b4296142 100644 --- a/account_move_batch_validate/__init__.py +++ b/account_move_batch_validate/__init__.py @@ -1,6 +1,2 @@ -# Copyright 2014 Camptocamp SA, 2017 ACSONE -# Copyright 2018 Camptocamp SA -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - from . import models from . import wizard diff --git a/account_move_batch_validate/__manifest__.py b/account_move_batch_validate/__manifest__.py index 4652e998e..d1b87a1ec 100644 --- a/account_move_batch_validate/__manifest__.py +++ b/account_move_batch_validate/__manifest__.py @@ -1,9 +1,9 @@ # Copyright 2014 Camptocamp SA, 2017 ACSONE -# Copyright 2018 Camptocamp SA +# Copyright 2019 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { 'name': "Account Move Batch Validate", - 'version': '11.0.1.0.2', + 'version': '12.0.1.0.0', 'author': "Camptocamp, Odoo Community Association (OCA)", 'website': 'https://github.com/OCA/account-financial-tools', 'category': 'Finance', diff --git a/account_move_batch_validate/i18n/account_move_batch_validate.pot b/account_move_batch_validate/i18n/account_move_batch_validate.pot deleted file mode 100644 index b8e9560e2..000000000 --- a/account_move_batch_validate/i18n/account_move_batch_validate.pot +++ /dev/null @@ -1,73 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * account_move_batch_validate -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" -"Report-Msgid-Bugs-To: \n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: account_move_batch_validate -#: model:ir.model,name:account_move_batch_validate.model_account_move -msgid "Account Entry" -msgstr "" - -#. module: account_move_batch_validate -#: model:ir.model.fields,field_description:account_move_batch_validate.field_validate_account_move_action -msgid "Action" -msgstr "" - -#. module: account_move_batch_validate -#: model:ir.model.fields,help:account_move_batch_validate.field_account_move_to_post -msgid "Check this box to mark the move for batch posting" -msgstr "" - -#. module: account_move_batch_validate -#: code:addons/account_move_batch_validate/models/account_move.py:39 -#, python-format -msgid "Move has been posted successfully." -msgstr "" - -#. module: account_move_batch_validate -#: code:addons/account_move_batch_validate/models/account_move.py:41 -#, python-format -msgid "Nothing to do because the record has been deleted." -msgstr "" - -#. module: account_move_batch_validate -#: model:ir.model.fields,field_description:account_move_batch_validate.field_account_move_to_post -msgid "Posting requested" -msgstr "" - -#. module: account_move_batch_validate -#: model:ir.model.fields,field_description:account_move_batch_validate.field_validate_account_move_eta -msgid "Seconds to wait before starting the jobs" -msgstr "" - -#. module: account_move_batch_validate -#: code:addons/account_move_batch_validate/models/account_move.py:90 -#, python-format -msgid "Task set to Done because the user unmarked the move." -msgstr "" - -#. module: account_move_batch_validate -#: model:ir.model.fields,field_description:account_move_batch_validate.field_account_move_post_job_uuid -msgid "UUID of the Job to approve this move" -msgstr "" - -#. module: account_move_batch_validate -#: model:ir.model.fields,field_description:account_move_batch_validate.field_validate_account_move_asynchronous -msgid "Use asynchronous validation" -msgstr "" - -#. module: account_move_batch_validate -#: model:ir.model,name:account_move_batch_validate.model_validate_account_move -msgid "Validate Account Move" -msgstr "" - diff --git a/account_move_batch_validate/models/__init__.py b/account_move_batch_validate/models/__init__.py index 6863f5d5c..9c0a42138 100644 --- a/account_move_batch_validate/models/__init__.py +++ b/account_move_batch_validate/models/__init__.py @@ -1,5 +1 @@ -# Copyright 2014 Camptocamp SA, 2017 ACSONE -# Copyright 2018 Camptocamp SA -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - from . import account_move diff --git a/account_move_batch_validate/models/account_move.py b/account_move_batch_validate/models/account_move.py index b91696869..37dbd7507 100644 --- a/account_move_batch_validate/models/account_move.py +++ b/account_move_batch_validate/models/account_move.py @@ -1,5 +1,5 @@ # Copyright 2014 Camptocamp SA, 2017 ACSONE -# Copyright 2018 Camptocamp SA +# Copyright 2019 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). import logging diff --git a/account_move_batch_validate/readme/CONTRIBUTORS.rst b/account_move_batch_validate/readme/CONTRIBUTORS.rst index bddbfe990..e19eb87aa 100644 --- a/account_move_batch_validate/readme/CONTRIBUTORS.rst +++ b/account_move_batch_validate/readme/CONTRIBUTORS.rst @@ -1,66 +1,6 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :alt: License - -Account Move Batch Validate -=========================== - -This module provides a wizard to post many Journal Entries in batch. it -uses the queue system introduced by the Odoo Queue job module to handle a -big quantity of moves in batch. - -The posting of a move takes some time, and doing that synchronously, -in one transaction is problematic. - -In this module, we leverage the power of the queue system of the -Odoo queue job module, that can be very well used without other concepts -like Backends and Bindings. - -This approach provides many advantages, similar to the ones we get -using that connector for e-commerce: - -- Asynchronous: the operation is done in background, and users can - continue to work. -- Dedicated workers: the queued jobs are performed by specific workers - (processes). This is good for a long task, since the main workers are - busy handling HTTP requests and can be killed if operations take - too long, for example. -- Multiple transactions: this is an operation that doesn't need to be - atomic, and if a line out of 100,000 fails, it is possible to catch - it, see the error message, and fix the situation. Meanwhile, all - other jobs can proceed. - - -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 -`here `_. - - -Credits -======= - -Contributors ------------- - * Leonardo Pistone * Nicolas Bessi * Rudolf Schnapka * Stéphane Bidoul (ACSONE) * Adrien Peiffer (ACSONE) -* Benjamin Willig (ACSONE) - -Maintainer ----------- - -.. image:: http://odoo-community.org/logo.png - :alt: Odoo Community Association - :target: http://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 http://odoo-community.org. \ No newline at end of file +* Benjamin Willig (ACSONE) \ No newline at end of file diff --git a/account_move_batch_validate/readme/USAGE.rst b/account_move_batch_validate/readme/DESCRIPTION.rst similarity index 100% rename from account_move_batch_validate/readme/USAGE.rst rename to account_move_batch_validate/readme/DESCRIPTION.rst diff --git a/account_move_batch_validate/tests/__init__.py b/account_move_batch_validate/tests/__init__.py index a83faa445..36e5827a5 100644 --- a/account_move_batch_validate/tests/__init__.py +++ b/account_move_batch_validate/tests/__init__.py @@ -1,3 +1 @@ -# Copyright 2018 Camptocamp SA - from . import test_account_move_batch_validate diff --git a/account_move_batch_validate/tests/test_account_move_batch_validate.py b/account_move_batch_validate/tests/test_account_move_batch_validate.py index b5e5f5275..09ac7c7ae 100644 --- a/account_move_batch_validate/tests/test_account_move_batch_validate.py +++ b/account_move_batch_validate/tests/test_account_move_batch_validate.py @@ -1,5 +1,5 @@ # Copyright 2017 ACSONE SA/NV -# Copyright 2018 Camptocamp SA +# Copyright 2019 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo.tests.common import SingleTransactionCase @@ -10,7 +10,9 @@ class TestAccountMoveBatchValidate(SingleTransactionCase): @classmethod def setUpClass(self): - super(TestAccountMoveBatchValidate, self).setUpClass() + super().setUpClass() + self.env = self.env(context=dict( + self.env.context, tracking_disable=True)) self.AccountObj = self.env['account.account'] self.AccountJournalObj = self.env['account.journal'] self.AccountMoveObj = self.env['account.move'] diff --git a/account_move_batch_validate/views/account_move.xml b/account_move_batch_validate/views/account_move.xml index bb13a1662..283015327 100644 --- a/account_move_batch_validate/views/account_move.xml +++ b/account_move_batch_validate/views/account_move.xml @@ -1,6 +1,6 @@ diff --git a/account_move_batch_validate/wizard/__init__.py b/account_move_batch_validate/wizard/__init__.py index 31e941f01..3b3fbeab7 100644 --- a/account_move_batch_validate/wizard/__init__.py +++ b/account_move_batch_validate/wizard/__init__.py @@ -1,5 +1 @@ -# Copyright 2014 Camptocamp SA, 2017 ACSONE -# Copyright 2018 Camptocamp SA -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - from . import account_move_validate diff --git a/account_move_batch_validate/wizard/account_move_validate.py b/account_move_batch_validate/wizard/account_move_validate.py index 729ea2851..92cb1f9e9 100644 --- a/account_move_batch_validate/wizard/account_move_validate.py +++ b/account_move_batch_validate/wizard/account_move_validate.py @@ -1,10 +1,10 @@ # Copyright 2014 Camptocamp SA, 2017 ACSONE -# Copyright 2018 Camptocamp SA +# Copyright 2019 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). import logging -from odoo import api, fields, models +from odoo import api, fields, models, _ _logger = logging.getLogger(__name__) @@ -33,8 +33,8 @@ class AccountMoveValidate(models.TransientModel): @api.model def _get_actions(self): return [ - ('mark', 'Mark for posting'), - ('unmark', 'Unmark for posting') + ('mark', _('Mark for posting')), + ('unmark', _('Unmark for posting')) ] @api.multi @@ -42,7 +42,7 @@ class AccountMoveValidate(models.TransientModel): self.ensure_one() if not self.asynchronous: - return super(AccountMoveValidate, self).validate_move() + return super().validate_move() wizard_data = { 'move_ids': self.env.context.get('active_ids'), diff --git a/account_move_batch_validate/wizard/account_move_validate.xml b/account_move_batch_validate/wizard/account_move_validate.xml index 0f05406ca..721c08c16 100644 --- a/account_move_batch_validate/wizard/account_move_validate.xml +++ b/account_move_batch_validate/wizard/account_move_validate.xml @@ -1,6 +1,6 @@ diff --git a/oca_dependencies.txt b/oca_dependencies.txt index 95f7e4acb..c788c80e5 100644 --- a/oca_dependencies.txt +++ b/oca_dependencies.txt @@ -1,2 +1,3 @@ server-ux server-tools +queue