[MIG] account_move_reconcile_forbid_cancel: Migration to 18.0
parent
5bba3facbe
commit
c08d4ba485
|
@ -73,6 +73,10 @@ Contributors
|
||||||
- Ernesto Tejeda
|
- Ernesto Tejeda
|
||||||
- Pedro M. Baeza
|
- Pedro M. Baeza
|
||||||
|
|
||||||
|
- `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`__
|
||||||
|
|
||||||
|
- Bhavesh Heliconia
|
||||||
|
|
||||||
Maintainers
|
Maintainers
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": "Account Move Reconcile Forbid Cancel",
|
"name": "Account Move Reconcile Forbid Cancel",
|
||||||
"version": "16.0.1.0.1",
|
"version": "18.0.1.0.0",
|
||||||
"category": "Finance",
|
"category": "Finance",
|
||||||
"website": "https://github.com/OCA/account-reconcile",
|
"website": "https://github.com/OCA/account-reconcile",
|
||||||
"author": "Tecnativa, Odoo Community Association (OCA)",
|
"author": "Tecnativa, Odoo Community Association (OCA)",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright 2022 Tecnativa - Ernesto Tejeda
|
# Copyright 2022 Tecnativa - Ernesto Tejeda
|
||||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from odoo import _, models, tools
|
from odoo import models, tools
|
||||||
from odoo.exceptions import ValidationError
|
from odoo.exceptions import ValidationError
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ class AccountMove(models.Model):
|
||||||
):
|
):
|
||||||
if self._get_reconciled_amls():
|
if self._get_reconciled_amls():
|
||||||
raise ValidationError(
|
raise ValidationError(
|
||||||
_("You cannot reset to draft reconciled entries.")
|
self.env._("You cannot reset to draft reconciled entries.")
|
||||||
)
|
)
|
||||||
return super().button_draft()
|
return super().button_draft()
|
||||||
|
|
||||||
|
@ -25,5 +25,7 @@ class AccountMove(models.Model):
|
||||||
or self.env.context.get("test_reconcile_forbid_cancel")
|
or self.env.context.get("test_reconcile_forbid_cancel")
|
||||||
):
|
):
|
||||||
if self._get_reconciled_amls():
|
if self._get_reconciled_amls():
|
||||||
raise ValidationError(_("You cannot cancel reconciled entries."))
|
raise ValidationError(
|
||||||
|
self.env._("You cannot cancel reconciled entries.")
|
||||||
|
)
|
||||||
return super().button_cancel()
|
return super().button_cancel()
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
- [Tecnativa](https://www.tecnativa.com):
|
- [Tecnativa](https://www.tecnativa.com):
|
||||||
- Ernesto Tejeda
|
- Ernesto Tejeda
|
||||||
- Pedro M. Baeza
|
- Pedro M. Baeza
|
||||||
|
- [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io)
|
||||||
|
- Bhavesh Heliconia
|
||||||
|
|
|
@ -420,6 +420,10 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
||||||
<li>Pedro M. Baeza</li>
|
<li>Pedro M. Baeza</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
<li><a class="reference external" href="https://www.heliconia.io">Heliconia Solutions Pvt. Ltd.</a><ul>
|
||||||
|
<li>Bhavesh Heliconia</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="maintainers">
|
<div class="section" id="maintainers">
|
||||||
|
|
|
@ -3,10 +3,12 @@
|
||||||
|
|
||||||
from odoo import fields
|
from odoo import fields
|
||||||
from odoo.exceptions import ValidationError
|
from odoo.exceptions import ValidationError
|
||||||
from odoo.tests.common import Form, TransactionCase
|
from odoo.tests import Form
|
||||||
|
|
||||||
|
from odoo.addons.base.tests.common import BaseCommon
|
||||||
|
|
||||||
|
|
||||||
class TestAccountMoveReconcileForbidCancel(TransactionCase):
|
class TestAccountMoveReconcileForbidCancel(BaseCommon):
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
super().setUpClass()
|
super().setUpClass()
|
||||||
|
|
Loading…
Reference in New Issue