Skip to content

Commit

Permalink
migrate reconcile 1015 wizard
Browse files Browse the repository at this point in the history
  • Loading branch information
davidwul committed Oct 11, 2024
1 parent c89aa7f commit 0ca8a43
Show file tree
Hide file tree
Showing 11 changed files with 396 additions and 0 deletions.
75 changes: 75 additions & 0 deletions account_reconcile_checkout/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
==========================================
Reconcile tools for Compassion CH
==========================================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! 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-CompassionCH%2Fcompassion--switzerland-lightgray.png?logo=github
:target: https://github.com/CompassionCH/compassion-switzerland/tree/11.0/account_reconcile_compassion
:alt: CompassionCH/compassion-switzerland

|badge1| |badge2| |badge3|


It finds a matching invoice for the move_line and reconciles only if the amount of the payment corresponds or if it is a multiple of the invoice amount. If many invoices are found, the first reconciled invoice is the current invoice (last invoice that is not in future). Then it reconciles the other invoices from last invoice to first.

**Table of contents**

.. contents::
:local:

Configuration
=============


Usage
=====


Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/CompassionCH/compassion-switzerland/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 <https://github.com/CompassionCH/compassion-switzerland/issues/new?body=module:%20account_reconcile_compassion%0Aversion:%2011.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
~~~~~~~

* Compassion CH

Contributors
~~~~~~~~~~~~

* Emanuel Cino <ecino@compassion.ch>

Maintainers
~~~~~~~~~~~

This module is maintained by Compassion Switzerland.

.. image:: https://upload.wikimedia.org/wikipedia/en/8/83/CompassionInternationalLogo.png
:alt: Compassion Switzerland
:target: https://www.compassion.ch

Compassion Switzerland is a nonprofit organization whose
mission is to release children from extreme poverty in Jesus name.

This module is part of the `CompassionCH/compassion-switzerland <https://github.com/CompassionCH/compassion-switzerland/tree/11.0/account_reconcile_compassion>`_ project on GitHub.

You are welcome to contribute.
11 changes: 11 additions & 0 deletions account_reconcile_checkout/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
##############################################################################
#
# Copyright (C) 2014 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file __manifest__.py
#
##############################################################################

from . import wizards
50 changes: 50 additions & 0 deletions account_reconcile_checkout/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
##############################################################################
#
# ______ Releasing children from poverty _
# / ____/___ ____ ___ ____ ____ ___________(_)___ ____
# / / / __ \/ __ `__ \/ __ \/ __ `/ ___/ ___/ / __ \/ __ \
# / /___/ /_/ / / / / / / /_/ / /_/ (__ |__ ) / /_/ / / / /
# \____/\____/_/ /_/ /_/ .___/\__,_/____/____/_/\____/_/ /_/
# /_/
# in Jesus' name
#
# Copyright (C) 2014-2017 Compassion CH (http://www.compassion.ch)
# @author: Emanuel Cino <ecino@compassion.ch>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################

# pylint: disable=C8101
{
"name": "Reconcile tools for Compassion CH",
"version": "14.0.1.0.0",
"author": "Compassion CH",
"license": "AGPL-3",
"category": "Finance",
"website": "http://www.compassion.ch",
"depends": [
"account",
"payment_postfinance_flex" # paid-addons
],
"external_dependencies": {"python": [
"postfinancecheckout"
]},
"data": [
"security/ir.model.access.csv",
"views/reconcile_outstanding_wizard_view.xml",
],
"auto_install": False,
"installable": True,
}
3 changes: 3 additions & 0 deletions account_reconcile_checkout/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
You can add the following system parameter to enable an analytic account to be set on exchange rate move lines:

* account_reconcile_compassion.currency_exchange_analytic_account
1 change: 1 addition & 0 deletions account_reconcile_checkout/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Emanuel Cino <ecino@compassion.ch>
6 changes: 6 additions & 0 deletions account_reconcile_checkout/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Reconcile rules with bvr_ref of invoice for Compassion CH.

This will add a Product field in the bank statement reconcile view that will allow to create an invoice from a received payment. When choosing a product, an invoice will be created and will be reconciled with the given payment.

It finds a matching invoice for the move_line and reconciles only if the amount of the payment corresponds or if it is a multiple of the invoice amount.
If many invoices are found, the first reconciled invoice is the current invoice (last invoice that is not in future). Then it reconciles the other invoices from last invoice to first.
3 changes: 3 additions & 0 deletions account_reconcile_checkout/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
To use this module, you need to:

* Go to Accounting -> Bank Statement -> Reconcile
2 changes: 2 additions & 0 deletions account_reconcile_checkout/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_reconcile_outstanding_view,Access reconcile outstanding receipts Wizard,model_reconcile_outstanding_wizard,account.group_account_invoice,1,1,1,1
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="reconcile_outstanding_view" model="ir.ui.view">
<field name="name">checkout.reconcile.outstanding.wizard</field>
<field name="model">reconcile.outstanding.wizard</field>
<field name="arch" type="xml">
<form>
<sheet>
<group>
<field name="account_id"/>
</group>
</sheet>
<footer>
<button name="reconcile_outstanding" type="object" string="Reconcile" class="oe_highlight"/>
</footer>
</form>
</field>
</record>

<!-- Action opening the tree view -->
<record id="action_reconcile_outstanding_wizard" model="ir.actions.act_window">
<field name="name">Reconcile outstanding receipts</field>
<field name="res_model">reconcile.outstanding.wizard</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>

<menuitem id="menu_open_reconcile_outstanding" parent="account.menu_finance_entries_actions" action="action_reconcile_outstanding_wizard" name="Reconcile outstanding receipts"/>
</odoo>
10 changes: 10 additions & 0 deletions account_reconcile_checkout/wizards/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
##############################################################################
#
# Copyright (C) 2014 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file __manifest__.py
#
##############################################################################
from . import reconcile_outstanding_wizard
Loading

0 comments on commit 0ca8a43

Please sign in to comment.