diff --git a/account_bank_statement_clearing_account/README.rst b/account_bank_statement_clearing_account/README.rst index 38929e87..830495f8 100644 --- a/account_bank_statement_clearing_account/README.rst +++ b/account_bank_statement_clearing_account/README.rst @@ -1,35 +1,110 @@ -**This file is going to be generated by oca-gen-addon-readme.** +============================================= +Reconcile entries from pseudo bank statements +============================================= -*Manual changes will be overwritten.* +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -Please provide content in the ``readme`` directory: +.. |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%2Fbank--statement--import-lightgray.png?logo=github + :target: https://github.com/OCA/bank-statement-import/tree/13.0/account_bank_statement_clearing_account + :alt: OCA/bank-statement-import +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/bank-statement-import-13-0/bank-statement-import-13-0-account_bank_statement_clearing_account + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/174/13.0 + :alt: Try me on Runbot -* **DESCRIPTION.rst** (required) -* INSTALL.rst (optional) -* CONFIGURE.rst (optional) -* **USAGE.rst** (optional, highly recommended) -* DEVELOP.rst (optional) -* ROADMAP.rst (optional) -* HISTORY.rst (optional, recommended) -* **CONTRIBUTORS.rst** (optional, highly recommended) -* CREDITS.rst (optional) +|badge1| |badge2| |badge3| |badge4| |badge5| -Content of this README will also be drawn from the addon manifest, -from keys such as name, authors, maintainers, development_status, -and license. +This is a technical modules that you can use to improve the processing of +statement files from payment providers. These statements usually consist +of lines that to be reconciled by customer debts, offset by lines that are +to be reconciled by the imbursements from the payment provider, corrected +for customer credits and the costs of the payment provider. Typically, the +balance of such a statement is zero. Effectively, the counterpart of each +statement line is made on a clearing account and you should keep track of +the balance of the clearing account to see if the payment provider still owes +you money. You can keep track of the account by reconciling each entry on it. -A good, one sentence summary in the manifest is also highly recommended. +That is where this module comes in. When importing such a statement, this +module reconciles all the counterparts on the clearing account with one +another. Reconciliation is executed when validating the statement. When +reopening the statement, the reconcilation is undone. +Known issues +============ +This module does not come with its own tests because it depends on a +statement filter being installed. Instead, it is tested in +`account_bank_statement_import_adyen` -Automatic changelog generation -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +**Table of contents** -`HISTORY.rst` can be auto generated using `towncrier `_. +.. contents:: + :local: -Just put towncrier compatible changelog fragments into `readme/newsfragments` -and the changelog file will be automatically generated and updated when a new fragment is added. +Configuration +============= -Please refer to `towncrier` documentation to know more. +In order to enable the reconcilation of the counterparts of zero-balance +statement files from payment providers, you need to make sure that the journal +that is used for these statements have the same default debit account as their +default credit account, and this account is configured for reconciliation. -NOTE: the changelog will be automatically generated when using `/ocabot merge $option`. -If you need to run it manually, refer to `OCA/maintainer-tools README `_. +Usage +===== + +After installing this module, any statement where the sum of all debit and +credit lines match, and where the default journal account is reconcilable, will +reconcile all posted moved when the statement is confirmed. + +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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Opener B.V. +* Vanmoof BV + +Contributors +~~~~~~~~~~~~ + +* Stefan Rijnhart (https://opener.amsterdam) +* Martin Pishpecki (https://www.vanmoof.com) +* Ronald Portier (https://therp.nl) + +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/bank-statement-import `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_bank_statement_clearing_account/__manifest__.py b/account_bank_statement_clearing_account/__manifest__.py index 5f6e364f..91148a50 100644 --- a/account_bank_statement_clearing_account/__manifest__.py +++ b/account_bank_statement_clearing_account/__manifest__.py @@ -1,13 +1,13 @@ -# © 2017 Opener BV () -# © 2020 Vanmoof BV () -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +# Copyright 2017 Opener BV () +# Copyright 2020 Vanmoof BV () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Reconcile entries from pseudo bank statements", - "version": "12.0.1.0.0", + "version": "13.0.1.0.0", "author": "Opener B.V., Vanmoof BV, Odoo Community Association (OCA)", "category": "Banking addons", - "website": "https://opener.am", + "website": "https://github.com/oca/bank-statement-import", "license": "AGPL-3", - "depends": ["account_cancel",], + "depends": ["account"], "installable": True, } diff --git a/account_bank_statement_clearing_account/models/account_bank_statement.py b/account_bank_statement_clearing_account/models/account_bank_statement.py index cf5ebadb..79baf5dc 100644 --- a/account_bank_statement_clearing_account/models/account_bank_statement.py +++ b/account_bank_statement_clearing_account/models/account_bank_statement.py @@ -1,13 +1,12 @@ -# © 2017 Opener BV () -# © 2020 Vanmoof BV () -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from odoo import api, models +# Copyright 2017 Opener BV () +# Copyright 2020 Vanmoof BV () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo import models class BankStatement(models.Model): _inherit = "account.bank.statement" - @api.multi def get_reconcile_clearing_account_lines(self): """ If this statement qualifies for clearing account reconciliation, return the relevant lines to (un)reconcile. This is the case if the @@ -45,7 +44,6 @@ class BankStatement(models.Model): return False return move_lines - @api.multi def reconcile_clearing_account(self): """ If applicable, reconcile the clearing account lines in case all lines are still unreconciled. """ @@ -58,7 +56,6 @@ class BankStatement(models.Model): lines.reconcile() return True - @api.multi def unreconcile_clearing_account(self): """ If applicable, unreconcile the clearing account lines if still fully reconciled with each other. """ @@ -72,16 +69,14 @@ class BankStatement(models.Model): return True return False - @api.multi - def button_draft(self): + def button_reopen(self): """ When setting the statement back to draft, unreconcile the reconciliation on the clearing account """ - res = super(BankStatement, self).button_draft() + res = super(BankStatement, self).button_reopen() for statement in self: statement.unreconcile_clearing_account() return res - @api.multi def button_confirm_bank(self): """ When confirming the statement, trigger the reconciliation of the lines on the clearing account (if applicable) """ diff --git a/account_bank_statement_clearing_account/readme/CONTRIBUTORS.rst b/account_bank_statement_clearing_account/readme/CONTRIBUTORS.rst index 58e9f494..f00439e5 100644 --- a/account_bank_statement_clearing_account/readme/CONTRIBUTORS.rst +++ b/account_bank_statement_clearing_account/readme/CONTRIBUTORS.rst @@ -1,2 +1,3 @@ * Stefan Rijnhart (https://opener.amsterdam) * Martin Pishpecki (https://www.vanmoof.com) +* Ronald Portier (https://therp.nl) diff --git a/account_bank_statement_clearing_account/readme/USAGE.rst b/account_bank_statement_clearing_account/readme/USAGE.rst index e69de29b..9f9ef0ac 100644 --- a/account_bank_statement_clearing_account/readme/USAGE.rst +++ b/account_bank_statement_clearing_account/readme/USAGE.rst @@ -0,0 +1,3 @@ +After installing this module, any statement where the sum of all debit and +credit lines match, and where the default journal account is reconcilable, will +reconcile all posted moved when the statement is confirmed. diff --git a/account_bank_statement_clearing_account/static/description/index.html b/account_bank_statement_clearing_account/static/description/index.html new file mode 100644 index 00000000..ba3839a4 --- /dev/null +++ b/account_bank_statement_clearing_account/static/description/index.html @@ -0,0 +1,442 @@ + + + + + + +Reconcile entries from pseudo bank statements + + + +
+

