From f74459a745716adabb540ee333ac4315d4f3215f Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Mon, 14 Dec 2020 10:57:47 +0000 Subject: [PATCH] [IMP] privacy: pre-commit run --- privacy/__manifest__.py | 40 +++++----- privacy/demo/res_users.xml | 6 +- privacy/models/privacy_activity.py | 21 ++---- privacy/security/data_protection.xml | 25 ++++--- privacy/views/data_protection_menu_view.xml | 73 +++++++++--------- privacy/views/privacy_activity_view.xml | 82 ++++++++++----------- 6 files changed, 113 insertions(+), 134 deletions(-) diff --git a/privacy/__manifest__.py b/privacy/__manifest__.py index fd40790..2d1d24f 100644 --- a/privacy/__manifest__.py +++ b/privacy/__manifest__.py @@ -1,28 +1,22 @@ # Copyright 2018 Eficent Business and IT Consulting Services S.L. # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html { - 'name': 'Data Privacy and Protection', - 'version': '12.0.1.1.0', - 'category': 'Data Protection', - 'summary': 'Provides data privacy and protection features ' - 'to comply to regulations, such as GDPR.', - 'author': "Eficent, " - "Tecnativa, " - "Odoo Community Association (OCA)", - 'website': 'http://www.github.com/OCA/data-protection', - 'license': 'AGPL-3', - 'data': [ - 'security/data_protection.xml', - 'security/ir.model.access.csv', - 'views/data_protection_menu_view.xml', - 'views/privacy_activity_view.xml', + "name": "Data Privacy and Protection", + "version": "12.0.1.1.0", + "category": "Data Protection", + "summary": "Provides data privacy and protection features " + "to comply to regulations, such as GDPR.", + "author": "Eficent, " "Tecnativa, " "Odoo Community Association (OCA)", + "website": "http://www.github.com/OCA/data-protection", + "license": "AGPL-3", + "data": [ + "security/data_protection.xml", + "security/ir.model.access.csv", + "views/data_protection_menu_view.xml", + "views/privacy_activity_view.xml", ], - 'demo': [ - 'demo/res_users.xml', - ], - 'depends': [ - 'mail', - ], - 'installable': True, - 'application': True, + "demo": ["demo/res_users.xml"], + "depends": ["mail"], + "installable": True, + "application": True, } diff --git a/privacy/demo/res_users.xml b/privacy/demo/res_users.xml index 9977342..90843e7 100644 --- a/privacy/demo/res_users.xml +++ b/privacy/demo/res_users.xml @@ -1,10 +1,8 @@ - + - - + - diff --git a/privacy/models/privacy_activity.py b/privacy/models/privacy_activity.py index 04cdd59..48496e0 100644 --- a/privacy/models/privacy_activity.py +++ b/privacy/models/privacy_activity.py @@ -7,20 +7,12 @@ from odoo import api, fields, models class PrivacyActivity(models.Model): _name = "privacy.activity" _description = "Data processing activities" - _inherit = ['mail.thread', 'mail.activity.mixin'] + _inherit = ["mail.thread", "mail.activity.mixin"] - active = fields.Boolean( - default=True, - index=True, - ) - name = fields.Char( - index=True, - required=True, - translate=True, - ) + 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." + translate=True, help="How is personal data used here? Why? Etc." ) controller_id = fields.Many2one( "res.partner", @@ -28,7 +20,7 @@ class PrivacyActivity(models.Model): required=True, default=lambda self: self._default_controller_id(), help="Whoever determines the purposes and means of the processing " - "of personal data.", + "of personal data.", ) processor_ids = fields.Many2many( "res.partner", @@ -37,8 +29,7 @@ class PrivacyActivity(models.Model): help="Whoever processes personal data on behalf of the controller.", ) subject_find = fields.Boolean( - "Define subjects", - help="Are affected subjects present in this database?", + "Define subjects", help="Are affected subjects present in this database?", ) subject_domain = fields.Char( "Subjects filter", diff --git a/privacy/security/data_protection.xml b/privacy/security/data_protection.xml index 4a2ed9c..4bc76d5 100644 --- a/privacy/security/data_protection.xml +++ b/privacy/security/data_protection.xml @@ -1,30 +1,31 @@ - + - Data Protection 30 - Data Protection User - - + + - Data Protection Manager - - - + + + - - + - diff --git a/privacy/views/data_protection_menu_view.xml b/privacy/views/data_protection_menu_view.xml index 3be7de2..cab4202 100644 --- a/privacy/views/data_protection_menu_view.xml +++ b/privacy/views/data_protection_menu_view.xml @@ -1,8 +1,7 @@ - + - Partners ir.actions.act_window @@ -10,38 +9,40 @@ form kanban,tree,form - - - - - - - - Data Protection Settings ir.actions.act_window @@ -50,12 +51,12 @@ inline {'module': 'data_protection'} - - diff --git a/privacy/views/privacy_activity_view.xml b/privacy/views/privacy_activity_view.xml index 0c38697..ab24b4f 100644 --- a/privacy/views/privacy_activity_view.xml +++ b/privacy/views/privacy_activity_view.xml @@ -1,8 +1,7 @@ - + - Privacy Activity Form privacy.activity @@ -27,86 +26,83 @@
-
- + - - - + + + - + - - + /> - + - - - - - - - + + + + + + + - +
- - + +
- Privacy Activity Tree privacy.activity - - - + + + - Privacy Activity Search privacy.activity - - - - + + + + - + - Activities privacy.activity @@ -125,18 +120,17 @@

Click to add a data processing activity. -

+

+

Data processing activities define why, how and what you do with subjects' personal data.

- -