Repository
OCA/donation · module folder · Try on Runboat
Module version
1.3.0
Category
Accounting
Folder size
0.38 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/donation
Last tracking update
2026-08-11 17:15:19
Authors
Akretion, Odoo Community Association (OCA), Barroux Abbey
Maintainers
Akretion, Odoo Community Association (OCA), Barroux Abbey
Committers
Alexis de Lattre, Weblate, OCA-git-bot, oca-ci, TB-Ph35, David Brühlmeier
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
donation_stay
Description
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).

Code Analysis

Views touched (27)
XML IDNameModelTypeStatus
account_payment_method_line_tree donation.account.payment.method.line.list account.payment.method.line list Inherits account.view_account_payment_method_line_tree
donation_campaign_form donation.campaign.form donation.campaign form New
donation_campaign_search donation.campaign.search donation.campaign search New
donation_campaign_tree donation.campaign.list donation.campaign list New
donation_form donation.form donation.donation form New
donation_from_bank_statement_line_form Creation Donation from Bank Statement Line form donation.donation form New
donation_graph donation.graph donation.donation graph New
donation_line_form donation.line.form donation.line form New
donation_line_tree donation.line.list donation.line list New
donation_pivot donation.pivot donation.donation pivot New
donation_report_graph donation.report.graph donation.report graph New
donation_report_pivot donation.report.pivot donation.report pivot New
donation_report_search donation.report.search donation.report search New
donation_report_tree donation.report.list donation.report list New
donation_search donation.search donation.donation search New
donation_tax_receipt_form donation.donation.tax.receipt.form donation.tax.receipt form Inherits donation_base.donation_tax_receipt_form
donation_tax_receipt_option_switch_form donation_tax_receipt_option_switch.form donation.tax.receipt.option.switch form New
donation_thanks_template_form donation.thanks.template form New
donation_thanks_template_search donation.thanks.template search New
donation_thanks_template_tree donation.thanks.template list New
donation_tree donation.list donation.donation list New
donation_validate_form donation_validate.form donation.validate form New
report_donation_thanks report_donation_thanks ir.ui.view qweb New
res_config_settings_donation donation.res.config.settings.form res.config.settings form Inherits base.res_config_settings_view_form
view_partner_property_form donation.button.res.partner.form res.partner form Inherits donation_base.view_partner_property_form
view_users_form donation.res.users.form res.users form Inherits base.view_users_form
view_users_form_simple_modif donation.preferences.res.users.form res.users form Inherits base.view_users_form_simple_modif
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (15)

New fields (1)
  • business_domain Selection
    ondelete={'donation': 'cascade'} selection_add=[('donation', 'Donation')]
Public methods (0)

No public methods.

New fields (1)
  • donation_ids One2many → donation.donation
    readonly=True string='Donations' args: 'donation.donation', 'bank_statement_line_id'
Public methods (0)

No public methods.

New fields (1)
  • donation Boolean
    help='If enabled, this payment method will be available on donations'
Public methods (0)

No public methods.

New fields (7)
  • active Boolean
    default=True
  • code Char
  • company_id Many2one → res.company
    ondelete='cascade' args: 'res.company'
  • name Char
    required=True
  • note Text
    args: 'Notes'
  • sequence Integer
    default=10
  • start_date Date
    default=fields.Date.context_today
Public methods (0)

No public methods.

New fields (23)
  • amount_total Monetary
    compute='_compute_total' currency_field='currency_id' store=True tracking=True
  • amount_total_company_currency Monetary
    compute='_compute_total' currency_field='company_currency_id' store=True string='Amount Total in Company Currency'
  • bank_statement_line_id Many2one → account.bank.statement.line
    ondelete='restrict' readonly=True string='Source Bank Statement Line' args: 'account.bank.statement.line'
  • campaign_id Many2one → donation.campaign
    check_company=True default=<expr> ondelete='restrict' string='Donation Campaign' tracking=True args: 'donation.campaign'
  • check_total Monetary
    currency_field='currency_id' string='Check Amount' tracking=True
  • commercial_partner_id Many2one
    index=True related='partner_id.commercial_partner_id' store=True string='Parent Donor'
  • company_currency_id Many2one
    related='company_id.currency_id' store=True string='Company Currency'
  • company_id Many2one → res.company
    default=<expr> required=True args: 'res.company'
  • country_id Many2one → res.country
    compute='_compute_country_id' store=True args: 'res.country'
  • currency_id Many2one → res.currency
    default=<expr> ondelete='restrict' required=True tracking=True args: 'res.currency'
  • donation_date Date
    index=True required=True tracking=True
  • line_ids One2many → donation.line
    copy=True string='Donation Lines' args: 'donation.line', 'donation_id'
  • move_id Many2one → account.move
    check_company=True copy=False readonly=True string='Journal Entry' args: 'account.move'
  • number Char
    copy=False default=<expr> index=True readonly=True required=True string='Donation Number'
  • partner_id Many2one → res.partner
    index=True ondelete='restrict' required=True string='Donor' tracking=True args: 'res.partner'
  • payment_method_line_id Many2one → account.payment.method.line
    check_company=True default=<expr> domain="[('company_id', '=', company_id), ('donation', '=', True)]" string='Payment Method' tracking=True args: 'account.payment.method.line'
  • payment_ref Char
    copy=False string='Payment Reference'
  • state Selection
    copy=False default='draft' index=True readonly=True tracking=True args: [('draft', 'Draft'), ('done', 'Done'), ('cancel', 'Cancelled')]
  • tax_receipt_id Many2one → donation.tax.receipt
    check_company=True copy=False readonly=True tracking=True args: 'donation.tax.receipt'
  • tax_receipt_option Selection
    compute='_compute_tax_receipt_option' index=True precompute=True readonly=False store=True tracking=True args: [('none', 'None'), ('each', 'For Each Donation'), ('annual', 'Annual Tax Receipt')]
  • tax_receipt_total Monetary
    compute='_compute_total' currency_field='company_currency_id' help='Eligible Tax Receipt Sub-total in Company Currency' readonly=True store=True string='Tax Receipt Eligible Amount'
  • thanks_printed Boolean
    copy=False help='This field automatically becomes active when the thanks letter has been printed.' tracking=True
  • thanks_template_id Many2one → donation.thanks.template
    copy=False ondelete='restrict' args: 'donation.thanks.template'
Public methods (11)
  • cancel2draft(self)
    from Cancel state to Draft state
  • create(self, vals_list)
    @api.model_create_multi
  • done2cancel(self)
    from Done state to Cancel state
  • generate_each_tax_receipt(self)
  • print_thanks(self)
  • save_as_draft(self)
  • save_default_values(self)
  • tax_receipt_option_change(self)
    @api.onchange('tax_receipt_option')
  • thanks_printed_button(self)
  • unlink(self)
  • validate(self)

New fields (14)
  • amount Monetary
    compute='_compute_amount' currency_field='currency_id' store=True
  • amount_company_currency Monetary
    compute='_compute_amount' currency_field='company_currency_id' store=True string='Amount in Company Currency'
  • company_currency_id Many2one
    related='donation_id.company_id.currency_id' store=True string='Company Currency'
  • company_id Many2one
    related='donation_id.company_id' store=True
  • currency_id Many2one
    related='donation_id.currency_id' store=True
  • donation_id Many2one → donation.donation
    ondelete='cascade' args: 'donation.donation'
  • in_kind Boolean
    compute='_compute_in_kind' store=True
  • product_donation_type Selection
    related='product_id.donation_type' store=True string='Product Type donation'
  • product_id Many2one → product.product
    check_company=True domain=[('donation_type', '!=', False)] ondelete='restrict' required=True args: 'product.product'
  • quantity Integer
    default=1
  • sequence Integer
  • tax_receipt_amount Monetary
    compute='_compute_amount' currency_field='company_currency_id' store=True string='Tax Receipt Eligible Amount'
  • tax_receipt_ok Boolean
    related='product_id.tax_receipt_ok' store=True
  • unit_price Monetary
    currency_field='currency_id'
Public methods (1)
  • product_id_change(self)
    @api.onchange('product_id')

New fields (16)
  • amount_company_currency Monetary
    currency_field='company_currency_id' readonly=True args: 'Amount'
  • campaign_id Many2one → donation.campaign
    readonly=True args: 'donation.campaign', 'Donation Campaign'
  • company_currency_id Many2one → res.currency
    readonly=True args: 'res.currency'
  • company_id Many2one → res.company
    readonly=True args: 'res.company'
  • country_id Many2one → res.country
    readonly=True args: 'res.country', 'Partner Country'
  • donation_date Date
    readonly=True
  • in_kind Boolean
  • partner_id Many2one → res.partner
    readonly=True args: 'res.partner', 'Donor'
  • payment_method_line_id Many2one → account.payment.method.line
    readonly=True args: 'account.payment.method.line'
  • product_categ_id Many2one → product.category
    readonly=True args: 'product.category', 'Category of Product'
  • product_donation_type Selection
    related='product_id.donation_type' store=True
  • product_id Many2one → product.product
    readonly=True args: 'product.product'
  • tax_receipt_amount Monetary
    currency_field='company_currency_id' readonly=True args: 'Tax Receipt Eligible Amount'
  • tax_receipt_ok Boolean
    args: 'Eligible for a Tax Receipt'
  • thanks_printed Boolean
    readonly=True
  • thanks_template_id Many2one → donation.thanks.template
    readonly=True string='Thanks Template' args: 'donation.thanks.template'
Public methods (1)
  • init(self)

New fields (1)
  • donation_ids One2many → donation.donation
    string='Related Donations' args: 'donation.donation', 'tax_receipt_id'
Public methods (1)
  • update_tax_receipt_annual_dict(self, tax_receipt_annual_dict, start_date, end_date, company)
    @api.model

New fields (2)
  • donation_id Many2one → donation.donation
    default=<expr> required=True string='Donation' args: 'donation.donation'
  • new_tax_receipt_option Selection
    required=True string='Tax Receipt Option' args: [('each', 'For Each Donation'), ('annual', 'Annual Tax Receipt')]
Public methods (1)
  • switch(self)

New fields (6)
  • active Boolean
    default=True
  • company_id Many2one → res.company
    default=<expr> ondelete='cascade' args: 'res.company'
  • image Binary
    attachment=True
  • name Char
    required=True
  • sequence Integer
    default=10
  • text Text
    translate=True
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • run(self)

New fields (2)
  • donation_account_id Many2one → account.account
    check_company=True copy=False help='Transfer account for donations received by credit transfer. ' ondelete='restrict' string='Donation by Credit Transfer Account' args: 'account.account'
  • donation_credit_transfer_product_id Many2one → product.product
    check_company=True domain=[('donation_type', '!=', False)] ondelete='restrict' string='Product for Donations via Credit Transfer' args: 'product.product'
Public methods (0)

No public methods.

New fields (3)
  • donation_account_id Many2one
    domain="[('reconcile', '=', True), ('deprecated', '=', False), ('company_ids', 'in', company_id), ('account_type', '=', 'asset_current')]" readonly=False related='company_id.donation_account_id'
  • donation_credit_transfer_product_id Many2one
    readonly=False related='company_id.donation_credit_transfer_product_id'
  • group_donation_check_total Boolean
    implied_group='donation.group_donation_check_total' string='Check Total on Donations'
Public methods (0)

No public methods.

New fields (2)
  • donation_count Integer
    compute='_compute_donation_count' compute_sudo=True string='# of Donations'
  • donation_ids One2many → donation.donation
    readonly=True string='Donations' args: 'donation.donation', 'partner_id'
Public methods (0)

No public methods.

New fields (2)
  • context_donation_campaign_id Many2one → donation.campaign
    args: 'donation.campaign', 'Current Donation Campaign'
  • context_donation_payment_method_line_id Many2one → account.payment.method.line
    company_dependent=True domain=[('donation', '=', True)] args: 'account.payment.method.line', 'Current Donation Payment Method'
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…