=================
Privacy - Consent
=================

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

.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
    :target: https://odoo-community.org/page/development-status
    :alt: Production/Stable
.. |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%2Fdata--protection-lightgray.png?logo=github
    :target: https://github.com/OCA/data-protection/tree/16.0/privacy_consent
    :alt: OCA/data-protection
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
    :target: https://translation.odoo-community.org/projects/data-protection-16-0/data-protection-16-0-privacy_consent
    :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/data-protection&target_branch=16.0
    :alt: Try me on Runboat

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

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.

**Table of contents**

.. contents::
   :local:

Installation
============

You may want to install, along with this module, one of OCA's
``mail_tracking`` module collection, such as ``mail_tracking_mailgun``, so
you can provide more undeniable proof that some consent request was sent, and
to whom.

However, the most important proof to provide is the answer itself (more than
the question), and this addon provides enough tooling for that.

Multi-database instances
~~~~~~~~~~~~~~~~~~~~~~~~

To enable multi-database support, you must load this addon as a server-wide
addon. Example command to boot Odoo::

    odoo-bin --load=web,privacy_consent

Usage
=====

New options for data processing activities:

#. Go to *Privacy > Master Data > Activities* and create one.

#. Give it a name, such as *Sending mass mailings to customers*.

#. Go to tab *Consent* and choose one option in *Ask subjects for consent*:

   * *Manual* tells the activity that you will want to create and send the
     consent requests manually, and only provides some helpers for you to
     be able to batch-generate them.

   * *Automatic* enables this module's full power: send all consent requests
     to selected partners automatically, every day and under your demand.

#. When you do this, all the consent-related options appear. Configure them:

   * A smart button tells you how many consents have been generated, and lets you
     access them.

   * Choose one *Email template* to send to subjects. This email itself is what
     asks for consent, and it gets recorded, to serve as a proof that it was sent.
     The module provides a default template that should be good for most usage
     cases; and if you create one directly from that field, some good defaults
     are provided for your comfortability.

   * *Subjects filter* defines what partners will be elegible for inclusion in
     this data processing activity.

   * You can enable *Accepted by default* if you want to assume subjects
     accepted their data processing. You should possibly consult your
     lawyer to use this.

   * You can choose a *Server action* (developer mode only) that will
     be executed whenever a new non-draft consent request is created,
     or when its acceptance status changes.

     This module supplies a server action by default, called
     *Update partner's opt out*, that syncs the acceptance status with the
     partner's *Elegible for mass mailings* option.

#. Click on *Generate consent requests* link to create new consent requests.

   * If you chose *Manual* mode, all missing consent request are created as
     drafts, and nothing else is done now.

   * If you chose *Automatic* mode, also those request e-mails are enqueued
     and, when the mail queue is cleared, they will be set as *Sent*.

#. You will be presented with the list of just-created consent requests.
   See below.

New options for consent requests:

#. Access the consent requests by either:

   * Generating new consent requests from a data processing activity.

   * Pressing the *Consents* smart button in a data processing activity.

   * Going to *Privacy > Privacy > Consents*.

#. A consent will include the partner, the activity, the acceptance status,
   and the request state.

#. You can manually ask for consent by pressing the button labeled as
   *Ask for consent*.

#. All consent requests and responses are recorded in the mail thread below.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/data-protection/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/data-protection/issues/new?body=module:%20privacy_consent%0Aversion:%2016.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
~~~~~~~

* Tecnativa
* initOS GmbH

Contributors
~~~~~~~~~~~~

* `Tecnativa <https://www.tecnativa.com>`_:

  * Jairo Llopis

* `initOS GmbH <https://www.initos.com>`_:

  * Florian Kantelberg

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.

This module is part of the `OCA/data-protection <https://github.com/OCA/data-protection/tree/16.0/privacy_consent>`_ project on GitHub.

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