diff --git a/account_partner_reconcile/README.rst b/account_partner_reconcile/README.rst new file mode 100644 index 00000000..b0a8842c --- /dev/null +++ b/account_partner_reconcile/README.rst @@ -0,0 +1,52 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +========================= +Account Partner Reconcile +========================= + +This module adds a button "Match Payments" in the customer & suppliers form +view to allow to start the matching of invoices & payments for that partner. + +Configuration +============= + +The button is visible only to users that belong to the accounting groups +"Accountant" or "Adviser". + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/96/9.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 smashing it by providing a detailed and welcomed feedback. + + +Credits +======= + +Contributors +------------ + +* Jordi Ballester + +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_partner_reconcile/__init__.py b/account_partner_reconcile/__init__.py new file mode 100644 index 00000000..a0fdc10f --- /dev/null +++ b/account_partner_reconcile/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +from . import models diff --git a/account_partner_reconcile/__openerp__.py b/account_partner_reconcile/__openerp__.py new file mode 100644 index 00000000..7517dd13 --- /dev/null +++ b/account_partner_reconcile/__openerp__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# © 2017 Eficent Business and IT Consulting Services S.L. +# (http://www.eficent.com) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +{ + 'name': "Account Partner Reconcile", + 'version': '9.0.1.0.0', + 'category': 'Accounting', + 'author': 'Eficent,' + 'Odoo Community Association (OCA), ', + 'website': 'https://github.com/OCA/account-payment', + 'license': 'AGPL-3', + "depends": [ + 'account', + ], + "data": [ + 'views/res_partner_view.xml', + ], + "installable": True +} diff --git a/account_partner_reconcile/models/__init__.py b/account_partner_reconcile/models/__init__.py new file mode 100644 index 00000000..0fbdfcf8 --- /dev/null +++ b/account_partner_reconcile/models/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +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..b6c413b4 --- /dev/null +++ b/account_partner_reconcile/models/res_partner.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# © 2017 Eficent Business and IT Consulting Services S.L. +# (http://www.eficent.com) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from openerp import models, api + + +class ResPartner(models.Model): + _inherit = 'res.partner' + + @api.multi + def action_open_reconcile(self): + # Open reconciliation view for customers + accounts = self.env['account.account'] + accounts += (self.property_account_receivable_id + + self.property_account_payable_id) + + action_context = {'show_mode_selector': True, + 'partner_ids': [self.id, ], + 'account_ids': accounts.ids} + return { + 'type': 'ir.actions.client', + 'tag': 'manual_reconciliation_view', + 'context': action_context, + } 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/views/res_partner_view.xml b/account_partner_reconcile/views/res_partner_view.xml new file mode 100644 index 00000000..93e8722a --- /dev/null +++ b/account_partner_reconcile/views/res_partner_view.xml @@ -0,0 +1,20 @@ + + + + + res.partner.view.buttons + res.partner + + + + +
+ +
+
+
+ +