diff --git a/account_skip_bank_reconciliation/README.rst b/account_skip_bank_reconciliation/README.rst index 89ce171c..2178abad 100644 --- a/account_skip_bank_reconciliation/README.rst +++ b/account_skip_bank_reconciliation/README.rst @@ -14,13 +14,13 @@ Account Skip Bank Reconciliation :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/11.0/account_skip_bank_reconciliation + :target: https://github.com/OCA/account-reconcile/tree/12.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-11-0/account-reconcile-11-0-account_skip_bank_reconciliation + :target: https://translation.odoo-community.org/projects/account-reconcile-12-0/account-reconcile-12-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/11.0 + :target: https://runbot.odoo-community.org/runbot/98/12.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -53,7 +53,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -83,6 +83,6 @@ 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. +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/__manifest__.py b/account_skip_bank_reconciliation/__manifest__.py index 48528742..65bb35d2 100644 --- a/account_skip_bank_reconciliation/__manifest__.py +++ b/account_skip_bank_reconciliation/__manifest__.py @@ -5,7 +5,7 @@ "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", + "version": "12.0.1.0.0", "depends": ["account"], "author": "Eficent, Odoo Community Association (OCA)", "website": "http://www.github.com/OCA/account-reconcile", diff --git a/account_skip_bank_reconciliation/models/__init__.py b/account_skip_bank_reconciliation/models/__init__.py index 84f4c035..1167b098 100755 --- a/account_skip_bank_reconciliation/models/__init__.py +++ b/account_skip_bank_reconciliation/models/__init__.py @@ -1,4 +1,5 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from . import account_account -from . import account_bank_statement +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 index 41d0e53b..e0331405 100644 --- a/account_skip_bank_reconciliation/models/account_account.py +++ b/account_skip_bank_reconciliation/models/account_account.py @@ -1,4 +1,4 @@ -# © 20118 Eficent Business and IT Consulting Services S.L. (www.eficent.com) +# © 2018 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 diff --git a/account_skip_bank_reconciliation/models/account_bank_statement.py b/account_skip_bank_reconciliation/models/account_bank_statement.py deleted file mode 100644 index 4856e4c5..00000000 --- a/account_skip_bank_reconciliation/models/account_bank_statement.py +++ /dev/null @@ -1,19 +0,0 @@ -# © 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/models/account_reconcile_model.py b/account_skip_bank_reconciliation/models/account_reconcile_model.py new file mode 100644 index 00000000..6015ddef --- /dev/null +++ b/account_skip_bank_reconciliation/models/account_reconcile_model.py @@ -0,0 +1,15 @@ +# © 2018-19 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 api, models + + +class AccountReconcileModel(models.Model): + _inherit = "account.reconcile.model" + + @api.multi + def _apply_conditions(self, query, params): + query, params = super( + AccountReconcileModel, self)._apply_conditions(query, params) + query += ' AND account.exclude_bank_reconcile = False' + 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..6ec92feb --- /dev/null +++ b/account_skip_bank_reconciliation/models/reconciliation_widget.py @@ -0,0 +1,31 @@ +# © 2018-19 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 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): + domain = super()._domain_move_lines_for_reconciliation( + st_line, aml_accounts, partner_id, + excluded_ids=excluded_ids, search_str=search_str) + domain = expression.AND([domain, [ + ("account_id.exclude_bank_reconcile", "!=", True)]]) + return domain + + @api.model + def _domain_move_lines_for_manual_reconciliation( + self, account_id, partner_id=False, + excluded_ids=None, search_str=False): + domain = super()._domain_move_lines_for_manual_reconciliation( + account_id, partner_id=partner_id, + excluded_ids=excluded_ids, search_str=search_str) + domain = expression.AND([domain, [ + ("account_id.exclude_bank_reconcile", "!=", True)]]) + return domain diff --git a/account_skip_bank_reconciliation/static/description/index.html b/account_skip_bank_reconciliation/static/description/index.html index 4a577982..5a99b233 100644 --- a/account_skip_bank_reconciliation/static/description/index.html +++ b/account_skip_bank_reconciliation/static/description/index.html @@ -367,7 +367,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

+

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.

Usually, you would want to that in accounts like the @@ -401,7 +401,7 @@ and open a reconcilable account.

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.

+feedback.

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

@@ -425,7 +425,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome

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.

+

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.