diff --git a/account_partner_reconcile/README.rst b/account_partner_reconcile/README.rst new file mode 100644 index 0000000000..ed70d33e6b --- /dev/null +++ b/account_partner_reconcile/README.rst @@ -0,0 +1,92 @@ +========================= +Account Partner Reconcile +========================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:04ec889db4224fc1ffea939167adbe6aa397644b80650f08d6a3532f64fecc24 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/16.0/account_partner_reconcile + :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-16-0/account-reconcile-16-0-account_partner_reconcile + :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=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module adds the buttons "Match Receivables" (& "Match Payables") in the customer (& suppliers) form +view to allow to start the matching of invoices & payments for that partner. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +The button is visible only to users that belong to the accounting groups +"Accountant" or "Adviser". + +Usage +===== + +#. Enable 'Show Full Accounting Features' +#. Create a new Customer Invoice and Payment +#. Go to the Customer/Supplier view form and click on Match payments + +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 +~~~~~~~ + +* ForgeFlow + +Contributors +~~~~~~~~~~~~ + +* Jordi Ballester +* Jaume Planas +* Ahmet Yiğit Budak + +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_partner_reconcile/__init__.py b/account_partner_reconcile/__init__.py new file mode 100644 index 0000000000..0650744f6b --- /dev/null +++ b/account_partner_reconcile/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/account_partner_reconcile/__manifest__.py b/account_partner_reconcile/__manifest__.py new file mode 100644 index 0000000000..9275d72e1b --- /dev/null +++ b/account_partner_reconcile/__manifest__.py @@ -0,0 +1,14 @@ +# Copyright 2017-20 ForgeFlow S.L. (http://www.forgeflow.com) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +{ + "name": "Account Partner Reconcile", + "version": "16.0.1.0.0", + "category": "Accounting", + "author": "ForgeFlow, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/account-reconcile", + "license": "AGPL-3", + "depends": ["account_reconcile_oca"], + "data": ["views/res_partner_view.xml"], + "installable": True, +} diff --git a/account_partner_reconcile/i18n/account_partner_reconcile.pot b/account_partner_reconcile/i18n/account_partner_reconcile.pot new file mode 100644 index 0000000000..757866ad26 --- /dev/null +++ b/account_partner_reconcile/i18n/account_partner_reconcile.pot @@ -0,0 +1,29 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_partner_reconcile +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.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_partner_reconcile +#: model:ir.model,name:account_partner_reconcile.model_res_partner +msgid "Contact" +msgstr "" + +#. module: account_partner_reconcile +#: model_terms:ir.ui.view,arch_db:account_partner_reconcile.res_partner_view_buttons +msgid "Match Payables" +msgstr "" + +#. module: account_partner_reconcile +#: model_terms:ir.ui.view,arch_db:account_partner_reconcile.res_partner_view_buttons +msgid "Match Receivables" +msgstr "" diff --git a/account_partner_reconcile/i18n/da.po b/account_partner_reconcile/i18n/da.po new file mode 100644 index 0000000000..a8bf20376a --- /dev/null +++ b/account_partner_reconcile/i18n/da.po @@ -0,0 +1,32 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_partner_reconcile +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-05-31 12:36+0000\n" +"Last-Translator: Hans Henrik Gabelgaard \n" +"Language-Team: none\n" +"Language: da\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 4.17\n" + +#. module: account_partner_reconcile +#: model:ir.model,name:account_partner_reconcile.model_res_partner +msgid "Contact" +msgstr "Kontakt" + +#. module: account_partner_reconcile +#: model_terms:ir.ui.view,arch_db:account_partner_reconcile.res_partner_view_buttons +msgid "Match Payables" +msgstr "Udlign udbetalinger" + +#. module: account_partner_reconcile +#: model_terms:ir.ui.view,arch_db:account_partner_reconcile.res_partner_view_buttons +msgid "Match Receivables" +msgstr "Udlign indbetalinger" diff --git a/account_partner_reconcile/i18n/es.po b/account_partner_reconcile/i18n/es.po new file mode 100644 index 0000000000..1d4d42bd82 --- /dev/null +++ b/account_partner_reconcile/i18n/es.po @@ -0,0 +1,32 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_partner_reconcile +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-01-01 21:13+0000\n" +"Last-Translator: Daniel Luque \n" +"Language-Team: none\n" +"Language: es\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.10\n" + +#. module: account_partner_reconcile +#: model:ir.model,name:account_partner_reconcile.model_res_partner +msgid "Contact" +msgstr "Contacto" + +#. module: account_partner_reconcile +#: model_terms:ir.ui.view,arch_db:account_partner_reconcile.res_partner_view_buttons +msgid "Match Payables" +msgstr "Conciliar Pagos" + +#. module: account_partner_reconcile +#: model_terms:ir.ui.view,arch_db:account_partner_reconcile.res_partner_view_buttons +msgid "Match Receivables" +msgstr "Conciliar Cobros" diff --git a/account_partner_reconcile/i18n/es_AR.po b/account_partner_reconcile/i18n/es_AR.po new file mode 100644 index 0000000000..7cf2f68e05 --- /dev/null +++ b/account_partner_reconcile/i18n/es_AR.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_partner_reconcile +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-11-15 01:36+0000\n" +"Last-Translator: Ignacio Buioli \n" +"Language-Team: none\n" +"Language: es_AR\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 4.3.2\n" + +#. module: account_partner_reconcile +#: model:ir.model,name:account_partner_reconcile.model_res_partner +msgid "Contact" +msgstr "Contacto" + +#. module: account_partner_reconcile +#: model_terms:ir.ui.view,arch_db:account_partner_reconcile.res_partner_view_buttons +msgid "Match Payables" +msgstr "Igualar Cuentas a Pagar" + +#. module: account_partner_reconcile +#: model_terms:ir.ui.view,arch_db:account_partner_reconcile.res_partner_view_buttons +msgid "Match Receivables" +msgstr "Igualar Cuentas a Cobrar" + +#~ msgid "Display Name" +#~ msgstr "Mostrar Nombre" + +#~ msgid "ID" +#~ msgstr "ID" + +#~ msgid "Last Modified on" +#~ msgstr "Última modificación en" diff --git a/account_partner_reconcile/i18n/fr.po b/account_partner_reconcile/i18n/fr.po new file mode 100644 index 0000000000..43bf1c4c5e --- /dev/null +++ b/account_partner_reconcile/i18n/fr.po @@ -0,0 +1,38 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_partner_reconcile +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-11-10 20:35+0000\n" +"Last-Translator: Yves Le Doeuff \n" +"Language-Team: none\n" +"Language: fr\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 4.3.2\n" + +#. module: account_partner_reconcile +#: model:ir.model,name:account_partner_reconcile.model_res_partner +msgid "Contact" +msgstr "" + +#. module: account_partner_reconcile +#: model_terms:ir.ui.view,arch_db:account_partner_reconcile.res_partner_view_buttons +msgid "Match Payables" +msgstr "Lettrage Fournisseur" + +#. module: account_partner_reconcile +#: model_terms:ir.ui.view,arch_db:account_partner_reconcile.res_partner_view_buttons +msgid "Match Receivables" +msgstr "Lettrage Client" + +#~ msgid "Display Name" +#~ msgstr "Nom affiché" + +#~ msgid "Last Modified on" +#~ msgstr "Dernière modification le" diff --git a/account_partner_reconcile/i18n/fr_FR.po b/account_partner_reconcile/i18n/fr_FR.po new file mode 100644 index 0000000000..9dd1f835a0 --- /dev/null +++ b/account_partner_reconcile/i18n/fr_FR.po @@ -0,0 +1,38 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_partner_reconcile +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-11-10 20:35+0000\n" +"Last-Translator: Yves Le Doeuff \n" +"Language-Team: none\n" +"Language: fr_FR\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 4.3.2\n" + +#. module: account_partner_reconcile +#: model:ir.model,name:account_partner_reconcile.model_res_partner +msgid "Contact" +msgstr "" + +#. module: account_partner_reconcile +#: model_terms:ir.ui.view,arch_db:account_partner_reconcile.res_partner_view_buttons +msgid "Match Payables" +msgstr "Lettrage Fournisseur" + +#. module: account_partner_reconcile +#: model_terms:ir.ui.view,arch_db:account_partner_reconcile.res_partner_view_buttons +msgid "Match Receivables" +msgstr "Lettrage Client" + +#~ msgid "Display Name" +#~ msgstr "Nom affiché" + +#~ msgid "Last Modified on" +#~ msgstr "Dernière modification le" diff --git a/account_partner_reconcile/i18n/pt.po b/account_partner_reconcile/i18n/pt.po new file mode 100644 index 0000000000..d7b9deb37f --- /dev/null +++ b/account_partner_reconcile/i18n/pt.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_partner_reconcile +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-10-29 21:35+0000\n" +"Last-Translator: Pedro Castro Silva \n" +"Language-Team: none\n" +"Language: pt\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 4.3.2\n" + +#. module: account_partner_reconcile +#: model:ir.model,name:account_partner_reconcile.model_res_partner +msgid "Contact" +msgstr "Contacto" + +#. module: account_partner_reconcile +#: model_terms:ir.ui.view,arch_db:account_partner_reconcile.res_partner_view_buttons +msgid "Match Payables" +msgstr "Reconc. Pagam." + +#. module: account_partner_reconcile +#: model_terms:ir.ui.view,arch_db:account_partner_reconcile.res_partner_view_buttons +msgid "Match Receivables" +msgstr "Reconc. Recebim." + +#~ msgid "Display Name" +#~ msgstr "Nome a Exibir" + +#~ msgid "ID" +#~ msgstr "ID" + +#~ msgid "Last Modified on" +#~ msgstr "Última Modific. em" diff --git a/account_partner_reconcile/models/__init__.py b/account_partner_reconcile/models/__init__.py new file mode 100644 index 0000000000..91fed54d40 --- /dev/null +++ b/account_partner_reconcile/models/__init__.py @@ -0,0 +1 @@ +from . import res_partner diff --git a/account_partner_reconcile/models/res_partner.py b/account_partner_reconcile/models/res_partner.py new file mode 100644 index 0000000000..d2ec000e81 --- /dev/null +++ b/account_partner_reconcile/models/res_partner.py @@ -0,0 +1,28 @@ +# Copyright 2017-20 ForgeFlow S.L. (http://www.forgeflow.com) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo import models + + +class ResPartner(models.Model): + _inherit = "res.partner" + + def action_open_reconcile(self): + # Open reconciliation view for customers and suppliers + self.ensure_one() + + reconcile_mode = self.env.context.get("reconcile_mode", False) + account = self.property_account_payable_id + if reconcile_mode == "customers": + account = self.property_account_receivable_id + + action = self.env["ir.actions.act_window"]._for_xml_id( + "account_reconcile_oca.account_account_reconcile_act_window" + ) + + action["domain"] = [ + ("account_id", "=", account.id), + ("partner_id", "=", self.id), + ] + + return action diff --git a/account_partner_reconcile/readme/CONFIGURE.rst b/account_partner_reconcile/readme/CONFIGURE.rst new file mode 100644 index 0000000000..db5fa02747 --- /dev/null +++ b/account_partner_reconcile/readme/CONFIGURE.rst @@ -0,0 +1,2 @@ +The button is visible only to users that belong to the accounting groups +"Accountant" or "Adviser". diff --git a/account_partner_reconcile/readme/CONTRIBUTORS.rst b/account_partner_reconcile/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000000..0aecc832b9 --- /dev/null +++ b/account_partner_reconcile/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* Jordi Ballester +* Jaume Planas +* Ahmet Yiğit Budak diff --git a/account_partner_reconcile/readme/DESCRIPTION.rst b/account_partner_reconcile/readme/DESCRIPTION.rst new file mode 100644 index 0000000000..8e5542ed14 --- /dev/null +++ b/account_partner_reconcile/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module adds the buttons "Match Receivables" (& "Match Payables") in the customer (& suppliers) form +view to allow to start the matching of invoices & payments for that partner. diff --git a/account_partner_reconcile/readme/USAGE.rst b/account_partner_reconcile/readme/USAGE.rst new file mode 100644 index 0000000000..1072ced9ea --- /dev/null +++ b/account_partner_reconcile/readme/USAGE.rst @@ -0,0 +1,3 @@ +#. Enable 'Show Full Accounting Features' +#. Create a new Customer Invoice and Payment +#. Go to the Customer/Supplier view form and click on Match payments diff --git a/account_partner_reconcile/static/description/icon.png b/account_partner_reconcile/static/description/icon.png new file mode 100644 index 0000000000..3a0328b516 Binary files /dev/null and b/account_partner_reconcile/static/description/icon.png differ diff --git a/account_partner_reconcile/static/description/index.html b/account_partner_reconcile/static/description/index.html new file mode 100644 index 0000000000..9da8065ba4 --- /dev/null +++ b/account_partner_reconcile/static/description/index.html @@ -0,0 +1,441 @@ + + + + + +Account Partner Reconcile + + + +
+

