Browse Source

[UPD] UPD activity model and views

12.0-personal_privacy_activity
default 3 years ago
committed by Nicolas JEUDY
parent
commit
44703c417b
  1. 42
      privacy_personal_data/__manifest__.py
  2. 354
      privacy_personal_data/i18n/fr.po
  3. 83
      privacy_personal_data/models/privacy_activity.py
  4. 65
      privacy_personal_data/models/privacy_personal_data.py
  5. 82
      privacy_personal_data/views/privacy_activity_view.xml

42
privacy_personal_data/__manifest__.py

@ -1,27 +1,27 @@
# Copyright 2019 Myceliandre - Nicolas JEUDY
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
'name': 'Private Personal Data details',
'version': '12.0.1.0.0',
'category': 'Data Protection',
'summary': 'Provides private data details on privacy activity ',
'author': "Nicolas JEUDY, "
"Odoo Community Association (OCA)",
'website': 'http://www.github.com/OCA/data-protection',
'license': 'AGPL-3',
'data': [
'security/ir.model.access.csv',
'views/privacy_activity_view.xml',
'views/privacy_personal_data_view.xml',
'views/privacy_personal_category_view.xml',
'views/privacy_objective_view.xml',
'views/res_partner_view.xml',
"name": "Private Personal Data details",
"version": "12.0.1.0.0",
"category": "Data Protection",
"summary": "Provides private data details on privacy activity ",
"author": "Nicolas JEUDY, " "Odoo Community Association (OCA)",
"website": "http://www.github.com/OCA/data-protection",
"license": "AGPL-3",
"data": [
"security/ir.model.access.csv",
"views/privacy_activity_view.xml",
"views/privacy_personal_data_view.xml",
"views/privacy_personal_category_view.xml",
"views/privacy_objective_view.xml",
"views/res_partner_view.xml",
],
'demo': [
"demo": [],
"depends": [
"mail",
"privacy",
"hr",
],
'depends': [
'mail', 'privacy',
],
'installable': True,
'application': False,
"installable": True,
"application": False,
}

354
privacy_personal_data/i18n/fr.po

@ -0,0 +1,354 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * privacy_personal_data
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-03-03 10:46+0000\n"
"PO-Revision-Date: 2022-03-03 10:46+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: privacy_personal_data
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_objective__active
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_personal_data__active
msgid "Active"
msgstr "Actif"
#. module: privacy_personal_data
#: model:ir.model.fields,help:privacy_personal_data.field_privacy_activity__define_objective
msgid "Add detailed objectif from a custom list."
msgstr "Ajouter des finalités depuis une liste pré-établie"
#. module: privacy_personal_data
#: model_terms:ir.ui.view,arch_db:privacy_personal_data.personal_category_search
#: model_terms:ir.ui.view,arch_db:privacy_personal_data.personal_data_search
msgid "Archived"
msgstr "Archivé"
#. module: privacy_personal_data
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_personal_data__categ_id
#: model:ir.ui.menu,name:privacy_personal_data.menu_privacy_personal_category
#: model_terms:ir.ui.view,arch_db:privacy_personal_data.activity_form_inherit_personal_data
msgid "Category"
msgstr "Catégorie"
#. module: privacy_personal_data
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_personal_category__child_id
msgid "Child Categories"
msgstr "Catégories enfant"
#. module: privacy_personal_data
#: model_terms:ir.actions.act_window,help:privacy_personal_data.personal_category_action
msgid "Click to add a personal data category."
msgstr "Cliquer pour ajouter une catégorie de \"donnée personnelle\""
#. module: privacy_personal_data
#: model_terms:ir.actions.act_window,help:privacy_personal_data.personal_data_action
msgid "Click to add a personal data details."
msgstr "Cliquer pour ajouter le détail sur une donnée personnelle"
#. module: privacy_personal_data
#: model_terms:ir.actions.act_window,help:privacy_personal_data.privacy_objective_action
msgid "Click to add a privacy objective."
msgstr "Cliquez pour ajouter une finalité"
#. module: privacy_personal_data
#: selection:privacy.personal.category,type:0
msgid "Common"
msgstr "Courant"
#. module: privacy_personal_data
#: model_terms:ir.ui.view,arch_db:privacy_personal_data.activity_form_inherit_personal_data
msgid "Compagnie"
msgstr ""
#. module: privacy_personal_data
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_activity__company_id
msgid "Company"
msgstr "Société"
#. module: privacy_personal_data
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_personal_category__complete_name
msgid "Complete Name"
msgstr "Nom Complet"
#. module: privacy_personal_data
#: model:ir.model,name:privacy_personal_data.model_res_partner
msgid "Contact"
msgstr ""
#. module: privacy_personal_data
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_activity__controller_ids
msgid "Controllers"
msgstr "Co-responsables"
#. module: privacy_personal_data
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_legal__create_uid
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_objective__create_uid
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_personal_category__create_uid
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_personal_data__create_uid
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_subject_category__create_uid
msgid "Created by"
msgstr "Créé par"
#. module: privacy_personal_data
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_legal__create_date
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_objective__create_date
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_personal_category__create_date
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_personal_data__create_date
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_subject_category__create_date
msgid "Created on"
msgstr "Créé le"
#. module: privacy_personal_data
#: model:ir.model.fields,help:privacy_personal_data.field_privacy_personal_data__description
msgid "Data list used in activity"
msgstr "Liste des données utilisées dans ce traitement"
#. module: privacy_personal_data
#: model:ir.model,name:privacy_personal_data.model_privacy_activity
msgid "Data processing activities"
msgstr "Traitements de données"
#. module: privacy_personal_data
#: model_terms:ir.ui.view,arch_db:privacy_personal_data.activity_form_inherit_personal_data
msgid "Define Objective(s)"
msgstr "Définir les finalités"
#. module: privacy_personal_data
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_activity__define_objective
msgid "Define objective"
msgstr "Définir les finalités"
#. module: privacy_personal_data
#: model_terms:ir.ui.view,arch_db:privacy_personal_data.activity_form_inherit_personal_data
msgid "Definir support et lieu de stockage"
msgstr ""
#. module: privacy_personal_data
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_objective__description
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_personal_category__description
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_personal_data__description
#: model_terms:ir.ui.view,arch_db:privacy_personal_data.personal_category_form
#: model_terms:ir.ui.view,arch_db:privacy_personal_data.personal_data_form
msgid "Description"
msgstr ""
#. module: privacy_personal_data
#: model_terms:ir.ui.view,arch_db:privacy_personal_data.activity_form_inherit_personal_data
msgid "Destinataires"
msgstr ""
#. module: privacy_personal_data
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_activity__objective_ids
#: model_terms:ir.ui.view,arch_db:privacy_personal_data.personal_category_form
#: model_terms:ir.ui.view,arch_db:privacy_personal_data.personal_data_form
msgid "Details"
msgstr "Détails"
#. module: privacy_personal_data
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_legal__display_name
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_objective__display_name
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_personal_category__display_name
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_personal_data__display_name
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_subject_category__display_name
msgid "Display Name"
msgstr "Nom affiché"
#. module: privacy_personal_data
#: model_terms:ir.ui.view,arch_db:privacy_personal_data.activity_form_inherit_personal_data
msgid "Droits à la personne"
msgstr ""
#. module: privacy_personal_data
#: model_terms:ir.ui.view,arch_db:privacy_personal_data.activity_form_inherit_personal_data
msgid "Délai d'éffacement"
msgstr ""
#. module: privacy_personal_data
#: model:ir.model.fields,help:privacy_personal_data.field_privacy_personal_category__description
msgid "Give more example, explanation of personal data"
msgstr "Donner plus d'exemple, d'explication sur les données personnelles"
#. module: privacy_personal_data
#: model_terms:ir.ui.view,arch_db:privacy_personal_data.personal_category_search
msgid "Group By"
msgstr "Regrouper par"
#. module: privacy_personal_data
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_activity__has_sensitive
msgid "Has Sensitive"
msgstr "Contient des données sensibles"
#. module: privacy_personal_data
#: selection:privacy.personal.category,type:0
msgid "High Risk"
msgstr "À risque"
#. module: privacy_personal_data
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_legal__id
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_objective__id
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_personal_category__id
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_personal_data__id
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_subject_category__id
msgid "ID"
msgstr ""
#. module: privacy_personal_data
#: model:ir.model.fields,field_description:privacy_personal_data.field_res_partner__internal
#: model:ir.model.fields,field_description:privacy_personal_data.field_res_users__internal
msgid "Internal"
msgstr ""
#. module: privacy_personal_data
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_legal____last_update
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_objective____last_update
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_personal_category____last_update
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_personal_data____last_update
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_subject_category____last_update
msgid "Last Modified on"
msgstr "Dernière modification le"
#. module: privacy_personal_data
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_legal__write_uid
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_objective__write_uid
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_personal_category__write_uid
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_personal_data__write_uid
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_subject_category__write_uid
msgid "Last Updated by"
msgstr "Dernière mise à jour par"
#. module: privacy_personal_data
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_legal__write_date
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_objective__write_date
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_personal_category__write_date
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_personal_data__write_date
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_subject_category__write_date
msgid "Last Updated on"
msgstr "Dernière mise à jour le"
#. module: privacy_personal_data
#: model:ir.model,name:privacy_personal_data.model_privacy_legal
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_activity__legal_ids
#: model_terms:ir.ui.view,arch_db:privacy_personal_data.activity_form_inherit_personal_data
msgid "Legal"
msgstr "Lécéité"
#. module: privacy_personal_data
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_legal__name
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_objective__name
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_personal_category__name
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_personal_data__name
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_subject_category__name
msgid "Name"
msgstr "Nom"
#. module: privacy_personal_data
#: model:ir.ui.menu,name:privacy_personal_data.menu_privacy_objective
#: model:ir.ui.menu,name:privacy_personal_data.menu_privacy_objective_model
msgid "Objective"
msgstr "Finalité"
#. module: privacy_personal_data
#: model:ir.model,name:privacy_personal_data.model_privacy_objective
msgid "Objective database"
msgstr "Liste des finalités"
#. module: privacy_personal_data
#: model_terms:ir.ui.view,arch_db:privacy_personal_data.personal_category_search
msgid "Parent"
msgstr ""
#. module: privacy_personal_data
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_personal_category__parent_id
msgid "Parent Category"
msgstr "Catégorie mère"
#. module: privacy_personal_data
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_personal_category__parent_path
msgid "Parent Path"
msgstr "Chemin parent"
#. module: privacy_personal_data
#: model:ir.actions.act_window,name:privacy_personal_data.personal_data_action
#: model:ir.model,name:privacy_personal_data.model_privacy_personal_data
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_activity__personal_data_ids
#: model:ir.ui.menu,name:privacy_personal_data.menu_privacy_personal_data
#: model:ir.ui.menu,name:privacy_personal_data.menu_privacy_personal_data_model
msgid "Personal Data"
msgstr "Données personnelles"
#. module: privacy_personal_data
#: model:ir.actions.act_window,name:privacy_personal_data.personal_category_action
msgid "Personal Data Category"
msgstr "Catégorie de donnée personnelle"
#. module: privacy_personal_data
#: model:ir.model,name:privacy_personal_data.model_privacy_personal_category
msgid "Personal Data category"
msgstr "Catégorie de donnée personnelle"
#. module: privacy_personal_data
#: model_terms:ir.ui.view,arch_db:privacy_personal_data.rgpd_form_inherit_view_partner_form
msgid "Privacy"
msgstr "Confidentialité"
#. module: privacy_personal_data
#: model:ir.actions.act_window,name:privacy_personal_data.privacy_objective_action
msgid "Privacy Objective"
msgstr "Finalité"
#. module: privacy_personal_data
#: selection:privacy.personal.category,type:0
msgid "Sensitive"
msgstr "Sensible"
#. module: privacy_personal_data
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_activity__subjects_categ_ids
msgid "Subjects Categ"
msgstr "Type de personne"
#. module: privacy_personal_data
#: model:ir.model,name:privacy_personal_data.model_privacy_subject_category
msgid "Subjects category"
msgstr "Type de personne"
#. module: privacy_personal_data
#: model_terms:ir.ui.view,arch_db:privacy_personal_data.activity_form_inherit_personal_data
msgid "This activity has sensitive data."
msgstr "Ce traitement contient des données sensibles"
#. module: privacy_personal_data
#: model_terms:ir.ui.view,arch_db:privacy_personal_data.activity_form_inherit_personal_data
msgid "Tracked data"
msgstr "Données traitées"
#. module: privacy_personal_data
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_personal_category__type
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_personal_data__type
msgid "Type"
msgstr ""
#. module: privacy_personal_data
#: model:ir.model.fields,field_description:privacy_personal_data.field_privacy_activity__value
msgid "Value"
msgstr "Valeur"
#. module: privacy_personal_data
#: code:addons/privacy_personal_data/models/privacy_personal_data.py:45
#, python-format
msgid "You cannot create recursive categories."
msgstr ""
#. module: privacy_personal_data
#: model_terms:ir.ui.view,arch_db:privacy_personal_data.activity_form_inherit_personal_data
msgid "destinataires"
msgstr ""

83
privacy_personal_data/models/privacy_activity.py

@ -8,32 +8,41 @@ class PersonalDataCategory(models.Model):
_name = "privacy.subject.category"
_description = "Subjects category"
name = fields.Char('Name', index=True, required=True, translate=True)
name = fields.Char("Name", index=True, required=True, translate=True)
class PersonalDataLegal(models.Model):
_name = "privacy.legal"
_description = "Legal"
name = fields.Char('Name', index=True, required=True, translate=True)
name = fields.Char("Name", index=True, required=True, translate=True)
class ComputingSystem(models.Model):
_name = "privacy.computing_system"
_description = "Computing System"
name = fields.Char("Name", index=True, required=True, translate=True)
class PrivacyActivity(models.Model):
_inherit = 'privacy.activity'
_inherit = "privacy.activity"
def _default_company(self):
return self.env['res.company']._company_default_get('privacy.activity')
return self.env["res.company"]._company_default_get("privacy.activity")
@api.multi
def _compute_has_sensitive(self):
for record in self:
record.has_sensitive = 'sensitive' in record.personal_data_ids.mapped('type')
record.has_sensitive = "sensitive" in record.personal_data_ids.mapped(
"type"
)
value = fields.Boolean(compute='_get_value')
personal_data_ids = fields.Many2many('privacy.personal.data')
subjects_categ_ids = fields.Many2many('privacy.subject.category')
has_sensitive = fields.Boolean(compute='_compute_has_sensitive')
legal_ids = fields.Many2many('privacy.legal')
value = fields.Boolean(compute="_get_value")
personal_data_ids = fields.Many2many("privacy.personal.data")
subjects_categ_ids = fields.Many2many("privacy.subject.category")
has_sensitive = fields.Boolean(compute="_compute_has_sensitive")
legal_ids = fields.Many2many("privacy.legal")
controller_ids = fields.Many2many(
"res.partner",
"privacy_activity_res_partner_controler_ids",
@ -43,17 +52,63 @@ class PrivacyActivity(models.Model):
"Define objective",
help="Add detailed objectif from a custom list.",
)
objective_ids = fields.Many2many('privacy.objective', string="Details")
company_id = fields.Many2one('res.company', 'Company', index=True, default=_default_company)
objective_ids = fields.Many2many("privacy.objective", string="Details")
company_id = fields.Many2one(
"res.company", "Company", index=True, default=_default_company
)
define_medium = fields.Boolean("Define Medium")
recipient_ids = fields.Many2many("res.partner", string="Recipients")
contract_duration = fields.Boolean("Contract Duration")
erase_type = fields.Selection(
[("legal", "Legal"), ("internal", "Internal")], string="Erase Type"
)
hr_department_ids = fields.Many2many("hr.department", string="Hr Department")
legal_erase = fields.Integer("Legal Erase (month)")
keep_for_life = fields.Integer("Keep for life")
legal_erase_year = fields.Float("Nb Year")
medium_ids = fields.One2many(
"privacy.storage_medium", "privacy_activity_id", string="Support and storage"
)
person_right = fields.Html("Right to the person")
priority = fields.Selection(
[
("0", "Low"),
("1", "Normal"),
("2", "High"),
("3", "Very High"),
],
string="priority",
)
ref = fields.Char("Reference")
risk_value = fields.Selection(
[
("yes", "Yes"),
("no", "No"),
("recommended", "Recommended"),
("not_retained", "Not Retained"),
],
string="Risk Value",
)
class PrivacyObjective(models.Model):
_name = "privacy.objective"
_description = "Objective database"
name = fields.Char('Name', index=True, required=True, translate=True)
description = fields.Html('Description')
name = fields.Char("Name", index=True, required=True, translate=True)
description = fields.Html("Description")
active = fields.Boolean(
default=True,
index=True,
)
class StorageMedium(models.Model):
_name = "privacy.storage_medium"
_description = "Storage Medium"
name = fields.Char("Name", index=True, required=True, translate=True)
computing_system_id = fields.Many2one(
"privacy.computing_system", string="Computing System"
)
privacy_activity_id = fields.Many2one("privacy.activity", string="Privacy Activity")

65
privacy_personal_data/models/privacy_personal_data.py

@ -9,45 +9,50 @@ class PersonalDataCategory(models.Model):
_description = "Personal Data category"
_parent_name = "parent_id"
_parent_store = True
_rec_name = 'complete_name'
_order = 'complete_name'
_rec_name = "complete_name"
_order = "complete_name"
name = fields.Char('Name', index=True, required=True, translate=True)
name = fields.Char("Name", index=True, required=True, translate=True)
description = fields.Html(
translate=True,
help="Give more example, explanation of personal data"
translate=True, help="Give more example, explanation of personal data"
)
complete_name = fields.Char(
'Complete Name', compute='_compute_complete_name',
store=True)
parent_id = fields.Many2one('privacy.personal.category', 'Parent Category', index=True, ondelete='cascade')
"Complete Name", compute="_compute_complete_name", store=True
)
parent_id = fields.Many2one(
"privacy.personal.category", "Parent Category", index=True, ondelete="cascade"
)
parent_path = fields.Char(index=True)
type = fields.Selection([
('common', 'Common'),
('risk', 'High Risk'),
('sensitive', 'Sensitive')],
string='Type',
default='common',
required=True,)
child_id = fields.One2many('privacy.personal.category', 'parent_id', 'Child Categories')
type = fields.Selection(
[("common", "Common"), ("risk", "High Risk"), ("sensitive", "Sensitive")],
string="Type",
default="common",
required=True,
)
child_id = fields.One2many(
"privacy.personal.category", "parent_id", "Child Categories"
)
@api.depends('name', 'parent_id.complete_name')
@api.depends("name", "parent_id.complete_name")
def _compute_complete_name(self):
for category in self:
if category.parent_id:
category.complete_name = '%s / %s' % (category.parent_id.complete_name, category.name)
category.complete_name = "%s / %s" % (
category.parent_id.complete_name,
category.name,
)
else:
category.complete_name = category.name
@api.constrains('parent_id')
@api.constrains("parent_id")
def _check_category_recursion(self):
if not self._check_recursion():
raise ValidationError(_('You cannot create recursive categories.'))
raise ValidationError(_("You cannot create recursive categories."))
return True
@api.model
def name_create(self, name):
return self.create({'name': name}).name_get()[0]
return self.create({"name": name}).name_get()[0]
class PersonalData(models.Model):
@ -63,12 +68,16 @@ class PersonalData(models.Model):
required=True,
translate=True,
)
description = fields.Html(
translate=True,
help="Data list used in activity"
)
description = fields.Html(translate=True, help="Data list used in activity")
categ_id = fields.Many2one('privacy.personal.category',
categ_id = fields.Many2one(
"privacy.personal.category",
string="Category",
domain=[('child_id', '=', False)])
type = fields.Selection(related="categ_id.type",)
domain=[("child_id", "=", False)],
)
type = fields.Selection(
related="categ_id.type",
)
data_month_before_erasing = fields.Integer("Erasing delay (month)")
legal_erasing = fields.Integer("Legal Erasing (month)")

