diff --git a/account_skip_bank_reconciliation/README.rst b/account_skip_bank_reconciliation/README.rst new file mode 100644 index 00000000..ed0abb97 --- /dev/null +++ b/account_skip_bank_reconciliation/README.rst @@ -0,0 +1,66 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: https://www.gnu.org/licenses/agpl + :alt: License: AGPL-3 + +================================ +Account Skip Bank Reconciliation +================================ + +This module allows to exclude from bank statement reconciliation +all journal items of a specific reconcilable account. + +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. + +Usage +===== + +To use this module, you need to: + +#. Go to `Invoicing / Configuration / Accounting / Charts of Accounts` + and open a reconcilable account. +#. In that account, select or not the `Exclude from Bank Reconciliation` option. + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/98/11.0 + + +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 smash it by providing detailed and welcomed feedback. + + +Credits +======= + +Images +------ + +* Odoo Community Association: `Icon `_. + +Contributors +------------ + +* Miquel Raïch + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://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 https://odoo-community.org. diff --git a/account_skip_bank_reconciliation/__init__.py b/account_skip_bank_reconciliation/__init__.py new file mode 100755 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..48528742 --- /dev/null +++ b/account_skip_bank_reconciliation/__manifest__.py @@ -0,0 +1,18 @@ +# Copyright 2018 Eficent Business and IT Consulting Services 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": "11.0.1.0.0", + "depends": ["account"], + "author": "Eficent, Odoo Community Association (OCA)", + "website": "http://www.github.com/OCA/account-reconcile", + "category": "Finance", + "data": [ + "views/account_view.xml", + ], + 'license': 'AGPL-3', + 'installable': True, +} diff --git a/account_skip_bank_reconciliation/models/__init__.py b/account_skip_bank_reconciliation/models/__init__.py new file mode 100755 index 00000000..84f4c035 --- /dev/null +++ b/account_skip_bank_reconciliation/models/__init__.py @@ -0,0 +1,4 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from . import account_account +from . import account_bank_statement 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..41d0e53b --- /dev/null +++ b/account_skip_bank_reconciliation/models/account_account.py @@ -0,0 +1,15 @@ +# © 20118 Eficent Business and IT Consulting Services S.L. (www.eficent.com) +# 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_bank_statement.py b/account_skip_bank_reconciliation/models/account_bank_statement.py new file mode 100644 index 00000000..4856e4c5 --- /dev/null +++ b/account_skip_bank_reconciliation/models/account_bank_statement.py @@ -0,0 +1,19 @@ +# © 20118 Eficent Business and IT Consulting Services S.L. (www.eficent.com) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo import models + + +class AccountBankStatementLine(models.Model): + _inherit = "account.bank.statement.line" + + def get_move_lines_for_reconciliation( + self, partner_id=None, excluded_ids=None, str=False, offset=0, + limit=None, additional_domain=None, overlook_partner=False): + am_lines = super(AccountBankStatementLine, self).\ + get_move_lines_for_reconciliation( + partner_id=partner_id, excluded_ids=excluded_ids, str=str, + offset=offset, limit=limit, additional_domain=additional_domain, + overlook_partner=overlook_partner) + return am_lines.filtered( + lambda line: not line.account_id.exclude_bank_reconcile) diff --git a/account_skip_bank_reconciliation/readme/CONTRIBUTORS.rst b/account_skip_bank_reconciliation/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..2e34e218 --- /dev/null +++ b/account_skip_bank_reconciliation/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Miquel Raïch diff --git a/account_skip_bank_reconciliation/readme/DESCRIPTION.rst b/account_skip_bank_reconciliation/readme/DESCRIPTION.rst new file mode 100644 index 00000000..3198c09b --- /dev/null +++ b/account_skip_bank_reconciliation/readme/DESCRIPTION.rst @@ -0,0 +1,7 @@ +This module allows to exclude from bank statement reconciliation +all journal items of a specific reconcilable account. + +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..b5ffd6ba --- /dev/null +++ b/account_skip_bank_reconciliation/readme/USAGE.rst @@ -0,0 +1,5 @@ +To use this module, you need to: + +#. Go to `Invoicing / Configuration / Accounting / Charts of Accounts` + and open a reconcilable account. +#. In that account, select or not the `Exclude from Bank Reconciliation` option. 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/views/account_view.xml b/account_skip_bank_reconciliation/views/account_view.xml new file mode 100644 index 00000000..c9c47a20 --- /dev/null +++ b/account_skip_bank_reconciliation/views/account_view.xml @@ -0,0 +1,13 @@ + + + + account.account.form + account.account + + + + + + + +