Skip to content

Commit

Permalink
[FIX] Move code from donation to donation_direct_debit
Browse files Browse the repository at this point in the history
This is a forward-port of PR OCA#122 from 14.0 to 16.0
  • Loading branch information
alexis-via authored and esteveblanch committed Aug 15, 2024
1 parent 7c73472 commit 6b3d7e6
Show file tree
Hide file tree
Showing 17 changed files with 167 additions and 171 deletions.
81 changes: 54 additions & 27 deletions donation/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Donation
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:2293e7e2e2c085acf9a1787db4ce3e599d8579af9d329b7a506b67f300566cec
!! source digest: sha256:9a98f908b31390f0123ec3d830d465e40a0a55fbcea7ed88138bb7d19c8236d7
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand All @@ -17,22 +17,27 @@ Donation
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fdonation-lightgray.png?logo=github
:target: https://github.com/OCA/donation/tree/16.0/donation
:target: https://github.com/OCA/donation/tree/17.0/donation
:alt: OCA/donation
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/donation-16-0/donation-16-0-donation
:target: https://translation.odoo-community.org/projects/donation-17-0/donation-17-0-donation
: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/donation&target_branch=16.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/donation&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module handles donations by cash, check or by credit transfer and generate the corresponding journal entries and tax receipts. To fully support donations by credit transfer, if you are using the OCA bank statement reconcile interface, you also need the module **donation_bank_statement_oca**.
This module handles donations by cash, check or by credit transfer and
generate the corresponding journal entries and tax receipts. To fully
support donations by credit transfer, if you are using the OCA bank
statement reconcile interface, you also need the module
**donation_bank_statement_oca**.

This module will assist you in writing a thanks letter.

