[12.0][MIG] account_move_batch_validate: migrate

This commit is contained in:
Iryna Vushnevska
2019-07-25 22:57:39 +03:00
parent aa2355bd8b
commit 9b6e66b444
14 changed files with 16 additions and 160 deletions

View File

@@ -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

View File

@@ -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',

View File

@@ -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 ""

View File

@@ -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

View File

@@ -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

View File

@@ -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 <https://github.com/OCA/account-financial-tools/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 <https://github.com/OCA/account-financial-tools/issues/new?body=module:%20account_move_batch_validate%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Credits
=======
Contributors
------------
* Leonardo Pistone <leonardo.pistone@camptocamp.com>
* Nicolas Bessi <nicolas.bessi@camptocamp.com>
* Rudolf Schnapka <rs@techno-flex.de>
* Stéphane Bidoul (ACSONE) <stephane.bidoul@acsone.eu>
* Adrien Peiffer (ACSONE) <adrien.peiffer@acsone.eu>
* Benjamin Willig (ACSONE) <benjamin.willig@acsone.eu>
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.
* Benjamin Willig (ACSONE) <benjamin.willig@acsone.eu>

View File

@@ -1,3 +1 @@
# Copyright 2018 Camptocamp SA
from . import test_account_move_batch_validate

View File

@@ -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']

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2014 Camptocamp SA, 2017 ACSONE SA/NV
Copyright 2018 Camptocamp SA
Copyright 2019 Camptocamp SA
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>

View File

@@ -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

View File

@@ -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'),

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2014 Camptocamp SA, 2017 ACSONE SA/NV
Copyright 2018 Camptocamp SA
Copyright 2019 Camptocamp SA
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>

View File

@@ -1,2 +1,3 @@
server-ux
server-tools
queue