Jairo Llopis
6 years ago
committed by
mreficent
12 changed files with 417 additions and 9 deletions
-
2privacy/__init__.py
-
9privacy/__manifest__.py
-
10privacy/demo/res_users.xml
-
201privacy/i18n/es.po
-
1privacy/models/__init__.py
-
52privacy/models/privacy_activity.py
-
2privacy/readme/CONFIGURATION.rst
-
9privacy/readme/USAGE.rst
-
4privacy/security/data_protection.xml
-
3privacy/security/ir.model.access.csv
-
6privacy/views/data_protection_menu_view.xml
-
127privacy/views/privacy_activity_view.xml
@ -1 +1 @@ |
|||
# Empty |
|||
from . import models |
@ -0,0 +1,10 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<!-- Copyright 2018 Tecnativa - Jairo Llopis |
|||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> |
|||
<data> |
|||
|
|||
<record id="base.user_demo" model="res.users"> |
|||
<field name="groups_id" eval="[(4, ref('group_data_protection_user'))]"/> |
|||
</record> |
|||
|
|||
</data> |
@ -0,0 +1,201 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * privacy |
|||
# |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 10.0\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2018-07-11 08:39+0000\n" |
|||
"PO-Revision-Date: 2018-07-11 10:46+0200\n" |
|||
"Language-Team: \n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: 8bit\n" |
|||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
|||
"X-Generator: Poedit 2.0.8\n" |
|||
"Last-Translator: Jairo Llopis <yajo.sk8@gmail.com>\n" |
|||
"Language: es_ES\n" |
|||
|
|||
#. module: privacy |
|||
#: model:ir.model.fields,field_description:privacy.field_privacy_activity_active |
|||
msgid "Active" |
|||
msgstr "Activa" |
|||
|
|||
#. module: privacy |
|||
#: model:ir.actions.act_window,name:privacy.activity_action |
|||
#: model:ir.ui.menu,name:privacy.menu_privacy_activity |
|||
msgid "Activities" |
|||
msgstr "Actividades" |
|||
|
|||
#. module: privacy |
|||
#: model:ir.ui.view,arch_db:privacy.activity_search |
|||
msgid "Archived" |
|||
msgstr "Archivada" |
|||
|
|||
#. module: privacy |
|||
#: model:ir.model.fields,help:privacy.field_privacy_activity_subject_find |
|||
msgid "Are affected subjects present in this database?" |
|||
msgstr "¿Los sujetos interesados se encuentran en esta base de datos?" |
|||
|
|||
#. module: privacy |
|||
#: model:ir.actions.act_window,help:privacy.activity_action |
|||
msgid "Click to add a data processing activity." |
|||
msgstr "Pulse para añadir una actividad de tratamiento de datos." |
|||
|
|||
#. module: privacy |
|||
#: model:ir.model.fields,field_description:privacy.field_privacy_activity_controller_id |
|||
#: model:ir.ui.view,arch_db:privacy.activity_search |
|||
msgid "Controller" |
|||
msgstr "Responsable" |
|||
|
|||
#. module: privacy |
|||
#: model:ir.model.fields,field_description:privacy.field_privacy_activity_create_uid |
|||
msgid "Created by" |
|||
msgstr "Creado por" |
|||
|
|||
#. module: privacy |
|||
#: model:ir.model.fields,field_description:privacy.field_privacy_activity_create_date |
|||
msgid "Created on" |
|||
msgstr "Creado el" |
|||
|
|||
#. module: privacy |
|||
#: model:ir.module.category,name:privacy.module_category_data_protection |
|||
msgid "Data Protection" |
|||
msgstr "Protección de datos" |
|||
|
|||
#. module: privacy |
|||
#: model:res.groups,name:privacy.group_data_protection_manager |
|||
msgid "Data Protection Manager" |
|||
msgstr "Gestor de protección de datos" |
|||
|
|||
#. module: privacy |
|||
#: model:res.groups,name:privacy.group_data_protection_user |
|||
msgid "Data Protection User" |
|||
msgstr "Usuario de protección de datos" |
|||
|
|||
#. module: privacy |
|||
#: model:ir.model,name:privacy.model_privacy_activity |
|||
msgid "Data processing activities" |
|||
msgstr "Actividades de tratamiento de datos" |
|||
|
|||
#. module: privacy |
|||
#: model:ir.actions.act_window,help:privacy.activity_action |
|||
msgid "" |
|||
"Data processing activities define why, how and what you do\n" |
|||
" with subjects' personal data." |
|||
msgstr "" |
|||
"Las actividades de tratamiento definen por qué, cómo y qué se hace\n" |
|||
"\t\tcon los datos personales de los interesados." |
|||
|
|||
#. module: privacy |
|||
#: model:ir.model.fields,field_description:privacy.field_privacy_activity_subject_find |
|||
msgid "Define subjects" |
|||
msgstr "Definir interesados" |
|||
|
|||
#. module: privacy |
|||
#: model:ir.model.fields,field_description:privacy.field_privacy_activity_description |
|||
#: model:ir.ui.view,arch_db:privacy.activity_form |
|||
msgid "Description" |
|||
msgstr "Descripción" |
|||
|
|||
#. module: privacy |
|||
#: model:ir.ui.view,arch_db:privacy.activity_form |
|||
msgid "Details" |
|||
msgstr "Detalles" |
|||
|
|||
#. module: privacy |
|||
#: model:ir.model.fields,field_description:privacy.field_privacy_activity_display_name |
|||
msgid "Display Name" |
|||
msgstr "Nombre a mostrar" |
|||
|
|||
#. module: privacy |
|||
#: model:ir.ui.view,arch_db:privacy.activity_search |
|||
msgid "Group By" |
|||
msgstr "Agrupar por" |
|||
|
|||
#. module: privacy |
|||
#: model:ir.model.fields,help:privacy.field_privacy_activity_description |
|||
msgid "How is personal data used here? Why? Etc." |
|||
msgstr "¿Cómo se usan los datos personales aquí? ¿Por qué? Etc." |
|||
|
|||
#. module: privacy |
|||
#: model:ir.model.fields,field_description:privacy.field_privacy_activity_id |
|||
msgid "ID" |
|||
msgstr "ID" |
|||
|
|||
#. module: privacy |
|||
#: model:ir.model.fields,field_description:privacy.field_privacy_activity___last_update |
|||
msgid "Last Modified on" |
|||
msgstr "Última modificación en" |
|||
|
|||
#. module: privacy |
|||
#: model:ir.model.fields,field_description:privacy.field_privacy_activity_write_uid |
|||
msgid "Last Updated by" |
|||
msgstr "Última actualización por" |
|||
|
|||
#. module: privacy |
|||
#: model:ir.model.fields,field_description:privacy.field_privacy_activity_write_date |
|||
msgid "Last Updated on" |
|||
msgstr "Última actualización el" |
|||
|
|||
#. module: privacy |
|||
#: model:ir.ui.menu,name:privacy.menu_data_protection_master_data |
|||
msgid "Master Data" |
|||
msgstr "Datos maestros" |
|||
|
|||
#. module: privacy |
|||
#: model:ir.model.fields,field_description:privacy.field_privacy_activity_name |
|||
msgid "Name" |
|||
msgstr "Nombre" |
|||
|
|||
#. module: privacy |
|||
#: model:ir.actions.act_window,name:privacy.action_data_protection_partner_form |
|||
#: model:ir.ui.menu,name:privacy.menu_data_protection_partner |
|||
msgid "Partners" |
|||
msgstr "Contactos" |
|||
|
|||
#. module: privacy |
|||
#: model:ir.ui.menu,name:privacy.parent_menu_data_protection |
|||
msgid "Privacy" |
|||
msgstr "Privacidad" |
|||
|
|||
#. module: privacy |
|||
#: model:ir.model.fields,field_description:privacy.field_privacy_activity_processor_ids |
|||
msgid "Processors" |
|||
msgstr "Encargados del tratamiento" |
|||
|
|||
#. module: privacy |
|||
#: model:ir.ui.menu,name:privacy.menu_data_protection_report |
|||
msgid "Reports" |
|||
msgstr "Informes" |
|||
|
|||
#. module: privacy |
|||
#: model:ir.model.fields,help:privacy.field_privacy_activity_subject_domain |
|||
msgid "Selection filter to find specific subjects included." |
|||
msgstr "Filtro de selección para encontrar los interesados específicos incluidos." |
|||
|
|||
#. module: privacy |
|||
#: model:ir.ui.menu,name:privacy.menu_data_protection_setting |
|||
msgid "Settings" |
|||
msgstr "Configuración" |
|||
|
|||
#. module: privacy |
|||
#: model:ir.model.fields,field_description:privacy.field_privacy_activity_subject_domain |
|||
msgid "Subjects filter" |
|||
msgstr "Filtro de interesados" |
|||
|
|||
#. module: privacy |
|||
#: model:ir.ui.menu,name:privacy.menu_data_protection_transaction |
|||
msgid "Transactions" |
|||
msgstr "Transacciones" |
|||
|
|||
#. module: privacy |
|||
#: model:ir.model.fields,help:privacy.field_privacy_activity_controller_id |
|||
msgid "Whoever determines the purposes and means of the processing of personal data." |
|||
msgstr "Quien determina los propósitos y medios del procesamiento de datos personales." |
|||
|
|||
#. module: privacy |
|||
#: model:ir.model.fields,help:privacy.field_privacy_activity_processor_ids |
|||
msgid "Whoever processes personal data on behalf of the controller." |
|||
msgstr "Quien procesa los datos personales en nombre del responsable." |
@ -0,0 +1 @@ |
|||
from . import privacy_activity |
@ -0,0 +1,52 @@ |
|||
# Copyright 2018 Tecnativa - Jairo Llopis |
|||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
|||
|
|||
from odoo import api, fields, models |
|||
|
|||
|
|||
class PrivacyActivity(models.Model): |
|||
_name = "privacy.activity" |
|||
_description = "Data processing activities" |
|||
_inherit = "mail.thread" |
|||
|
|||
active = fields.Boolean( |
|||
default=True, |
|||
index=True, |
|||
) |
|||
name = fields.Char( |
|||
index=True, |
|||
required=True, |
|||
translate=True, |
|||
) |
|||
description = fields.Html( |
|||
translate=True, |
|||
help="How is personal data used here? Why? Etc." |
|||
) |
|||
controller_id = fields.Many2one( |
|||
"res.partner", |
|||
string="Controller", |
|||
required=True, |
|||
default=lambda self: self._default_controller_id(), |
|||
help="Whoever determines the purposes and means of the processing " |
|||
"of personal data.", |
|||
) |
|||
processor_ids = fields.Many2many( |
|||
"res.partner", |
|||
"privacy_activity_res_partner_processor_ids", |
|||
string="Processors", |
|||
help="Whoever processes personal data on behalf of the controller.", |
|||
) |
|||
subject_find = fields.Boolean( |
|||
"Define subjects", |
|||
help="Are affected subjects present in this database?", |
|||
) |
|||
subject_domain = fields.Char( |
|||
"Subjects filter", |
|||
default="[]", |
|||
help="Selection filter to find specific subjects included.", |
|||
) |
|||
|
|||
@api.model |
|||
def _default_controller_id(self): |
|||
"""By default it should be the current user's company.""" |
|||
return self.env.user.company_id |
@ -0,0 +1,2 @@ |
|||
In the "Privacy", open the "Settings" menu to find and enable |
|||
the main features available. |
@ -1,3 +1,6 @@ |
|||
#. Go to "Data Protection" Application |
|||
#. Go to Configuration > "Settings" menu |
|||
#. Enable the main features available. |
|||
To define data processing activities: |
|||
|
|||
#. Go to *Privacy > Master Data > Activities* and create one. |
|||
#. Define the data processing activity using the provided tools. |
|||
|
|||
Consult your lawyer! |
@ -0,0 +1,3 @@ |
|||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink |
|||
read,Permission to read activities,model_privacy_activity,group_data_protection_user,1,0,0,0 |
|||
write,Permission to write activities,model_privacy_activity,group_data_protection_manager,1,1,1,1 |
@ -0,0 +1,127 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<!-- Copyright 2018 Tecnativa - Jairo Llopis |
|||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> |
|||
<data> |
|||
|
|||
<record model="ir.ui.view" id="activity_form"> |
|||
<field name="name">Privacy Activity Form</field> |
|||
<field name="model">privacy.activity</field> |
|||
<field name="arch" type="xml"> |
|||
<form> |
|||
<header> |
|||
<!-- Placeholder for submodules --> |
|||
</header> |
|||
<sheet> |
|||
<div class="oe_button_box" name="button_box"> |
|||
<button |
|||
class="oe_stat_button" |
|||
icon="fa-archive" |
|||
name="toggle_active" |
|||
type="object" |
|||
> |
|||
<field |
|||
name="active" |
|||
options='{"terminology": "archive"}' |
|||
widget="boolean_button" |
|||
/> |
|||
</button> |
|||
</div> |
|||
<div class="oe_title"> |
|||
<label for="name" class="oe_edit_only"/> |
|||
<h1><field name="name"/></h1> |
|||
</div> |
|||
<group name="basic"> |
|||
<group name="owners"> |
|||
<field name="controller_id"/> |
|||
<field |
|||
name="processor_ids" |
|||
widget="many2many_tags" |
|||
/> |
|||
</group> |
|||
<group name="subjects"> |
|||
<field name="subject_find"/> |
|||
<field |
|||
name="subject_domain" |
|||
widget="char_domain" |
|||
options='{"model": "res.partner"}' |
|||
attrs='{"required": [("subject_find", "=", True)], |
|||
"invisible": [("subject_find", "=", False)]}' |
|||
/> |
|||
</group> |
|||
</group> |
|||
<notebook string="Details" name="advanced"> |
|||
<page string="Description"> |
|||
<group> |
|||
<field name="description" nolabel="1"/> |
|||
</group> |
|||
</page> |
|||
</notebook> |
|||
</sheet> |
|||
<div class="oe_chatter"> |
|||
<field name="message_follower_ids" widget="mail_followers"/> |
|||
<field name="message_ids" widget="mail_thread"/> |
|||
</div> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
<record model="ir.ui.view" id="activity_tree"> |
|||
<field name="name">Privacy Activity Tree</field> |
|||
<field name="model">privacy.activity</field> |
|||
<field name="arch" type="xml"> |
|||
<tree> |
|||
<field name="name"/> |
|||
<field name="controller_id"/> |
|||
<field name="processor_ids"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
<record model="ir.ui.view" id="activity_search"> |
|||
<field name="name">Privacy Activity Search</field> |
|||
<field name="model">privacy.activity</field> |
|||
<field name="arch" type="xml"> |
|||
<search> |
|||
<field name="name"/> |
|||
<field name="controller_id"/> |
|||
<field name="processor_ids"/> |
|||
<separator/> |
|||
<filter |
|||
string="Archived" |
|||
name="inactive" |
|||
domain="[('active', '=', False)]" |
|||
/> |
|||
<separator/> |
|||
<group string="Group By" name="groupby"> |
|||
<filter |
|||
name="controller_id_groupby" |
|||
string="Controller" |
|||
context="{'group_by': 'controller_id'}" |
|||
/> |
|||
</group> |
|||
</search> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="activity_action" model="ir.actions.act_window"> |
|||
<field name="name">Activities</field> |
|||
<field name="res_model">privacy.activity</field> |
|||
<field name="view_mode">tree,form</field> |
|||
<field name="help" type="html"> |
|||
<p class="oe_view_nocontent_create"> |
|||
Click to add a data processing activity. |
|||
</p><p> |
|||
Data processing activities define why, how and what you do |
|||
with subjects' personal data. |
|||
</p> |
|||
</field> |
|||
</record> |
|||
|
|||
<menuitem |
|||
action="activity_action" |
|||
groups="group_data_protection_user" |
|||
id="menu_privacy_activity" |
|||
parent="menu_data_protection_master_data" |
|||
/> |
|||
|
|||
</data> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue