diff --git a/account_skip_bank_reconciliation/README.rst b/account_skip_bank_reconciliation/README.rst new file mode 100644 index 00000000..ca16ae8a --- /dev/null +++ b/account_skip_bank_reconciliation/README.rst @@ -0,0 +1,102 @@ +================================ +Account Skip Bank Reconciliation +================================ + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/13.0/account_skip_bank_reconciliation + :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-13-0/account-reconcile-13-0-account_skip_bank_reconciliation + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/98/13.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows to exclude from bank statement reconciliation +all journal items of a specific reconcilable account. It also allows +to specify in the Bank Journal which accounts should be taken into account +for reconciliation. + +Usually, you would want to that in accounts like the +`Goods Received Not Invoiced`, which are required to be reconcilable +to be able to have proper traceability in stock received but +their reconciliation is done using the `account_mass_reconcile` module. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use this module, you can choose one of the following approaches: + +1. Go to `Invoicing / Configuration / Accounting / Charts of Accounts` + and open a reconcilable account. +2. In that account, select or not the `Exclude from Bank Reconciliation` option. + +or + +1. Go to `Invoicing / Configuration / Accounting / Journals` and open any + bank Journal +2. In the Journal select the accounts that you would like to be proposed in + reconciliations. + +Be careful, if an account is set to be excluded it will be excluded even if it +appears in the Bank Journal to be considered for reconciliation. + +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 +~~~~~~~ + +* ForgeFlow + +Contributors +~~~~~~~~~~~~ + +* Miquel Raïch +* Adrià Gil Sorribes +* Lois Rilo + +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 `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_skip_bank_reconciliation/__init__.py b/account_skip_bank_reconciliation/__init__.py new file mode 100644 index 00000000..4b76c7b2 --- /dev/null +++ b/account_skip_bank_reconciliation/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from . import models diff --git a/account_skip_bank_reconciliation/__manifest__.py b/account_skip_bank_reconciliation/__manifest__.py new file mode 100644 index 00000000..2680f258 --- /dev/null +++ b/account_skip_bank_reconciliation/__manifest__.py @@ -0,0 +1,16 @@ +# Copyright 2020 ForgeFlow S.L. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +{ + "name": "Account Skip Bank Reconciliation", + "summary": "Allows to exclude from bank statement reconciliation " + "all journal items of a reconcilable account", + "version": "13.0.1.0.0", + "depends": ["account"], + "author": "ForgeFlow, Odoo Community Association (OCA)", + "website": "https://www.github.com/OCA/account-reconcile", + "category": "Finance", + "data": ["views/account_view.xml", "views/account_journal_view.xml"], + "license": "AGPL-3", + "installable": True, +} diff --git a/account_skip_bank_reconciliation/i18n/account_skip_bank_reconciliation.pot b/account_skip_bank_reconciliation/i18n/account_skip_bank_reconciliation.pot new file mode 100644 index 00000000..34aca535 --- /dev/null +++ b/account_skip_bank_reconciliation/i18n/account_skip_bank_reconciliation.pot @@ -0,0 +1,62 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_skip_bank_reconciliation +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.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_skip_bank_reconciliation +#: model:ir.model,name:account_skip_bank_reconciliation.model_account_account +msgid "Account" +msgstr "" + +#. module: account_skip_bank_reconciliation +#: model:ir.model,name:account_skip_bank_reconciliation.model_account_reconciliation_widget +msgid "Account Reconciliation widget" +msgstr "" + +#. module: account_skip_bank_reconciliation +#: model:ir.model.fields,field_description:account_skip_bank_reconciliation.field_account_bank_statement_import_journal_creation__account_reconciliation_ids +#: model:ir.model.fields,field_description:account_skip_bank_reconciliation.field_account_journal__account_reconciliation_ids +msgid "Accounts to consider in reconciliation" +msgstr "" + +#. module: account_skip_bank_reconciliation +#: model:ir.model.fields,help:account_skip_bank_reconciliation.field_account_account__exclude_bank_reconcile +msgid "Check this box if the journal items of this account should not appear in the list of journal items to match a statement line." +msgstr "" + +#. module: account_skip_bank_reconciliation +#: model:ir.model.fields,field_description:account_skip_bank_reconciliation.field_account_account__exclude_bank_reconcile +msgid "Exclude from Bank Reconciliation" +msgstr "" + +#. module: account_skip_bank_reconciliation +#: model:ir.model.fields,help:account_skip_bank_reconciliation.field_account_bank_statement_import_journal_creation__account_reconciliation_ids +#: model:ir.model.fields,help:account_skip_bank_reconciliation.field_account_journal__account_reconciliation_ids +msgid "If you enter accounts here they will be the only onesto be considered during the reconciliation" +msgstr "" + +#. module: account_skip_bank_reconciliation +#: model:ir.model,name:account_skip_bank_reconciliation.model_account_journal +msgid "Journal" +msgstr "" + +#. module: account_skip_bank_reconciliation +#: model:ir.model,name:account_skip_bank_reconciliation.model_account_reconcile_model +msgid "Preset to create journal entries during a invoices and payments matching" +msgstr "" + +#. module: account_skip_bank_reconciliation +#: model_terms:ir.ui.view,arch_db:account_skip_bank_reconciliation.view_account_journal_form +msgid "Reconciliation Accounts" +msgstr "" + diff --git a/account_skip_bank_reconciliation/i18n/nl_NL.po b/account_skip_bank_reconciliation/i18n/nl_NL.po new file mode 100644 index 00000000..2804f47b --- /dev/null +++ b/account_skip_bank_reconciliation/i18n/nl_NL.po @@ -0,0 +1,75 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_skip_bank_reconciliation +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-07-15 09:43+0000\n" +"Last-Translator: Cas Vissers \n" +"Language-Team: none\n" +"Language: nl_NL\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 3.7.1\n" + +#. module: account_skip_bank_reconciliation +#: model:ir.model,name:account_skip_bank_reconciliation.model_account_account +msgid "Account" +msgstr "Grootboek" + +#. module: account_skip_bank_reconciliation +#: model:ir.model,name:account_skip_bank_reconciliation.model_account_reconciliation_widget +msgid "Account Reconciliation widget" +msgstr "" + +#. module: account_skip_bank_reconciliation +#: model:ir.model.fields,field_description:account_skip_bank_reconciliation.field_account_bank_statement_import_journal_creation__account_reconciliation_ids +#: model:ir.model.fields,field_description:account_skip_bank_reconciliation.field_account_journal__account_reconciliation_ids +#, fuzzy +msgid "Accounts to consider in reconciliation" +msgstr "Sluit uit in bankafschrift" + +#. module: account_skip_bank_reconciliation +#: model:ir.model.fields,help:account_skip_bank_reconciliation.field_account_account__exclude_bank_reconcile +msgid "" +"Check this box if the journal items of this account should not appear in the " +"list of journal items to match a statement line." +msgstr "" +"Vink aan wanneer boekingsregels uit dit grootboek niet zichtbaar mogen " +"worden bij het verwerken van een bankafschrift regel." + +#. module: account_skip_bank_reconciliation +#: model:ir.model.fields,field_description:account_skip_bank_reconciliation.field_account_account__exclude_bank_reconcile +msgid "Exclude from Bank Reconciliation" +msgstr "Sluit uit in bankafschrift" + +#. module: account_skip_bank_reconciliation +#: model:ir.model.fields,help:account_skip_bank_reconciliation.field_account_bank_statement_import_journal_creation__account_reconciliation_ids +#: model:ir.model.fields,help:account_skip_bank_reconciliation.field_account_journal__account_reconciliation_ids +msgid "" +"If you enter accounts here they will be the only onesto be considered during " +"the reconciliation" +msgstr "" + +#. module: account_skip_bank_reconciliation +#: model:ir.model,name:account_skip_bank_reconciliation.model_account_journal +msgid "Journal" +msgstr "" + +#. module: account_skip_bank_reconciliation +#: model:ir.model,name:account_skip_bank_reconciliation.model_account_reconcile_model +msgid "" +"Preset to create journal entries during a invoices and payments matching" +msgstr "" + +#. module: account_skip_bank_reconciliation +#: model_terms:ir.ui.view,arch_db:account_skip_bank_reconciliation.view_account_journal_form +msgid "Reconciliation Accounts" +msgstr "" + +#~ msgid "Bank Statement Line" +#~ msgstr "Bankafschriftregel" diff --git a/account_skip_bank_reconciliation/models/__init__.py b/account_skip_bank_reconciliation/models/__init__.py new file mode 100644 index 00000000..8a900762 --- /dev/null +++ b/account_skip_bank_reconciliation/models/__init__.py @@ -0,0 +1,6 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from . import account_account +from . import account_journal +from . import reconciliation_widget +from . import account_reconcile_model diff --git a/account_skip_bank_reconciliation/models/account_account.py b/account_skip_bank_reconciliation/models/account_account.py new file mode 100644 index 00000000..b61b719d --- /dev/null +++ b/account_skip_bank_reconciliation/models/account_account.py @@ -0,0 +1,16 @@ +# Copyright 2020 ForgeFlow S.L. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class AccountAccount(models.Model): + _inherit = "account.account" + + exclude_bank_reconcile = fields.Boolean( + string="Exclude from Bank Reconciliation", + default=False, + help="Check this box if the journal items of this account " + "should not appear in the list of journal items to match " + "a statement line.", + ) diff --git a/account_skip_bank_reconciliation/models/account_journal.py b/account_skip_bank_reconciliation/models/account_journal.py new file mode 100644 index 00000000..52786bf4 --- /dev/null +++ b/account_skip_bank_reconciliation/models/account_journal.py @@ -0,0 +1,17 @@ +# Copyright 2020 ForgeFlow S.L. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class AccountJournal(models.Model): + _inherit = "account.journal" + + account_reconciliation_ids = fields.Many2many( + relation="account_reconcile_account_journal_rel", + comodel_name="account.account", + string="Accounts to consider in reconciliation", + domain=[("reconcile", "=", True)], + help="If you enter accounts here they will be the only ones" + "to be considered during the reconciliation", + ) diff --git a/account_skip_bank_reconciliation/models/account_reconcile_model.py b/account_skip_bank_reconciliation/models/account_reconcile_model.py new file mode 100644 index 00000000..ea61c9b3 --- /dev/null +++ b/account_skip_bank_reconciliation/models/account_reconcile_model.py @@ -0,0 +1,14 @@ +# Copyright 2020 ForgeFlow S.L. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo import models + + +class AccountReconcileModel(models.Model): + _inherit = "account.reconcile.model" + + def _apply_conditions(self, query, params): + query, params = super()._apply_conditions(query, params) + if self.rule_type == "invoice_matching": + query += " AND account.exclude_bank_reconcile IS NOT TRUE" + return query, params diff --git a/account_skip_bank_reconciliation/models/reconciliation_widget.py b/account_skip_bank_reconciliation/models/reconciliation_widget.py new file mode 100644 index 00000000..38cdb5ce --- /dev/null +++ b/account_skip_bank_reconciliation/models/reconciliation_widget.py @@ -0,0 +1,39 @@ +# Copyright 2020 ForgeFlow S.L. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo import api, models +from odoo.osv import expression + + +class AccountReconciliation(models.AbstractModel): + _inherit = "account.reconciliation.widget" + + @api.model + def _domain_move_lines_for_reconciliation( + self, + st_line, + aml_accounts, + partner_id, + excluded_ids=None, + search_str=False, + mode="rp", + ): + domain = super()._domain_move_lines_for_reconciliation( + st_line, + aml_accounts, + partner_id, + excluded_ids=excluded_ids, + search_str=search_str, + mode=mode, + ) + domain = expression.AND( + [domain, [("account_id.exclude_bank_reconcile", "!=", True)]] + ) + # Extract from context allowed accounts defined in Journal, if any + journal_id = st_line.journal_id + account_reconciliation_ids = journal_id.account_reconciliation_ids + if account_reconciliation_ids: + domain = expression.AND( + [domain, [("account_id", "in", account_reconciliation_ids.ids)]] + ) + return domain diff --git a/account_skip_bank_reconciliation/readme/CONTRIBUTORS.rst b/account_skip_bank_reconciliation/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..7326223e --- /dev/null +++ b/account_skip_bank_reconciliation/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* Miquel Raïch +* Adrià Gil Sorribes +* Lois Rilo diff --git a/account_skip_bank_reconciliation/readme/DESCRIPTION.rst b/account_skip_bank_reconciliation/readme/DESCRIPTION.rst new file mode 100644 index 00000000..44677112 --- /dev/null +++ b/account_skip_bank_reconciliation/readme/DESCRIPTION.rst @@ -0,0 +1,9 @@ +This module allows to exclude from bank statement reconciliation +all journal items of a specific reconcilable account. It also allows +to specify in the Bank Journal which accounts should be taken into account +for reconciliation. + +Usually, you would want to that in accounts like the +`Goods Received Not Invoiced`, which are required to be reconcilable +to be able to have proper traceability in stock received but +their reconciliation is done using the `account_mass_reconcile` module. diff --git a/account_skip_bank_reconciliation/readme/USAGE.rst b/account_skip_bank_reconciliation/readme/USAGE.rst new file mode 100644 index 00000000..dff0cfd9 --- /dev/null +++ b/account_skip_bank_reconciliation/readme/USAGE.rst @@ -0,0 +1,15 @@ +To use this module, you can choose one of the following approaches: + +1. Go to `Invoicing / Configuration / Accounting / Charts of Accounts` + and open a reconcilable account. +2. In that account, select or not the `Exclude from Bank Reconciliation` option. + +or + +1. Go to `Invoicing / Configuration / Accounting / Journals` and open any + bank Journal +2. In the Journal select the accounts that you would like to be proposed in + reconciliations. + +Be careful, if an account is set to be excluded it will be excluded even if it +appears in the Bank Journal to be considered for reconciliation. diff --git a/account_skip_bank_reconciliation/static/description/icon.png b/account_skip_bank_reconciliation/static/description/icon.png new file mode 100644 index 00000000..3a0328b5 Binary files /dev/null and b/account_skip_bank_reconciliation/static/description/icon.png differ diff --git a/account_skip_bank_reconciliation/static/description/index.html b/account_skip_bank_reconciliation/static/description/index.html new file mode 100644 index 00000000..01adae60 --- /dev/null +++ b/account_skip_bank_reconciliation/static/description/index.html @@ -0,0 +1,447 @@ + + + + + + +Account Skip Bank Reconciliation + + + +
+

Account Skip Bank Reconciliation

+ + +

Beta License: AGPL-3 OCA/account-reconcile Translate me on Weblate Try me on Runbot

+

This module allows to exclude from bank statement reconciliation +all journal items of a specific reconcilable account. It also allows +to specify in the Bank Journal which accounts should be taken into account +for reconciliation.

+

Usually, you would want to that in accounts like the +Goods Received Not Invoiced, which are required to be reconcilable +to be able to have proper traceability in stock received but +their reconciliation is done using the account_mass_reconcile module.

+

Table of contents

+ +
+

Usage

+

To use this module, you can choose one of the following approaches:

+
    +
  1. Go to Invoicing / Configuration / Accounting / Charts of Accounts +and open a reconcilable account.
  2. +
  3. In that account, select or not the Exclude from Bank Reconciliation option.
  4. +
+

or

+
    +
  1. Go to Invoicing / Configuration / Accounting / Journals and open any +bank Journal
  2. +
  3. In the Journal select the accounts that you would like to be proposed in +reconciliations.
  4. +
+

Be careful, if an account is set to be excluded it will be excluded even if it +appears in the Bank Journal to be considered for reconciliation.

+
+
+

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

+
    +
  • ForgeFlow
  • +
+
+
+

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/account-reconcile project on GitHub.

+

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

+
+
+
+ + diff --git a/account_skip_bank_reconciliation/views/account_journal_view.xml b/account_skip_bank_reconciliation/views/account_journal_view.xml new file mode 100644 index 00000000..453024e5 --- /dev/null +++ b/account_skip_bank_reconciliation/views/account_journal_view.xml @@ -0,0 +1,18 @@ + + + + account.journal + + + + + + + + + + diff --git a/account_skip_bank_reconciliation/views/account_view.xml b/account_skip_bank_reconciliation/views/account_view.xml new file mode 100644 index 00000000..a2e62b7a --- /dev/null +++ b/account_skip_bank_reconciliation/views/account_view.xml @@ -0,0 +1,17 @@ + + + + account.account.form + account.account + + + + + + + + diff --git a/setup/account_skip_bank_reconciliation/odoo/addons/account_skip_bank_reconciliation b/setup/account_skip_bank_reconciliation/odoo/addons/account_skip_bank_reconciliation new file mode 120000 index 00000000..5c95e6cc --- /dev/null +++ b/setup/account_skip_bank_reconciliation/odoo/addons/account_skip_bank_reconciliation @@ -0,0 +1 @@ +../../../../account_skip_bank_reconciliation \ No newline at end of file diff --git a/setup/account_skip_bank_reconciliation/setup.py b/setup/account_skip_bank_reconciliation/setup.py new file mode 100644 index 00000000..28c57bb6 --- /dev/null +++ b/setup/account_skip_bank_reconciliation/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)