Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
67ea85e
[ADD] account_move_reconcile_forbid_cancel: new module
Jun 17, 2022
a46c0e7
Translated using Weblate (Spanish)
ernestotejeda Jun 29, 2022
ce99f10
[FIX] account_move_reconcile_forbid_cancel: make it compatible with t…
Jul 5, 2022
373f236
[FIX] account_move_reconcile_forbid_cancel: wrong payable acc detecti…
Jul 5, 2022
0701230
[IMP] account_move_reconcile_forbid_cancel: Add context to skip restr…
carlosdauden Sep 20, 2022
72a662a
[IMP] account_move_reconcile_forbid_cancel: black, isort, prettier
victoralmau Nov 22, 2022
17c28ce
[MIG] account_move_reconcile_forbid_cancel: Migration to 15.0
victoralmau Nov 22, 2022
b42706d
Added translation using Weblate (Portuguese (Brazil))
douglascstd Mar 17, 2023
6a8d048
Translated using Weblate (Portuguese (Brazil))
douglascstd Mar 17, 2023
3eec79a
[MIG] account_move_reconcile_forbid_cancel: Migration to 16.0
Jul 19, 2023
bb8047f
Translated using Weblate (Spanish)
Ivorra78 Sep 4, 2023
df7c6e5
[IMP] account_move_reconcile_forbid_cancel: test performance improvement
josep-tecnativa Oct 16, 2023
6e9a8f0
Added translation using Weblate (Italian)
mymage Feb 21, 2024
b426604
Translated using Weblate (Italian)
mymage Feb 21, 2024
9463d72
Added translation using Weblate (Swedish)
jakobkrabbe Feb 29, 2024
50de124
Translated using Weblate (Swedish)
jakobkrabbe Feb 29, 2024
7c5fc39
[IMP] account_move_reconcile_forbid_cancel: pre-commit auto fixes
BhaveshHeliconia Feb 14, 2025
105dfb0
[MIG] account_move_reconcile_forbid_cancel: Migration to 17.0
BhaveshHeliconia Feb 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 95 additions & 0 deletions account_move_reconcile_forbid_cancel/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
====================================
Account Move Reconcile Forbid Cancel
====================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:b1986780e3b36e29e2fa84cb759bf295a93cff7872c7856697bbc95fe0fc3c17
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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--reconcile-lightgray.png?logo=github
:target: https://github.com/OCA/account-reconcile/tree/17.0/account_move_reconcile_forbid_cancel
:alt: OCA/account-reconcile
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-reconcile-17-0/account-reconcile-17-0-account_move_reconcile_forbid_cancel
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-reconcile&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module restricts to cancel or reset to draft any invoice/journal
entry that has been reconciled (aka paid).

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module, you need to:

1. Go to *Invoicing > Customers > Invoices*
2. Access an invoice that has a payment.
3. Click on the 'Reset to Draft' button and you will get an error
message to prevent you from resetting the invoice to draft state
because it has already an associated payment.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-reconcile/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/account-reconcile/issues/new?body=module:%20account_move_reconcile_forbid_cancel%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
-------

* Tecnativa

Contributors
------------

- `Tecnativa <https://www.tecnativa.com>`__:

- Ernesto Tejeda
- Pedro M. Baeza

- `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`__

- Bhavesh Heliconia

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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-reconcile <https://github.com/OCA/account-reconcile/tree/17.0/account_move_reconcile_forbid_cancel>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions account_move_reconcile_forbid_cancel/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
12 changes: 12 additions & 0 deletions account_move_reconcile_forbid_cancel/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright 2022 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Account Move Reconcile Forbid Cancel",
"version": "17.0.1.0.0",
"category": "Finance",
"website": "https://github.com/OCA/account-reconcile",
"author": "Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
"depends": ["account"],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_move_reconcile_forbid_cancel
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.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_reconcile_forbid_cancel
#: model:ir.model,name:account_move_reconcile_forbid_cancel.model_account_move
msgid "Journal Entry"
msgstr ""

#. module: account_move_reconcile_forbid_cancel
#. odoo-python
#: code:addons/account_move_reconcile_forbid_cancel/models/account_move.py:0
#, python-format
msgid "You cannot cancel reconciled entries."
msgstr ""

#. module: account_move_reconcile_forbid_cancel
#. odoo-python
#: code:addons/account_move_reconcile_forbid_cancel/models/account_move.py:0
#, python-format
msgid "You cannot reset to draft reconciled entries."
msgstr ""
40 changes: 40 additions & 0 deletions account_move_reconcile_forbid_cancel/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_move_reconcile_forbid_cancel
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-06-20 14:20+0000\n"
"PO-Revision-Date: 2023-09-04 17:29+0000\n"
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: account_move_reconcile_forbid_cancel
#: model:ir.model,name:account_move_reconcile_forbid_cancel.model_account_move
msgid "Journal Entry"
msgstr "Entrada Diaria"

#. module: account_move_reconcile_forbid_cancel
#. odoo-python
#: code:addons/account_move_reconcile_forbid_cancel/models/account_move.py:0
#, python-format
msgid "You cannot cancel reconciled entries."
msgstr "No se pueden cancelar las entradas reconciliadas."