This module also supports in-kind donations (in-kind donations don't generate any accounting entry but can generate a tax receipt).
This module also supports in-kind donations (in-kind donations don't
generate any accounting entry but can generate a tax receipt).

**Table of contents**

Expand All @@ -44,61 +49,83 @@ Configuration

To configure this module, you need to:

* create donation products
* make sure you have an inbound payment mode for each payment mode used to receive donations. This payment mode must be configured with *Link to Bank Account* set to *Fixed* and with the donation option active.
* if you wish to have a control amount on the donation, add the users to the group *Donation Check Total*
- create donation products
- make sure you have an inbound payment mode for each payment mode
used to receive donations. This payment mode must be configured
with *Link to Bank Account* set to *Fixed* and with the donation
option active.
- if you wish to have a control amount on the donation, add the
users to the group *Donation Check Total*

If you receive donations via credit transfer, you must also:

* in the configuration page *Invoicing > Configuration > Settings*, in the *Donations* section, select the product that will be used for donations by credit transfer.
* on the bank journals corresponding to the bank accounts on which you receive donations by credit transfer, in the *Payments Configuration* tab, select the *Donation by credit transfer account*. This account must allow reconciliation.
* Make sure that the accountant that processes bank statements has *User* access level or higher on the *Donation* application.
- in the configuration page *Invoicing > Configuration > Settings*, in
the *Donations* section, select the product that will be used for
donations by credit transfer.
- on the bank journals corresponding to the bank accounts on which you
receive donations by credit transfer, in the *Payments Configuration*
tab, select the *Donation by credit transfer account*. This account
must allow reconciliation.
- Make sure that the accountant that processes bank statements has
*User* access level or higher on the *Donation* application.

Usage
=====

This module handles donations by cash, check or by credit transfer:

* for donation by cash or check, you should first create a new donation and validate it. Then, if you have the module *account_check_deposit* from the project `OCA/account-financial-tools <https://github.com/OCA/account-financial-tools>`_, you can create a check deposit.
* for a donation by credit transfer, the process is different: import your bank statement file and, while processing it, you will see a donation button that allow you to create a new donation directly from the bank statement reconcile interface.
- for donation by cash or check, you should first create a new donation
and validate it. Then, if you have the module *account_check_deposit*
from the project
`OCA/account-financial-tools <https://github.com/OCA/account-financial-tools>`__,
you can create a check deposit.
- for a donation by credit transfer, the process is different: import
your bank statement file and, while processing it, you will see a
donation button that allow you to create a new donation directly from
the bank statement reconcile interface.

When you validate a donation:

* it will create a journal entry that goes directly from the revenue account to the payment account without going through a receivable account.
* if the tax receipt option of the donor is configured as *For Each Donation* and the product of the donation line is eligible to a tax receipt, it will generate the tax receipt.
- it will create a journal entry that goes directly from the revenue
account to the payment account without going through a receivable
account.
- if the tax receipt option of the donor is configured as *For Each
Donation* and the product of the donation line is eligible to a tax
receipt, it will generate the tax receipt.

To have some statistics about the donations, go to the menu Donation > Reporting > Donations Analysis.
To have some statistics about the donations, go to the menu Donation >
Reporting > Donations Analysis.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/donation/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 <https://github.com/OCA/donation/issues/new?body=module:%20donation%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/donation/issues/new?body=module:%20donation%0Aversion:%2017.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
~~~~~~~
-------

* Barroux Abbey
* Akretion

Contributors
~~~~~~~~~~~~
------------

* Brother Bernard <informatique - at - barroux.org>
* Brother Irénée (Barroux Abbey)
* Alexis de Lattre <[email protected]>
* Serpent Consulting Services Pvt. Ltd. <[email protected]>
* Nikul Chaudhary <[email protected]>
- Brother Bernard <informatique - at - barroux.org>
- Brother Irénée (Barroux Abbey)
- Alexis de Lattre <[email protected]>
- Serpent Consulting Services Pvt. Ltd. <[email protected]>
- Nikul Chaudhary <[email protected]>

Maintainers
~~~~~~~~~~~
-----------

This module is maintained by the OCA.

Expand All @@ -118,6 +145,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-alexis-via|

This module is part of the `OCA/donation <https://github.com/OCA/donation/tree/16.0/donation>`_ project on GitHub.
This module is part of the `OCA/donation <https://github.com/OCA/donation/tree/17.0/donation>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 1 addition & 2 deletions donation/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{
"name": "Donation",
"version": "16.0.1.0.0",
"version": "16.0.2.0.0",
"category": "Accounting",
"license": "AGPL-3",
"summary": "Manage donations",
Expand All @@ -22,7 +22,6 @@
"wizard/res_config_settings.xml",
"data/donation_sequence.xml",
"views/account_payment_mode.xml",
"views/account_journal.xml",
"views/donation_campaign.xml",
"views/donation_thanks_template.xml",
"views/res_users.xml",
Expand Down
1 change: 0 additions & 1 deletion donation/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from . import donation_thanks_template
from . import account_bank_statement_line
from . import account_analytic_applicability
from . import account_journal
from . import res_partner
from . import res_users
from . import res_company
58 changes: 0 additions & 58 deletions donation/models/account_journal.py

This file was deleted.

7 changes: 0 additions & 7 deletions donation/models/donation.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,13 +269,6 @@ def _prepare_counterpart_move_line(
debit = 0
if self.bank_statement_line_id:
account_id = company.donation_account_id.id
elif self.payment_mode_id.payment_order_ok:
if not journal.donation_debit_order_account_id:
raise UserError(
_("Missing Donation by Debit Order Account on journal '%s'.")
% journal.display_name
)
account_id = journal.donation_debit_order_account_id.id
else:
if not company.account_journal_payment_debit_account_id:
raise UserError(
Expand Down
3 changes: 3 additions & 0 deletions donation/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
21 changes: 21 additions & 0 deletions donation/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
To configure this module, you need to:

> - create donation products
> - make sure you have an inbound payment mode for each payment mode
> used to receive donations. This payment mode must be configured with
> *Link to Bank Account* set to *Fixed* and with the donation option
> active.
> - if you wish to have a control amount on the donation, add the users
> to the group *Donation Check Total*
If you receive donations via credit transfer, you must also:

- in the configuration page *Invoicing \> Configuration \> Settings*, in
the *Donations* section, select the product that will be used for
donations by credit transfer.
- on the bank journals corresponding to the bank accounts on which you
receive donations by credit transfer, in the *Payments Configuration*
tab, select the *Donation by credit transfer account*. This account
must allow reconciliation.
- Make sure that the accountant that processes bank statements has
*User* access level or higher on the *Donation* application.
11 changes: 0 additions & 11 deletions donation/readme/CONFIGURE.rst

This file was deleted.

5 changes: 5 additions & 0 deletions donation/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- Brother Bernard \<informatique - at - barroux.org\>
- Brother Irénée (Barroux Abbey)
- Alexis de Lattre \<<[email protected]>\>
- Serpent Consulting Services Pvt. Ltd. \<<[email protected]>\>
- Nikul Chaudhary \<<[email protected]>\>
5 changes: 0 additions & 5 deletions donation/readme/CONTRIBUTORS.rst

This file was deleted.

10 changes: 10 additions & 0 deletions donation/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
This module handles donations by cash, check or by credit transfer and
generate the corresponding journal entries and tax receipts. To fully
support donations by credit transfer, if you are using the OCA bank
statement reconcile interface, you also need the module
**donation_bank_statement_oca**.

This module will assist you in writing a thanks letter.

This module also supports in-kind donations (in-kind donations don't
generate any accounting entry but can generate a tax receipt).
5 changes: 0 additions & 5 deletions donation/readme/DESCRIPTION.rst

This file was deleted.

23 changes: 23 additions & 0 deletions donation/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
This module handles donations by cash, check or by credit transfer:

- for donation by cash or check, you should first create a new donation
and validate it. Then, if you have the module *account_check_deposit*
from the project
[OCA/account-financial-tools](https://github.com/OCA/account-financial-tools),
you can create a check deposit.
- for a donation by credit transfer, the process is different: import
your bank statement file and, while processing it, you will see a
donation button that allow you to create a new donation directly from
the bank statement reconcile interface.

When you validate a donation:

- it will create a journal entry that goes directly from the revenue
account to the payment account without going through a receivable
account.
- if the tax receipt option of the donor is configured as *For Each
Donation* and the product of the donation line is eligible to a tax
receipt, it will generate the tax receipt.

To have some statistics about the donations, go to the menu Donation \>
Reporting \> Donations Analysis.
11 changes: 0 additions & 11 deletions donation/readme/USAGE.rst

This file was deleted.

Loading

0 comments on commit 6b3d7e6

Please sign in to comment.