Reconcile entries from pseudo bank statements

+ + +

Beta License: AGPL-3 OCA/bank-statement-import Translate me on Weblate Try me on Runbot

+

This is a technical modules that you can use to improve the processing of +statement files from payment providers. These statements usually consist +of lines that to be reconciled by customer debts, offset by lines that are +to be reconciled by the imbursements from the payment provider, corrected +for customer credits and the costs of the payment provider. Typically, the +balance of such a statement is zero. Effectively, the counterpart of each +statement line is made on a clearing account and you should keep track of +the balance of the clearing account to see if the payment provider still owes +you money. You can keep track of the account by reconciling each entry on it.

+

That is where this module comes in. When importing such a statement, this +module reconciles all the counterparts on the clearing account with one +another. Reconciliation is executed when validating the statement. When +reopening the statement, the reconcilation is undone.

+
+

Known issues

+

This module does not come with its own tests because it depends on a +statement filter being installed. Instead, it is tested in +account_bank_statement_import_adyen

+

Table of contents

+
+
+

Configuration

+

In order to enable the reconcilation of the counterparts of zero-balance +statement files from payment providers, you need to make sure that the journal +that is used for these statements have the same default debit account as their +default credit account, and this account is configured for reconciliation.

+
+
+

Usage

+

After installing this module, any statement where the sum of all debit and +credit lines match, and where the default journal account is reconcilable, will +reconcile all posted moved when the statement is confirmed.

+
+
+

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.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Opener B.V.
  • +
  • Vanmoof BV
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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/bank-statement-import project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ +