Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
2,937 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
.. 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 | ||
|
||
============= | ||
Donation Base | ||
============= | ||
|
||
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>`_. | ||
|
||
Configuration | ||
============= | ||
|
||
To configure this module, you need to: | ||
|
||
* create donation products | ||
* set the *Tax Receipt Option* on partners | ||
|
||
Usage | ||
===== | ||
|
||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas | ||
:alt: Try me on Runbot | ||
:target: https://runbot.odoo-community.org/runbot/180/11.0 | ||
|
||
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 smashing it by providing a detailed and welcomed feedback. | ||
|
||
Credits | ||
======= | ||
|
||
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> | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# © 2014-2016 Barroux Abbey (http://www.barroux.org) | ||
# © 2014-2016 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': '12.0.1.0.0', | ||
'category': 'Accounting & Finance', | ||
'license': 'AGPL-3', | ||
'summary': 'Base module for donations', | ||
'author': 'Barroux Abbey, Akretion, Odoo Community Association (OCA)', | ||
'website': 'https://github.com/OCA/donation', | ||
'depends': [ | ||
'account', | ||
], | ||
'data': [ | ||
'security/ir.model.access.csv', | ||
'security/tax_receipt_security.xml', | ||
'views/product.xml', | ||
'views/partner.xml', | ||
'views/donation_tax_receipt.xml', | ||
'wizard/tax_receipt_annual_create_view.xml', | ||
'wizard/tax_receipt_print_view.xml', | ||
'report/report.xml', | ||
'report/report_donationtax.xml', | ||
'data/donation_tax_seq.xml', | ||
'data/donation_mail_template.xml', | ||
], | ||
'demo': [ | ||
'demo/donation_demo.xml', | ||
], | ||
'installable': True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
© 2017 Akretion (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 and '%s <%s>' % (user.name, user.email) or '')|safe}</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" 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"><![CDATA[ | ||
<p>Dear ${object.partner_id.name} | ||
% if object.partner_id.parent_id: | ||
(<i>${object.partner_id.parent_id.name}</i>) | ||
% endif | ||
,</p> | ||
<p>Please find enclosed your tax receipt <strong>${object.number}</strong> | ||
amounting in <strong>${object.amount} ${object.currency_id.name}</strong> | ||
from ${object.company_id.name}. | ||
</p> | ||
<p>Thank you very much for your donation.</p> | ||
]]></field> | ||
</record> | ||
|
||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
© 2014-2016 Barroux Abbey (http://www.barroux.org) | ||
© 2014-2016 Akretion France (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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
<?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="donation" eval="True"/> | ||
<field name="tax_receipt_ok" eval="True"/> | ||
<field name="list_price">0</field> | ||
<field name="type">service</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="donation" eval="True"/> | ||
<field name="tax_receipt_ok" eval="False"/> | ||
<field name="list_price">0</field> | ||
<field name="type">service</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="donation" eval="True"/> | ||
<field name="tax_receipt_ok" eval="True"/> | ||
<field name="in_kind_donation" eval="True"/> | ||
<field name="list_price">0</field> | ||
<field name="type">service</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="donation" eval="True"/> | ||
<field name="tax_receipt_ok" eval="False"/> | ||
<field name="in_kind_donation" eval="True"/> | ||
<field name="list_price">0</field> | ||
<field name="type">service</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="customer" 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="customer" 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="customer" 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> |
Oops, something went wrong.