Repository
OCA/data-protection · module folder · Try on Runboat
Module version
1.0.0
Category
Privacy
Folder size
0.29 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/data-protection
Last tracking update
2026-08-07 08:43:01
Authors
Odoo Community Association (OCA), initOS GmbH, Tecnativa
Maintainers
Odoo Community Association (OCA), initOS GmbH, Tecnativa
Committers
Weblate, OCA-git-bot, oca-ci, michelerusti
Odoo dependencies
OCA/data-protection:
odoo/odoo:
- web
- bus
Python dependencies
None
System dependencies
None
Required by
None
Description
This module allows the user to define a set of subjects (partners)
affected by any data processing activity, and establish a process to ask
them for consent to include them in that activity.

For those that need explicit consent as a lawfulness base for personal
data processing, as required by GDPR (article 6.1.a), this module
provides the needed tools to automate it.

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
activity_form Add consent fields privacy.activity form Inherits privacy.activity_form
consent_form Privacy Consent Form privacy.consent form New
consent_list Privacy Consent List privacy.consent list New
consent_search Privacy Consent Search privacy.consent search New
form Consent response processed ir.ui.view qweb New
view_partner_form Add consent smart button res.partner form Inherits base.view_partner_form
HTTP endpoints (1)
Route(s)HandlerAuthTypeMethodsFlags
/privacy/consent/<any(accept,reject):choice>/<int:consent_id>/<token> ConsentController.consent public http ALL sudo website
Models touched (5)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (8)
  • consent_count Integer
    compute='_compute_consent_count' string='Consents count'
  • consent_ids One2many → privacy.consent
    comodel_name='privacy.consent' inverse_name='activity_id' string='Consents'
  • consent_required Selection
    help='Enable if you need to track any kind of consent from the affected subjects' selection=[('auto', 'Automatically'), ('manual', 'Manually')] string='Ask subjects for consent'
  • consent_template_default_body_html Text
    compute='_compute_consent_template_defaults'
  • consent_template_default_subject Char
    compute='_compute_consent_template_defaults'
  • consent_template_id Many2one → mail.template
    comodel_name='mail.template' default=<expr> domain=[('model', '=', 'privacy.consent')] help='Email to be sent to subjects to ask for consent. A good template should include details about the current consent request status, how to change it, and where to get more information.' string='Email template'
  • default_consent Boolean
    help='Should we assume the subject has accepted if we receive no response?' string='Accepted by default'
  • server_action_id Many2one → ir.actions.server
    comodel_name='ir.actions.server' domain=[('model_id.model', '=', 'privacy.consent')] help='Run this action when a new consent request is created or its acceptance status is updated.' string='Server action'
Public methods (1)
  • action_new_consents(self)
    Generate new consent requests.

New fields (6)
  • accepted Boolean
    help="Indicates current acceptance status, which can come from subject's last answer, or from the default specified in the related data processing activity." tracking=True
  • active Boolean
    default=True index=True
  • activity_id Many2one → privacy.activity
    comodel_name='privacy.activity' required=True string='Activity' tracking=True
  • last_metadata Text
    help='Metadata from the last acceptance or rejection by the subject' tracking=True
  • partner_id Many2one → res.partner
    comodel_name='res.partner' help='Subject asked for consent.' required=True string='Subject' tracking=True
  • state Selection
    default='draft' required=True selection=[('draft', 'Draft'), ('sent', 'Awaiting response'), ('answered', 'Answered')] tracking=True
Public methods (5)
  • action_answer(self, answer, metadata=False)
    Process answer. :param bool answer: Did the subject accept? :param str metadata: Metadata from last user acceptance or rejection request.
  • action_auto_ask(self)
    Automatically ask for consent.
  • action_manual_ask(self)
    Let user manually ask for consent.
  • create(self, vals_list)
    @api.model_create_multi
    Run server action on create.
  • write(self, vals)
    Run server action on update.

New fields (2)
  • privacy_consent_count Integer
    compute='_compute_privacy_consent_count' help='Privacy consent requests amount' string='Consents'
  • privacy_consent_ids One2many → privacy.consent
    comodel_name='privacy.consent' inverse_name='partner_id' string='Privacy consents'
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Status
Open migration PR — not merged yet for this version
CI status
checks failing
Open since
17 days ago
Last activity
17 days ago
Repository
OCA/data-protection
Pull request
[19.0][MIG] privacy_consent: Migration to 19.0 (#97)