#. module: account_move_reconcile_forbid_cancel
#. odoo-python
#: code:addons/account_move_reconcile_forbid_cancel/models/account_move.py:0
#, python-format
msgid "You cannot reset to draft reconciled entries."
msgstr "No se pueden anular los borradores de entradas conciliadas."

#~ msgid "Journal Entries"
#~ msgstr "Asientos contables"
36 changes: 36 additions & 0 deletions account_move_reconcile_forbid_cancel/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_move_reconcile_forbid_cancel
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-02-21 17:35+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: account_move_reconcile_forbid_cancel
#: model:ir.model,name:account_move_reconcile_forbid_cancel.model_account_move
msgid "Journal Entry"
msgstr "Registrazione contabile"

#. module: account_move_reconcile_forbid_cancel
#. odoo-python
#: code:addons/account_move_reconcile_forbid_cancel/models/account_move.py:0
#, python-format
msgid "You cannot cancel reconciled entries."
msgstr "Non si possono annullare le entrate riconciliate."

#. module: account_move_reconcile_forbid_cancel
#. odoo-python
#: code:addons/account_move_reconcile_forbid_cancel/models/account_move.py:0
#, python-format
msgid "You cannot reset to draft reconciled entries."
msgstr "Non si possono riportare a bozza le entrate riconciliate."
36 changes: 36 additions & 0 deletions account_move_reconcile_forbid_cancel/i18n/pt_BR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_move_reconcile_forbid_cancel
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-03-17 22:25+0000\n"
"Last-Translator: Douglas Custódio <douglascstd@yahoo.com>\n"
"Language-Team: none\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 4.14.1\n"

#. module: account_move_reconcile_forbid_cancel
#: model:ir.model,name:account_move_reconcile_forbid_cancel.model_account_move
msgid "Journal Entry"
msgstr "Lançamento de Diário"

#. module: account_move_reconcile_forbid_cancel
#. odoo-python
#: code:addons/account_move_reconcile_forbid_cancel/models/account_move.py:0
#, python-format
msgid "You cannot cancel reconciled entries."
msgstr "Você não pode cancelar lançamentos reconciliados."

#. module: account_move_reconcile_forbid_cancel
#. odoo-python
#: code:addons/account_move_reconcile_forbid_cancel/models/account_move.py:0
#, python-format
msgid "You cannot reset to draft reconciled entries."
msgstr "Você não pode redefinir para rascunho lançamentos reconciliados."
36 changes: 36 additions & 0 deletions account_move_reconcile_forbid_cancel/i18n/sv.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_move_reconcile_forbid_cancel
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-02-29 13:34+0000\n"
"Last-Translator: jakobkrabbe <jakob@syscare.se>\n"
"Language-Team: none\n"
"Language: sv\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: account_move_reconcile_forbid_cancel
#: model:ir.model,name:account_move_reconcile_forbid_cancel.model_account_move
msgid "Journal Entry"
msgstr "Verifikat"

#. module: account_move_reconcile_forbid_cancel
#. odoo-python
#: code:addons/account_move_reconcile_forbid_cancel/models/account_move.py:0
#, python-format
msgid "You cannot cancel reconciled entries."
msgstr "Du kan inte avbryta avstämda verifikat."

#. module: account_move_reconcile_forbid_cancel
#. odoo-python
#: code:addons/account_move_reconcile_forbid_cancel/models/account_move.py:0
#, python-format
msgid "You cannot reset to draft reconciled entries."
msgstr "Du kan inte återställa till utkast avstämda verifikat."
3 changes: 3 additions & 0 deletions account_move_reconcile_forbid_cancel/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import account_move
29 changes: 29 additions & 0 deletions account_move_reconcile_forbid_cancel/models/account_move.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright 2022 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import _, models, tools
from odoo.exceptions import ValidationError


class AccountMove(models.Model):
_inherit = "account.move"

def button_draft(self):
if not self.env.context.get("skip_reconcile_forbid_cancel") and (
not tools.config["test_enable"]
or self.env.context.get("test_reconcile_forbid_cancel")
):
if self._get_reconciled_amls():
raise ValidationError(
_("You cannot reset to draft reconciled entries.")
)
return super().button_draft()

def button_cancel(self):
if not self.env.context.get("skip_reconcile_forbid_cancel") and (
not tools.config["test_enable"]
or self.env.context.get("test_reconcile_forbid_cancel")
):
if self._get_reconciled_amls():
raise ValidationError(_("You cannot cancel reconciled entries."))
return super().button_cancel()
3 changes: 3 additions & 0 deletions account_move_reconcile_forbid_cancel/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
5 changes: 5 additions & 0 deletions account_move_reconcile_forbid_cancel/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- [Tecnativa](https://www.tecnativa.com):
- Ernesto Tejeda
- Pedro M. Baeza
- [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io)
- Bhavesh Heliconia
2 changes: 2 additions & 0 deletions account_move_reconcile_forbid_cancel/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module restricts to cancel or reset to draft any invoice/journal
entry that has been reconciled (aka paid).
7 changes: 7 additions & 0 deletions account_move_reconcile_forbid_cancel/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
To use this module, you need to:

1. Go to *Invoicing \> Customers \> Invoices*
2. Access an invoice that has a payment.
3. Click on the 'Reset to Draft' button and you will get an error
message to prevent you from resetting the invoice to draft state
because it has already an associated payment.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading