Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
42f13cf
Start the update to new architecture explained in issue #22
alexis-via Jul 22, 2016
973f031
Add index=True on fields that are often searched
alexis-via Jul 24, 2016
5fffcf6
Add module donation_sale
alexis-via Jul 27, 2016
7616748
Set default value on donation.tax.receipt Remove tax via the onchange…
alexis-via Jul 28, 2016
e4e1b76
Port all modules (except donation_thanks) to v10
alexis-via Oct 12, 2016
0867fff
Add button to access tax receipts from partners
alexis-via Nov 16, 2016
73f17fe
Pylint fixes
alexis-via Nov 16, 2016
7c6ea29
Add fr translation for donation_base and donation_sale
alexis-via Nov 23, 2016
39d369b
Inherit action_invoice_paid() instead of using a cron to generate tax…
alexis-via Jan 5, 2017
e97b40f
Change default value for donation_tax_receipt on partners
alexis-via Jan 24, 2017
eb8e4bc
Tax receipt subtotal now includes donations in foreign currencies
alexis-via Jan 26, 2017
759c6bd
Add ACL for donation_tax_receipt
alexis-via Jan 30, 2017
71bfc2f
Add log message for the generation of annual fiscal receipts
alexis-via Feb 9, 2017
d75d920
Add "send by email" button on donation tax receipts
alexis-via Apr 12, 2017
bce2631
Archive donation.tax.receipt reports by default (like invoices)
alexis-via Jun 12, 2017
797811d
Qweb donation tax receipt report
alexis-via Jun 12, 2017
4a23bb9
filename when using print button
alexis-via Jun 12, 2017
bfcfe09
FIX print tax receipt wizard
alexis-via Jul 10, 2017
8179e8b
OCA Transbot updated translations from Transifex
oca-transbot Mar 17, 2018
5957bdd
Use compute_sudo=True in field definition when needed
alexis-via Jun 20, 2018
6b23743
Update donation_base.pot
oca-travis Jun 23, 2018
7e1a95a
Update donation_base.pot
oca-travis Jul 31, 2018
3327f19
Migrated donation_base module v10 to v11
nikul-serpentcs Oct 10, 2018
afaa250
Update translation files
oca-transbot Dec 9, 2018
3b09e59
Added translation using Weblate (German)
kempleton Feb 8, 2019
0fa2e7b
Translated using Weblate (German)
kempleton Feb 8, 2019
d145f7f
icon.png
OCA-git-bot Apr 3, 2019
8acc87d
Update donation_base.pot
oca-travis May 1, 2019
7227f2f
Update translation files
oca-transbot May 20, 2019
e70a301
Translated using Weblate (German)
benbrich Jun 28, 2019
dd9e35b
[MIG] Migration: donation_base v11 to v12
nikul-serpentcs Sep 30, 2019
c5c9b64
[UPD] README.rst
OCA-git-bot Jun 18, 2020
968a57e
[FIX] tax.receipt creation sequence
Jun 19, 2020
98d5f15
[FIX] remove unnecessary try block
Jun 19, 2020
b62a360
[FIX] donation: groups on view
Jul 29, 2020
f4849d2
[IMP] donation_base: black, isort, prettier
albariera Feb 22, 2021
6c95353
[MIG] donation_base: migration to 13.0
albariera Feb 22, 2021
7cbcac2
[UPD] Update donation_base.pot
oca-travis Jul 15, 2021
a3f08e2
[UPD] README.rst
OCA-git-bot Jul 15, 2021
895dc10
[MIG] donation_base from v13 to v14
alexis-via Aug 8, 2021
94d7bf9
[UPD] Update donation_base.pot
oca-travis Oct 23, 2021
73a9e29
[UPD] README.rst
OCA-git-bot Oct 23, 2021
0dc6ec5
donation_base: fix report filename
alexis-via Mar 15, 2022
8041f1c
[UPD] Update donation_base.pot
oca-travis Mar 20, 2022
e2174c1
donation_base 14.0.1.1.0
OCA-git-bot Mar 20, 2022
2a508d2
Update translation files
oca-transbot Mar 20, 2022
51fe058
Show donation button on partner form view without condition
alexis-via Apr 20, 2022
ceb4536
donation_base 14.0.1.2.0
OCA-git-bot Aug 8, 2022
6e44fab
[15.0][MIG] donation_base
kluna1998 Sep 6, 2022
0504355
[UPD] Update donation_base.pot
Feb 28, 2023
029f04b
[UPD] README.rst
OCA-git-bot Feb 28, 2023
9380594
[MIG] donation_base to v16
alexis-via Feb 28, 2023
88455ad
[UPD] Update donation_base.pot
Mar 17, 2023
340bcb0
[UPD] README.rst
OCA-git-bot Mar 17, 2023
73c8349
Update translation files
weblate Mar 18, 2023
9ac9cd2
donation_base: use detailed_type on product.template
alexis-via Mar 22, 2023
89c967a
[UPD] Update donation_base.pot
Apr 20, 2023
64fdf0b
Update translation files
weblate Apr 20, 2023
095b031
[UPD] Update donation_base.pot
May 15, 2023
59a29bf
Update translation files
weblate May 15, 2023
734c581
Translated using Weblate (Spanish)
Ivorra78 Aug 3, 2023
c47d272
[UPD] README.rst
OCA-git-bot Sep 3, 2023
01d4a85
[UPD] Update donation_base.pot
Sep 3, 2023
a40fc03
Update translation files
weblate Sep 3, 2023
874b135
Translated using Weblate (Spanish)
Ivorra78 Sep 5, 2023
25c9bd2
[UPD] Update donation_base.pot
Oct 27, 2023
3053b45
Update translation files
weblate Oct 29, 2023
2a427e9
Added translation using Weblate (Italian)
mymage May 8, 2024
420464e
Translated using Weblate (Italian)
mymage Jan 13, 2025
782e773
[IMP] donation_base: pre-commit execution
Jun 3, 2025
17af33d
[MIG] donation_base: Migration to 18.0
Jun 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 103 additions & 0 deletions donation_base/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
=============
Donation Base
=============

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:6e2db8827361efb5621a1344f354283d19a040354375a96852640d2a8ede572b
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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%2Fdonation-lightgray.png?logo=github
:target: https://github.com/OCA/donation/tree/18.0/donation_base
:alt: OCA/donation
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/donation-18-0/donation-18-0-donation_base
: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=18.0
:alt: Try me on Runboat

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

This is the base module for donations. This module doesn't do anything
in itself ; it just adds some properties on products and partners and
adds the *donation.tax.receipt* object.

To get some real features, you should install the *donation* or the
*donation_sale* module. To understand the difference between these 2
modules, read `this post <https://github.com/OCA/donation/issues/22>`__.

**Table of contents**

.. contents::
:local:

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

To configure this module, you need to:

- create donation products
- set the *Tax Receipt Option* on partners

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_base%0Aversion:%2018.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 <alexis.delattre@akretion.com>
- Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
- Nikul Chaudhary <nikul.chaudhary.serpentcs@gmail.com>

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.

.. |maintainer-alexis-via| image:: https://github.com/alexis-via.png?size=40px
:target: https://github.com/alexis-via
:alt: alexis-via

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/18.0/donation_base>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions donation_base/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from . import models
from . import wizard
30 changes: 30 additions & 0 deletions donation_base/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# © 2014-2021 Barroux Abbey (http://www.barroux.org)
# © 2014-2021 Akretion France (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Donation Base",
"version": "18.0.1.0.0",
"category": "Accounting",
"license": "AGPL-3",
"summary": "Base module for donations",
"author": "Barroux Abbey, Akretion, Odoo Community Association (OCA)",
"maintainers": ["alexis-via"],
"website": "https://github.com/OCA/donation",
"depends": ["account"],
"data": [
"security/ir.model.access.csv",
"security/tax_receipt_security.xml",
"report/report.xml",
"views/product.xml",
"views/res_partner.xml",
"views/donation_tax_receipt.xml",
"wizard/tax_receipt_annual_create_view.xml",
"wizard/tax_receipt_print_view.xml",
"report/report_donationtax.xml",
"data/donation_tax_seq.xml",
"data/donation_mail_template.xml",
],
"demo": ["demo/donation_demo.xml"],
"installable": True,
}
57 changes: 57 additions & 0 deletions donation_base/data/donation_mail_template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2017-2021 Akretion France (http://www.akretion.com/)
@author: Alexis de Lattre <alexis.delattre@akretion.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo noupdate="1">
<record id="tax_receipt_email_template" model="mail.template">
<field name="name">Donation Tax Receipt - Send by Email</field>
<field name="email_from">{{user.email_formatted}}</field>
<field
name="subject"
>{{object.company_id.name}} - Tax Receipt {{object.number or 'n/a'}}</field>
<field name="partner_to">{{object.partner_id.id}}</field>
<field name="model_id" ref="donation_base.model_donation_tax_receipt" />
<field name="auto_delete" eval="False" />
<field
name="report_template_ids"
eval="[(4, ref('report_donation_tax_receipt'))]"
/>
<!-- <field -->
<!-- name="report_name" -->
<!-- >{{object.company_id.name.replace(' ', '_')}}-Tax_Receipt_{{(object.number or '').replace('/','_')}}</field> -->
<field name="lang">{{object.partner_id.lang}}</field>
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Dear <t t-out="object.partner_id.name">Alexis</t>
<t t-if="object.partner_id.parent_id">
(<i>
<t t-out="object.partner_id.parent_id.name" />
</i>)
</t>
,<br /><br />

Thank you very much for your donation.<br /><br />

Please find enclosed your tax receipt <span
style="font-weight: bold;"
t-out="object.number"
>RECPT-2023-001</span>
amounting in <span
style="font-weight: bold;"
t-out="format_amount(object.amount, object.currency_id) or ''"
>$ 10.00</span>
from <t t-out="object.company_id.name">Barroux Abbey</t>.
<t t-if="not is_html_empty(user.signature)">
<br />
<br />
<t t-out="user.signature or ''">--<br />Mitchell Admin</t>
</t>
<br /><br />
</p>
</div>
</field>
</record>
</odoo>
16 changes: 16 additions & 0 deletions donation_base/data/donation_tax_seq.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2014-2021 Barroux Abbey (http://www.barroux.org)
Copyright 2014-2021 Akretion France (http://www.akretion.com/)
@author: Alexis de Lattre <alexis.delattre@akretion.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo noupdate="1">
<record id="donation_tax_receipt_seq" model="ir.sequence">
<field name="name">Donation Tax Receipt</field>
<field name="code">donation.tax.receipt</field>
<field name="prefix">%(range_year)s-</field>
<field name="use_date_range" eval="True" />
<field name="padding">5</field>
</record>
</odoo>
92 changes: 92 additions & 0 deletions donation_base/demo/donation_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<!-- PRODUCTS -->
<record id="product_product_donation" model="product.product">
<field name="name">Donation</field>
<field name="default_code">DON</field>
<field name="categ_id" ref="product.product_category_5" />
<field name="sale_ok" eval="True" />
<field name="tax_receipt_ok" eval="True" />
<field name="list_price">0</field>
<field name="type">service</field>
<field name="donation_type">donation</field>
<field name="taxes_id" eval="False" />
<field
name="description"
>This donation item is eligible for a tax receipt.</field>
</record>
<record id="product_product_donation_notaxreceipt" model="product.product">
<field name="name">Donation - no tax receipt</field>
<field name="default_code">DON-NOTAXR</field>
<field name="categ_id" ref="product.product_category_5" />
<field name="sale_ok" eval="True" />
<field name="tax_receipt_ok" eval="False" />
<field name="list_price">0</field>
<field name="type">service</field>
<field name="donation_type">donation</field>
<field name="taxes_id" eval="False" />
<field
name="description"
>This donation item is not eligible for a tax receipt.</field>
</record>
<record id="product_product_inkind_donation" model="product.product">
<field name="name">In-Kind Donation</field>
<field name="default_code">KIND-DON</field>
<field name="categ_id" ref="product.product_category_5" />
<field name="sale_ok" eval="True" />
<field name="tax_receipt_ok" eval="True" />
<field name="list_price">0</field>
<field name="type">service</field>
<field name="donation_type">donation_in_kind</field>
<field name="taxes_id" eval="False" />
<field
name="description"
>This donation item is eligible for a tax receipt.</field>
</record>
<record id="product_product_inkind_donation_notaxreceipt" model="product.product">
<field name="name">In-Kind Donation - no tax receipt</field>
<field name="default_code">KIND-DON-NOTAXR</field>
<field name="categ_id" ref="product.product_category_5" />
<field name="sale_ok" eval="True" />
<field name="tax_receipt_ok" eval="False" />
<field name="list_price">0</field>
<field name="type">service</field>
<field name="donation_type">donation_in_kind</field>
<field name="taxes_id" eval="False" />
<field
name="description"
>This donation item is not eligible for a tax receipt.</field>
</record>
<!-- PARTNERS -->
<record id="donor1" model="res.partner">
<field name="name">Rémi Duplat</field>
<field name="donor_rank" eval="1" />
<field name="street">12 rue de l'espérance</field>
<field name="zip">69100</field>
<field name="city">Villeurbanne</field>
<field name="country_id" ref="base.fr" />
<field name="email">vincent.duplat@yahoo.example.com</field>
<field name="tax_receipt_option">each</field>
</record>
<record id="donor2" model="res.partner">
<field name="name">Lucie Dubois</field>
<field name="donor_rank" eval="1" />
<field name="street">34 rue Pierre Dupont</field>
<field name="zip">69001</field>
<field name="city">Lyon</field>
<field name="country_id" ref="base.fr" />
<field name="email">lucie.dubois@yahoo.example.com</field>
<field name="tax_receipt_option">annual</field>
</record>
<record id="donor3" model="res.partner">
<field name="name">Joe Smith</field>
<field name="donor_rank" eval="1" />
<field name="street">Craig Pond Trail</field>
<field name="zip">04431</field>
<field name="city">East Orland</field>
<field name="state_id" ref="base.state_us_20" />
<field name="country_id" ref="base.us" />
<field name="email">joe.smith@gmail.example.com</field>
<field name="tax_receipt_option">none</field>
</record>
</odoo>
Loading