Skip to content

Commit 6b3d7e6

Browse files
alexis-viaesteveblanch
authored andcommitted
[FIX] Move code from donation to donation_direct_debit
This is a forward-port of PR OCA#122 from 14.0 to 16.0
1 parent 7c73472 commit 6b3d7e6

17 files changed

+167
-171
lines changed

donation/README.rst

+54-27
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Donation
77
!! This file is generated by oca-gen-addon-readme !!
88
!! changes will be overwritten. !!
99
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10-
!! source digest: sha256:2293e7e2e2c085acf9a1787db4ce3e599d8579af9d329b7a506b67f300566cec
10+
!! source digest: sha256:9a98f908b31390f0123ec3d830d465e40a0a55fbcea7ed88138bb7d19c8236d7
1111
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1212
1313
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -17,22 +17,27 @@ Donation
1717
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1818
:alt: License: AGPL-3
1919
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fdonation-lightgray.png?logo=github
20-
:target: https://github.com/OCA/donation/tree/16.0/donation
20+
:target: https://github.com/OCA/donation/tree/17.0/donation
2121
:alt: OCA/donation
2222
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/donation-16-0/donation-16-0-donation
23+
:target: https://translation.odoo-community.org/projects/donation-17-0/donation-17-0-donation
2424
:alt: Translate me on Weblate
2525
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26-
:target: https://runboat.odoo-community.org/builds?repo=OCA/donation&target_branch=16.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/donation&target_branch=17.0
2727
:alt: Try me on Runboat
2828

2929
|badge1| |badge2| |badge3| |badge4| |badge5|
3030

31-
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**.
31+
This module handles donations by cash, check or by credit transfer and
32+
generate the corresponding journal entries and tax receipts. To fully
33+
support donations by credit transfer, if you are using the OCA bank
34+
statement reconcile interface, you also need the module
35+
**donation_bank_statement_oca**.
3236

3337
This module will assist you in writing a thanks letter.
3438

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

3742
**Table of contents**
3843

@@ -44,61 +49,83 @@ Configuration
4449

4550
To configure this module, you need to:
4651

47-
* create donation products
48-
* 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.
49-
* if you wish to have a control amount on the donation, add the users to the group *Donation Check Total*
52+
- create donation products
53+
- make sure you have an inbound payment mode for each payment mode
54+
used to receive donations. This payment mode must be configured
55+
with *Link to Bank Account* set to *Fixed* and with the donation
56+
option active.
57+
- if you wish to have a control amount on the donation, add the
58+
users to the group *Donation Check Total*
5059

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

53-
* in the configuration page *Invoicing > Configuration > Settings*, in the *Donations* section, select the product that will be used for donations by credit transfer.
54-
* 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.
55-
* Make sure that the accountant that processes bank statements has *User* access level or higher on the *Donation* application.
62+
- in the configuration page *Invoicing > Configuration > Settings*, in
63+
the *Donations* section, select the product that will be used for
64+
donations by credit transfer.
65+
- on the bank journals corresponding to the bank accounts on which you
66+
receive donations by credit transfer, in the *Payments Configuration*
67+
tab, select the *Donation by credit transfer account*. This account
68+
must allow reconciliation.
69+
- Make sure that the accountant that processes bank statements has
70+
*User* access level or higher on the *Donation* application.
5671

5772
Usage
5873
=====
5974

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

62-
* 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.
63-
* 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.
77+
- for donation by cash or check, you should first create a new donation
78+
and validate it. Then, if you have the module *account_check_deposit*
79+
from the project
80+
`OCA/account-financial-tools <https://github.com/OCA/account-financial-tools>`__,
81+
you can create a check deposit.
82+
- for a donation by credit transfer, the process is different: import
83+
your bank statement file and, while processing it, you will see a
84+
donation button that allow you to create a new donation directly from
85+
the bank statement reconcile interface.
6486

6587
When you validate a donation:
6688

67-
* it will create a journal entry that goes directly from the revenue account to the payment account without going through a receivable account.
68-
* 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.
89+
- it will create a journal entry that goes directly from the revenue
90+
account to the payment account without going through a receivable
91+
account.
92+
- if the tax receipt option of the donor is configured as *For Each
93+
Donation* and the product of the donation line is eligible to a tax
94+
receipt, it will generate the tax receipt.
6995

70-
To have some statistics about the donations, go to the menu Donation > Reporting > Donations Analysis.
96+
To have some statistics about the donations, go to the menu Donation >
97+
Reporting > Donations Analysis.
7198

7299
Bug Tracker
73100
===========
74101

75102
Bugs are tracked on `GitHub Issues <https://github.com/OCA/donation/issues>`_.
76103
In case of trouble, please check there if your issue has already been reported.
77104
If you spotted it first, help us to smash it by providing a detailed and welcomed
78-
`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**>`_.
105+
`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**>`_.
79106

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

82109
Credits
83110
=======
84111

85112
Authors
86-
~~~~~~~
113+
-------
87114

88115
* Barroux Abbey
89116
* Akretion
90117

91118
Contributors
92-
~~~~~~~~~~~~
119+
------------
93120

94-
* Brother Bernard <informatique - at - barroux.org>
95-
* Brother Irénée (Barroux Abbey)
96-
* Alexis de Lattre <alexis.delattre@akretion.com>
97-
* Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
98-
* Nikul Chaudhary <nikul.chaudhary.serpentcs@gmail.com>
121+
- Brother Bernard <informatique - at - barroux.org>
122+
- Brother Irénée (Barroux Abbey)
123+
- Alexis de Lattre <alexis.delattre@akretion.com>
124+
- Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
125+
- Nikul Chaudhary <nikul.chaudhary.serpentcs@gmail.com>
99126

100127
Maintainers
101-
~~~~~~~~~~~
128+
-----------
102129

103130
This module is maintained by the OCA.
104131

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

119146
|maintainer-alexis-via|
120147

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

123150
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

donation/__manifest__.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
{
66
"name": "Donation",
7-
"version": "16.0.1.0.0",
7+
"version": "16.0.2.0.0",
88
"category": "Accounting",
99
"license": "AGPL-3",
1010
"summary": "Manage donations",
@@ -22,7 +22,6 @@
2222
"wizard/res_config_settings.xml",
2323
"data/donation_sequence.xml",
2424
"views/account_payment_mode.xml",
25-
"views/account_journal.xml",
2625
"views/donation_campaign.xml",
2726
"views/donation_thanks_template.xml",
2827
"views/res_users.xml",

donation/models/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from . import donation_thanks_template
66
from . import account_bank_statement_line
77
from . import account_analytic_applicability
8-
from . import account_journal
98
from . import res_partner
109
from . import res_users
1110
from . import res_company

donation/models/account_journal.py

-58
This file was deleted.

donation/models/donation.py

-7
Original file line numberDiff line numberDiff line change
@@ -269,13 +269,6 @@ def _prepare_counterpart_move_line(
269269
debit = 0
270270
if self.bank_statement_line_id:
271271
account_id = company.donation_account_id.id
272-
elif self.payment_mode_id.payment_order_ok:
273-
if not journal.donation_debit_order_account_id:
274-
raise UserError(
275-
_("Missing Donation by Debit Order Account on journal '%s'.")
276-
% journal.display_name
277-
)
278-
account_id = journal.donation_debit_order_account_id.id
279272
else:
280273
if not company.account_journal_payment_debit_account_id:
281274
raise UserError(

donation/pyproject.toml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["whool"]
3+
build-backend = "whool.buildapi"

donation/readme/CONFIGURE.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
To configure this module, you need to:
2+
3+
> - create donation products
4+
> - make sure you have an inbound payment mode for each payment mode
5+
> used to receive donations. This payment mode must be configured with
6+
> *Link to Bank Account* set to *Fixed* and with the donation option
7+
> active.
8+
> - if you wish to have a control amount on the donation, add the users
9+
> to the group *Donation Check Total*
10+
11+
If you receive donations via credit transfer, you must also:
12+
13+
- in the configuration page *Invoicing \> Configuration \> Settings*, in
14+
the *Donations* section, select the product that will be used for
15+
donations by credit transfer.
16+
- on the bank journals corresponding to the bank accounts on which you
17+
receive donations by credit transfer, in the *Payments Configuration*
18+
tab, select the *Donation by credit transfer account*. This account
19+
must allow reconciliation.
20+
- Make sure that the accountant that processes bank statements has
21+
*User* access level or higher on the *Donation* application.

donation/readme/CONFIGURE.rst

-11
This file was deleted.

donation/readme/CONTRIBUTORS.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
- Brother Bernard \<informatique - at - barroux.org\>
2+
- Brother Irénée (Barroux Abbey)
3+
- Alexis de Lattre \<<alexis.delattre@akretion.com>\>
4+
- Serpent Consulting Services Pvt. Ltd. \<<support@serpentcs.com>\>
5+
- Nikul Chaudhary \<<nikul.chaudhary.serpentcs@gmail.com>\>

donation/readme/CONTRIBUTORS.rst

-5
This file was deleted.

donation/readme/DESCRIPTION.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
This module handles donations by cash, check or by credit transfer and
2+
generate the corresponding journal entries and tax receipts. To fully
3+
support donations by credit transfer, if you are using the OCA bank
4+
statement reconcile interface, you also need the module
5+
**donation_bank_statement_oca**.
6+
7+
This module will assist you in writing a thanks letter.
8+
9+
This module also supports in-kind donations (in-kind donations don't
10+
generate any accounting entry but can generate a tax receipt).

donation/readme/DESCRIPTION.rst

-5
This file was deleted.

donation/readme/USAGE.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
This module handles donations by cash, check or by credit transfer:
2+
3+
- for donation by cash or check, you should first create a new donation
4+
and validate it. Then, if you have the module *account_check_deposit*
5+
from the project
6+
[OCA/account-financial-tools](https://github.com/OCA/account-financial-tools),
7+
you can create a check deposit.
8+
- for a donation by credit transfer, the process is different: import
9+
your bank statement file and, while processing it, you will see a
10+
donation button that allow you to create a new donation directly from
11+
the bank statement reconcile interface.
12+
13+
When you validate a donation:
14+
15+
- it will create a journal entry that goes directly from the revenue
16+
account to the payment account without going through a receivable
17+
account.
18+
- if the tax receipt option of the donor is configured as *For Each
19+
Donation* and the product of the donation line is eligible to a tax
20+
receipt, it will generate the tax receipt.
21+
22+
To have some statistics about the donations, go to the menu Donation \>
23+
Reporting \> Donations Analysis.

donation/readme/USAGE.rst

-11
This file was deleted.

0 commit comments

Comments
 (0)