diff --git a/.isort.cfg b/.isort.cfg index 7683badf..26efd290 100644 --- a/.isort.cfg +++ b/.isort.cfg @@ -10,3 +10,4 @@ known_odoo=odoo known_odoo_addons=odoo.addons sections=FUTURE,STDLIB,THIRDPARTY,ODOO,ODOO_ADDONS,FIRSTPARTY,LOCALFOLDER default_section=THIRDPARTY +known_third_party=setuptools diff --git a/account_partner_reconcile/README.rst b/account_partner_reconcile/README.rst new file mode 100644 index 00000000..8a1d49c9 --- /dev/null +++ b/account_partner_reconcile/README.rst @@ -0,0 +1,88 @@ +========================= +Account Partner Reconcile +========================= + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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_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-13-0/account-reconcile-13-0-account_partner_reconcile + :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 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 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 +~~~~~~~~~~~~ + +* Jordi Ballester +* Jaume Planas + +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 00000000..0650744f --- /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 00000000..9ea23145 --- /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": "13.0.1.0.0", + "category": "Accounting", + "author": "ForgeFlow, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/account-reconcile", + "license": "AGPL-3", + "depends": ["account"], + "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 00000000..5dce3537 --- /dev/null +++ b/account_partner_reconcile/i18n/account_partner_reconcile.pot @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_partner_reconcile +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.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/es.po b/account_partner_reconcile/i18n/es.po new file mode 100644 index 00000000..5705a8e1 --- /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/models/__init__.py b/account_partner_reconcile/models/__init__.py new file mode 100644 index 00000000..91fed54d --- /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 00000000..f1bb58cd --- /dev/null +++ b/account_partner_reconcile/models/res_partner.py @@ -0,0 +1,27 @@ +# 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 + reconcile_mode = self.env.context.get("reconcile_mode", False) + accounts = self.property_account_payable_id + if reconcile_mode == "customers": + accounts = self.property_account_receivable_id + + action_context = { + "show_mode_selector": True, + "partner_ids": [self.id], + "mode": reconcile_mode, + "account_ids": accounts.ids, + } + return { + "type": "ir.actions.client", + "tag": "manual_reconciliation_view", + "context": action_context, + } diff --git a/account_partner_reconcile/readme/CONFIGURE.rst b/account_partner_reconcile/readme/CONFIGURE.rst new file mode 100644 index 00000000..db5fa027 --- /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 00000000..97ef56a2 --- /dev/null +++ b/account_partner_reconcile/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Jordi Ballester +* Jaume Planas diff --git a/account_partner_reconcile/readme/DESCRIPTION.rst b/account_partner_reconcile/readme/DESCRIPTION.rst new file mode 100644 index 00000000..8e5542ed --- /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 00000000..1072ced9 --- /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 00000000..3a0328b5 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 00000000..164077c7 --- /dev/null +++ b/account_partner_reconcile/static/description/index.html @@ -0,0 +1,436 @@ + + + + + + +Account Partner Reconcile + + + +
+

Account Partner Reconcile

+ + +

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

+

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 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_partner_reconcile/tests/__init__.py b/account_partner_reconcile/tests/__init__.py new file mode 100644 index 00000000..6032803a --- /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 00000000..7d550e75 --- /dev/null +++ b/account_partner_reconcile/tests/test_account_partner_reconcile.py @@ -0,0 +1,33 @@ +# 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(TestAccountPartnerReconcile, self).setUp() + + self.partner1 = self.env.ref("base.res_partner_1") + + def test_account_partner_reconcile(self): + res = self.partner1.action_open_reconcile() + + # assertDictContainsSubset is deprecated in Python <3.2 + expect = {"type": "ir.actions.client", "tag": "manual_reconciliation_view"} + self.assertDictEqual( + expect, + {k: v for k, v in res.items() if k in expect}, + "There was an error and the manual_reconciliation_view " + "couldn't be opened.", + ) + + expect = {"partner_ids": self.partner1.ids, "show_mode_selector": True} + self.assertDictEqual( + expect, + {k: v for k, v in res["context"].items() if k in expect}, + "There was an error and the manual_reconciliation_view " + "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 00000000..12c7809c --- /dev/null +++ b/account_partner_reconcile/views/res_partner_view.xml @@ -0,0 +1,34 @@ + + + + + + res.partner.view.buttons + res.partner + + + + +
+ + +
+
+
+
diff --git a/account_reconcile_restrict_partner_mismatch/__init__.py b/account_reconcile_restrict_partner_mismatch/__init__.py index bf588bc8..51d8f52a 100644 --- a/account_reconcile_restrict_partner_mismatch/__init__.py +++ b/account_reconcile_restrict_partner_mismatch/__init__.py @@ -1,2 +1 @@ -from . import models -from . import report +from . import models, report 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 00000000..3c96d56f --- /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 00000000..28c57bb6 --- /dev/null +++ b/setup/account_partner_reconcile/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)