Account Partner Reconcile

+ + +

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

+

This module adds the buttons “Match Receivables” (& “Match Payables”) in the customer (& suppliers) form +view to allow to start the matching of invoices & payments for that partner.

+

Table of contents

+ +
+

Configuration

+

The button is visible only to users that belong to the accounting groups +“Accountant” or “Adviser”.

+
+
+

Usage

+
    +
  1. Enable ‘Show Full Accounting Features’
  2. +
  3. Create a new Customer Invoice and Payment
  4. +
  5. Go to the Customer/Supplier view form and click on Match payments
  6. +
+
+
+

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

+
    +
  • 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_partner_reconcile/tests/__init__.py b/account_partner_reconcile/tests/__init__.py new file mode 100644 index 0000000000..6032803a49 --- /dev/null +++ b/account_partner_reconcile/tests/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from . import test_account_partner_reconcile diff --git a/account_partner_reconcile/tests/test_account_partner_reconcile.py b/account_partner_reconcile/tests/test_account_partner_reconcile.py new file mode 100644 index 0000000000..ab09f95441 --- /dev/null +++ b/account_partner_reconcile/tests/test_account_partner_reconcile.py @@ -0,0 +1,53 @@ +# Copyright 2017-20 ForgeFlow S.L. (http://www.forgeflow.com) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo.tests.common import TransactionCase + + +class TestAccountPartnerReconcile(TransactionCase): + """Tests for Account Partner Reconcile.""" + + def setUp(self): + super().setUp() + + self.partner1 = self.env.ref("base.res_partner_1") + + def test_account_partner_reconcile(self): + receivable_account = self.partner1.property_account_receivable_id + payable_account = self.partner1.property_account_payable_id + + # reconcile_mode="customers" (Match Receivables) + res = self.partner1.with_context( + reconcile_mode="customers" + ).action_open_reconcile() + expect = { + "type": "ir.actions.act_window", + "xml_id": "account_reconcile_oca.account_account_reconcile_act_window", + "domain": [ + ("account_id", "=", receivable_account.id), + ("partner_id", "=", self.partner1.id), + ], + } + self.assertDictEqual( + expect, + {k: v for k, v in res.items() if k in expect}, + "There was an error and the Reconcile action couldn't be opened.", + ) + + # reconcile_mode="suppliers" (Match Payables) + res = self.partner1.with_context( + reconcile_mode="suppliers" + ).action_open_reconcile() + expect = { + "type": "ir.actions.act_window", + "xml_id": "account_reconcile_oca.account_account_reconcile_act_window", + "domain": [ + ("account_id", "=", payable_account.id), + ("partner_id", "=", self.partner1.id), + ], + } + self.assertDictEqual( + expect, + {k: v for k, v in res.items() if k in expect}, + "There was an error and the Reconcile action couldn't be opened.", + ) diff --git a/account_partner_reconcile/views/res_partner_view.xml b/account_partner_reconcile/views/res_partner_view.xml new file mode 100644 index 0000000000..f0df3e381c --- /dev/null +++ b/account_partner_reconcile/views/res_partner_view.xml @@ -0,0 +1,35 @@ + + + + + + res.partner.view.buttons + res.partner + + + +
+ + +
+
+
+
diff --git a/setup/account_partner_reconcile/odoo/addons/account_partner_reconcile b/setup/account_partner_reconcile/odoo/addons/account_partner_reconcile new file mode 120000 index 0000000000..3c96d56ffc --- /dev/null +++ b/setup/account_partner_reconcile/odoo/addons/account_partner_reconcile @@ -0,0 +1 @@ +../../../../account_partner_reconcile \ No newline at end of file diff --git a/setup/account_partner_reconcile/setup.py b/setup/account_partner_reconcile/setup.py new file mode 100644 index 0000000000..28c57bb640 --- /dev/null +++ b/setup/account_partner_reconcile/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)