82
privacy_personal_data/views/privacy_activity_view.xml

@ -13,28 +13,84 @@
<field name="personal_data_ids" nolabel="1"/>
</xpath>
<field name="controller_id" position="after">
<field name="company_id" string="Compagnie" groups="base.group_multi_company" options="{'no_create': True}"/>
</field>
<xpath expr="//group[@name='subjects']" position="after">
<separator name="erase" string="Délai d'éffacement"/>
<group colspan="4">
<group>
<field name="legal_erase"/>
<field name="legal_erase_year"/>
</group>
<group>
<field name="erase_type"/>
<field name="contract_duration"/>
<field name="keep_for_life"/>
</group>
</group>
</xpath>
<xpath expr="//group[@name='basic']" position="before">
<h2><field name="ref" readonly="1"/></h2>
<field name="priority" widget="priority"/>
</xpath>
<xpath expr="//group[@name='basic']" position="after">
<group>
<field name="hr_department_ids" widget="many2many_tags" colspan="4"/>
</group>
<group name="controller_details" colspan="4">
<field name="controller_ids"/>
</group>
<group name="objective_details" colspan="4">
<field name="define_objective" string="Define Objective(s)"/>
<field name="objective_ids" attrs='{"invisible": [("define_objective", "=", False)]}'>
<field name="objective_ids" attrs="{&quot;invisible&quot;: [(&quot;define_objective&quot;, &quot;=&quot;, False)]}">
<tree name="objective">
<field name="name"/>
<field name="description"/>
</tree>
</field>
</group>
<group name="medium_storage" colspan="4">
<field name="define_medium" string="Definir support et lieu de stockage"/>
<field name="medium_ids" attrs="{&quot;invisible&quot;: [(&quot;define_medium&quot;, &quot;=&quot;, False)]}" context="{'default_privacy_activity_id': active_id}" >
<tree name="medium" editable="bottom">
<field name="computing_system_id"/>
<field name="name"/>
<field name="privacy_activity_id" invisible="1"/>
</tree>
</field>
</group>
</xpath>
<xpath expr="//group[@name='subjects']" position="after">
<field name="has_sensitive" invisible="1"/>
<group colspan="4" attrs='{"invisible": [("has_sensitive", "=", False)]}'>
<group colspan="4" attrs="{&quot;invisible&quot;: [(&quot;has_sensitive&quot;, &quot;=&quot;, False)]}">
<div class="alert alert-warning" role="alert" style="margin-bottom:0px;">
This activity has sensitive data.
</div>
</group>
<group>
<field name="risk_value" attrs="{&quot;invisible&quot;: [(&quot;has_sensitive&quot;, &quot;=&quot;, False)]}"/>
</group>
</xpath>
<xpath expr="//group[@name='processors']" position="after">
<separator name="destinataires" string="Destinataires"/>
<group name="Destinataires">
<field name="recipient_ids" widget="many2many">
<tree string="Recipients">
<field name="name"/>
<field name="email"/>
<field name="phone"/>
<field name="mobile"/>
</tree>
</field>
</group>
<separator name="right" string="Right to the person"/>
<group>
<field name="person_right" nolabel="true"/>
</group>
</xpath>
<!--<xpath expr="//tree[@name='processors']/field[@name='country_id']" position="after">
<field name="internal"/>
@ -42,4 +98,26 @@
</field>
</record>
<record model="ir.ui.view" id="activity_tree_inherit_personal_data">
<field name="name">Privacy Activity Tree Personal Data</field>
<field name="model">privacy.activity</field>
<field name="inherit_id" ref="privacy.activity_tree"/>
<field name="arch" type="xml">
<xpath expr="//tree" position="attributes">
<attribute name="decoration-danger">has_sensitive == True</attribute>
</xpath>
<field name="processor_ids" position="replace">
<field name="objective_ids" widget="many2many_tags"/>
<field name="has_sensitive" invisible="1"/>
<field name="risk_value"/>
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
</field>
<field name="name" position="before">
<field name="ref"/>
<field name="priority" widget="priority"/>
</field>
</field>
</record>
</data>
Loading…
Cancel
Save