diff --git a/account_reconciliation_widget_limit_aml/README.rst b/account_reconciliation_widget_limit_aml/README.rst new file mode 100644 index 00000000..125d305e --- /dev/null +++ b/account_reconciliation_widget_limit_aml/README.rst @@ -0,0 +1,83 @@ +======================================= +Account Reconciliation Widget Limit AML +======================================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:96fd13238c3cfb634b30494c1fde31595c3879f1ba3bd30a1c298e22d4194a74 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/14.0/account_reconciliation_widget_limit_aml + :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-14-0/account-reconcile-14-0-account_reconciliation_widget_limit_aml + :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=14.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module adds the option to filter all the account move lines by date in the reconciliation view, not only those coming from payments. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +Go to Invoicing --> Configuration --> Settings +Check the "Filter all account move lines" checkbox. When checked, all the account move lines will be filtered by the selected date. + +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 to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Sygel + +Contributors +~~~~~~~~~~~~ + +* Valentin Vinagre +* Manuel Regidor + +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_reconciliation_widget_limit_aml/__init__.py b/account_reconciliation_widget_limit_aml/__init__.py new file mode 100644 index 00000000..2d89283f --- /dev/null +++ b/account_reconciliation_widget_limit_aml/__init__.py @@ -0,0 +1,5 @@ +# Copyright 2023 Valentin Vinagre +# Copyright 2023 Manuel Regidor +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import models diff --git a/account_reconciliation_widget_limit_aml/__manifest__.py b/account_reconciliation_widget_limit_aml/__manifest__.py new file mode 100644 index 00000000..37f51166 --- /dev/null +++ b/account_reconciliation_widget_limit_aml/__manifest__.py @@ -0,0 +1,16 @@ +# Copyright 2023 Valentin Vinagre +# Copyright 2023 Manuel Regidor +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +{ + "name": "Account Reconciliation Widget Limit AML", + "version": "15.0.1.0.0", + "category": "Accounting", + "license": "AGPL-3", + "summary": "Filter all account move lines in reconciliation view", + "author": "Sygel, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/account-reconcile", + "depends": ["account_reconciliation_widget"], + "data": ["views/res_config_settings_views.xml"], + "installable": True, +} diff --git a/account_reconciliation_widget_limit_aml/i18n/account_reconciliation_widget_limit_aml.pot b/account_reconciliation_widget_limit_aml/i18n/account_reconciliation_widget_limit_aml.pot new file mode 100644 index 00000000..a5b8785f --- /dev/null +++ b/account_reconciliation_widget_limit_aml/i18n/account_reconciliation_widget_limit_aml.pot @@ -0,0 +1,56 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_reconciliation_widget_limit_aml +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.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_reconciliation_widget_limit_aml +#: model:ir.model,name:account_reconciliation_widget_limit_aml.model_account_reconciliation_widget +msgid "Account Reconciliation widget" +msgstr "" + +#. module: account_reconciliation_widget_limit_aml +#: model:ir.model,name:account_reconciliation_widget_limit_aml.model_res_company +msgid "Companies" +msgstr "" + +#. module: account_reconciliation_widget_limit_aml +#: model:ir.model,name:account_reconciliation_widget_limit_aml.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: account_reconciliation_widget_limit_aml +#: model:ir.model.fields,field_description:account_reconciliation_widget_limit_aml.field_account_reconciliation_widget__display_name +#: model:ir.model.fields,field_description:account_reconciliation_widget_limit_aml.field_res_company__display_name +#: model:ir.model.fields,field_description:account_reconciliation_widget_limit_aml.field_res_config_settings__display_name +msgid "Display Name" +msgstr "" + +#. module: account_reconciliation_widget_limit_aml +#: model:ir.model.fields,field_description:account_reconciliation_widget_limit_aml.field_res_company__account_bank_reconciliation_start_all_aml +#: model:ir.model.fields,field_description:account_reconciliation_widget_limit_aml.field_res_config_settings__account_bank_reconciliation_start_all_aml +msgid "Filter all account move lines" +msgstr "" + +#. module: account_reconciliation_widget_limit_aml +#: model:ir.model.fields,field_description:account_reconciliation_widget_limit_aml.field_account_reconciliation_widget__id +#: model:ir.model.fields,field_description:account_reconciliation_widget_limit_aml.field_res_company__id +#: model:ir.model.fields,field_description:account_reconciliation_widget_limit_aml.field_res_config_settings__id +msgid "ID" +msgstr "" + +#. module: account_reconciliation_widget_limit_aml +#: model:ir.model.fields,field_description:account_reconciliation_widget_limit_aml.field_account_reconciliation_widget____last_update +#: model:ir.model.fields,field_description:account_reconciliation_widget_limit_aml.field_res_company____last_update +#: model:ir.model.fields,field_description:account_reconciliation_widget_limit_aml.field_res_config_settings____last_update +msgid "Last Modified on" +msgstr "" diff --git a/account_reconciliation_widget_limit_aml/models/__init__.py b/account_reconciliation_widget_limit_aml/models/__init__.py new file mode 100644 index 00000000..01e4d0b7 --- /dev/null +++ b/account_reconciliation_widget_limit_aml/models/__init__.py @@ -0,0 +1,7 @@ +# Copyright 2023 Valentin Vinagre +# Copyright 2023 Manuel Regidor +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import res_company +from . import res_config_settings +from . import reconciliation_widget diff --git a/account_reconciliation_widget_limit_aml/models/reconciliation_widget.py b/account_reconciliation_widget_limit_aml/models/reconciliation_widget.py new file mode 100644 index 00000000..639cb97c --- /dev/null +++ b/account_reconciliation_widget_limit_aml/models/reconciliation_widget.py @@ -0,0 +1,41 @@ +# Copyright 2023 Valentin Vinagre +# Copyright 2023 Manuel Regidor +# License AGPL-3.0 or later (http://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, search_str, mode + ) + if ( + st_line.company_id.account_bank_reconciliation_start_all_aml + and st_line.company_id.account_bank_reconciliation_start + ): + domain = expression.AND( + [ + domain, + [ + ( + "date", + ">=", + st_line.company_id.account_bank_reconciliation_start, + ) + ], + ] + ) + return domain diff --git a/account_reconciliation_widget_limit_aml/models/res_company.py b/account_reconciliation_widget_limit_aml/models/res_company.py new file mode 100644 index 00000000..39ad43a8 --- /dev/null +++ b/account_reconciliation_widget_limit_aml/models/res_company.py @@ -0,0 +1,13 @@ +# Copyright 2023 Valentin Vinagre +# Copyright 2023 Manuel Regidor +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class ResCompany(models.Model): + _inherit = "res.company" + + account_bank_reconciliation_start_all_aml = fields.Boolean( + string="Filter all account move lines" + ) diff --git a/account_reconciliation_widget_limit_aml/models/res_config_settings.py b/account_reconciliation_widget_limit_aml/models/res_config_settings.py new file mode 100644 index 00000000..610214fe --- /dev/null +++ b/account_reconciliation_widget_limit_aml/models/res_config_settings.py @@ -0,0 +1,13 @@ +# Copyright 2023 Valentin Vinagre +# Copyright 2023 Manuel Regidor +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class ResConfigSettings(models.TransientModel): + _inherit = "res.config.settings" + + account_bank_reconciliation_start_all_aml = fields.Boolean( + related="company_id.account_bank_reconciliation_start_all_aml", readonly=False + ) diff --git a/account_reconciliation_widget_limit_aml/readme/CONTRIBUTORS.rst b/account_reconciliation_widget_limit_aml/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..ebaf1e8c --- /dev/null +++ b/account_reconciliation_widget_limit_aml/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Valentin Vinagre +* Manuel Regidor diff --git a/account_reconciliation_widget_limit_aml/readme/DESCRIPTION.rst b/account_reconciliation_widget_limit_aml/readme/DESCRIPTION.rst new file mode 100644 index 00000000..054cdf50 --- /dev/null +++ b/account_reconciliation_widget_limit_aml/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +This module adds the option to filter all the account move lines by date in the reconciliation view, not only those coming from payments. diff --git a/account_reconciliation_widget_limit_aml/readme/USAGE.rst b/account_reconciliation_widget_limit_aml/readme/USAGE.rst new file mode 100644 index 00000000..45f80a34 --- /dev/null +++ b/account_reconciliation_widget_limit_aml/readme/USAGE.rst @@ -0,0 +1,2 @@ +Go to Invoicing --> Configuration --> Settings +Check the "Filter all account move lines" checkbox. When checked, all the account move lines will be filtered by the selected date. diff --git a/account_reconciliation_widget_limit_aml/static/description/icon.png b/account_reconciliation_widget_limit_aml/static/description/icon.png new file mode 100644 index 00000000..3a0328b5 Binary files /dev/null and b/account_reconciliation_widget_limit_aml/static/description/icon.png differ diff --git a/account_reconciliation_widget_limit_aml/static/description/index.html b/account_reconciliation_widget_limit_aml/static/description/index.html new file mode 100644 index 00000000..31803da6 --- /dev/null +++ b/account_reconciliation_widget_limit_aml/static/description/index.html @@ -0,0 +1,428 @@ + + + + + + +Account Reconciliation Widget Limit AML + + + +
+

Account Reconciliation Widget Limit AML

+ + +

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

+

This module adds the option to filter all the account move lines by date in the reconciliation view, not only those coming from payments.

+

Table of contents

+ +
+

Usage

+

Go to Invoicing –> Configuration –> Settings +Check the “Filter all account move lines” checkbox. When checked, all the account move lines will be filtered by the selected date.

+
+
+

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 to smash it by providing a detailed and welcomed +feedback.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Sygel
  • +
+
+
+

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_reconciliation_widget_limit_aml/views/res_config_settings_views.xml b/account_reconciliation_widget_limit_aml/views/res_config_settings_views.xml new file mode 100644 index 00000000..473d01d9 --- /dev/null +++ b/account_reconciliation_widget_limit_aml/views/res_config_settings_views.xml @@ -0,0 +1,24 @@ + + + + + res.config.settings + + + +
+ +
+
+
+
diff --git a/setup/account_reconciliation_widget_limit_aml/odoo/addons/account_reconciliation_widget_limit_aml b/setup/account_reconciliation_widget_limit_aml/odoo/addons/account_reconciliation_widget_limit_aml new file mode 120000 index 00000000..1b311bd3 --- /dev/null +++ b/setup/account_reconciliation_widget_limit_aml/odoo/addons/account_reconciliation_widget_limit_aml @@ -0,0 +1 @@ +../../../../account_reconciliation_widget_limit_aml \ No newline at end of file diff --git a/setup/account_reconciliation_widget_limit_aml/setup.py b/setup/account_reconciliation_widget_limit_aml/setup.py new file mode 100644 index 00000000..28c57bb6 --- /dev/null +++ b/setup/account_reconciliation_widget_limit_aml/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)