Browse Source

Migrate privacy_consent to v11

pull/27/head
fkantelberg 5 years ago
parent
commit
b97c991f02
  1. 5
      privacy_consent/__manifest__.py
  2. 1
      privacy_consent/controllers/main.py
  3. 13
      privacy_consent/data/ir_actions_server.xml
  4. 8
      privacy_consent/data/ir_cron.xml
  5. 8
      privacy_consent/i18n/es.po
  6. 5
      privacy_consent/i18n/fr.po
  7. 7
      privacy_consent/i18n/privacy_consent.pot
  8. 9
      privacy_consent/i18n/pt.po
  9. 1
      privacy_consent/models/mail_mail.py
  10. 1
      privacy_consent/models/mail_template.py
  11. 1
      privacy_consent/models/privacy_activity.py
  12. 1
      privacy_consent/models/privacy_consent.py
  13. 1
      privacy_consent/models/res_partner.py
  14. 4
      privacy_consent/readme/CONTRIBUTORS.rst
  15. 5
      privacy_consent/tests/test_consent.py

5
privacy_consent/__manifest__.py

@ -1,15 +1,14 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Tecnativa - Jairo Llopis
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Privacy - Consent",
"summary": "Allow people to explicitly accept or reject inclusion "
"in some activity, GDPR compliant",
"version": "10.0.1.0.0",
"version": "11.0.1.0.0",
"development_status": "Production/Stable",
"category": "Privacy",
"website": "https://github.com/OCA/management-activity",
"author": "Tecnativa, Odoo Community Association (OCA)",
"author": "Tecnativa, initOS GmbH, Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,

1
privacy_consent/controllers/main.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Tecnativa - Jairo Llopis
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

13
privacy_consent/data/ir_actions_server.xml

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2018 Tecnativa - Jairo Llopis
Copyright 2019 initOS GmbH - Florian Kantelberg
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<data>
@ -8,16 +9,8 @@
<field name="name">Update partner's opt out</field>
<field name="model_id" ref="model_privacy_consent"/>
<field name="crud_model_id" ref="base.model_res_partner"/>
<field name="state">object_write</field>
<field name="use_write">expression</field>
<field name="write_expression">record.partner_id</field>
</record>
<record id="update_opt_out_line_1" model="ir.server.object.lines">
<field name="server_id" ref="update_opt_out"/>
<field name="col1" ref="mail.field_res_partner_opt_out"/>
<field name="type">equation</field>
<field name="value">not record.accepted</field>
<field name="state">code</field>
<field name="code">records.mapped('partner_id').write({'opt_out': not record.accepted})</field>
</record>
</data>

8
privacy_consent/data/ir_cron.xml

@ -1,15 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2018 Tecnativa - Jairo Llopis
Copyright 2019 initOS GmbH - Florian Kantelberg
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<data>
<record id="cron_auto_consent" model="ir.cron">
<field name="name">Request automatic data processing consents</field>
<field name="model">privacy.activity</field>
<field name="function">_cron_new_consents</field>
<field name="model_id" ref="model_privacy_activity"/>
<field name="state">code</field>
<field name="code">model._cron_new_consents()</field>
<field name="interval_number">1</field>
<field name="interval_type">work_days</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
</record>

8
privacy_consent/i18n/es.po

@ -372,6 +372,11 @@ msgstr "Contacto duplicado en esta actividad de tratamiento"
msgid "Email Templates"
msgstr "Plantillas de correo electrónico"
#. module: privacy_consent
#: model:ir.model,name:privacy_consent.model_mail_compose_message
msgid "Email composition wizard"
msgstr "Asistente de redacción de correo electrónico"
#. module: privacy_consent
#: model:ir.model.fields,field_description:privacy_consent.field_privacy_activity_consent_template_id
msgid "Email template"
@ -658,6 +663,3 @@ msgstr "Ha <b class=\"text-danger\">rechazado</b> dicho tratamiento."
#: model:ir.ui.view,arch_db:privacy_consent.form
msgid "You have <b class=\"text-success\">accepted</b> such processing."
msgstr "Ha <b class=\"text-success\">aceptado</b> dicho tratamiento."
#~ msgid "Email composition wizard"
#~ msgstr "Asistente de redacción de correo electrónico"

5
privacy_consent/i18n/fr.po

@ -6,7 +6,6 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-05-13 17:04+0000\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: fr\n"
@ -283,7 +282,7 @@ msgstr ""
#. module: privacy_consent
#: model:ir.ui.view,arch_db:privacy_consent.activity_form
msgid "Generate and enqueue missing consent requests"
msgid "Generate and send missing consent requests"
msgstr ""
#. module: privacy_consent
@ -488,7 +487,7 @@ msgstr ""
#. module: privacy_consent
#: model:ir.ui.view,arch_db:privacy_consent.activity_form
msgid "This could enqueue many consent emails, are you sure to proceed?"
msgid "This could send many consent emails, are you sure to proceed?"
msgstr ""
#. module: privacy_consent

7
privacy_consent/i18n/privacy_consent.pot

@ -6,6 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-05-13 17:04+0000\n"
"PO-Revision-Date: 2019-05-13 17:04+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -237,6 +239,11 @@ msgstr ""
msgid "Email Templates"
msgstr ""
#. module: privacy_consent
#: model:ir.model,name:privacy_consent.model_mail_compose_message
msgid "Email composition wizard"
msgstr ""
#. module: privacy_consent
#: model:ir.model.fields,field_description:privacy_consent.field_privacy_activity_consent_template_id
msgid "Email template"

9
privacy_consent/i18n/pt.po

@ -2,7 +2,6 @@ msgid ""
msgstr ""
"Project-Id-Version: Portuguese (data-protection-10.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-05-13 17:04+0000\n"
"PO-Revision-Date: 2018-12-15 21:58+0000\n"
"Last-Translator: alvarorib <alvaro.ribeiro@exo.pt>\n"
"Language-Team: Portuguese <https://translation.odoo-community.org/projects/"
@ -395,9 +394,7 @@ msgstr ""
#. module: privacy_consent
#: model:ir.ui.view,arch_db:privacy_consent.activity_form
#, fuzzy
#| msgid "Generate and send missing consent requests"
msgid "Generate and enqueue missing consent requests"
msgid "Generate and send missing consent requests"
msgstr "Gerar e enviar pedidos de consentimento em falta"
#. module: privacy_consent
@ -615,9 +612,7 @@ msgstr "Obrigado pela sua resposta."
#. module: privacy_consent
#: model:ir.ui.view,arch_db:privacy_consent.activity_form
#, fuzzy
#| msgid "This could send many consent emails, are you sure to proceed?"
msgid "This could enqueue many consent emails, are you sure to proceed?"
msgid "This could send many consent emails, are you sure to proceed?"
msgstr ""
"Atenção, esta operação pode enviar múltiplo emails de consentimento pretende "
"prosseguir?"

1
privacy_consent/models/mail_mail.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Tecnativa - Jairo Llopis
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

1
privacy_consent/models/mail_template.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Tecnativa - Jairo Llopis
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

1
privacy_consent/models/privacy_activity.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Tecnativa - Jairo Llopis
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

1
privacy_consent/models/privacy_consent.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Tecnativa - Jairo Llopis
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

1
privacy_consent/models/res_partner.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Tecnativa - Jairo Llopis
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

4
privacy_consent/readme/CONTRIBUTORS.rst

@ -1,3 +1,7 @@
* `Tecnativa <https://www.tecnativa.com>`_:
* Jairo Llopis
* `initOS GmbH <https://www.initos.com>`_:
* Florian Kantelberg

5
privacy_consent/tests/test_consent.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Tecnativa - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
@ -204,7 +203,7 @@ class ActivityCase(HttpCase):
self.assertNotIn(reject_url, messages[1].body)
# Visit tokenized accept URL
with self.release_cr():
result = self.url_open(accept_url).read()
result = self.url_open(accept_url).text
self.assertIn("accepted", result)
self.assertIn(reject_url, result)
self.assertIn(self.activity_manual.name, result)
@ -220,7 +219,7 @@ class ActivityCase(HttpCase):
)
# Visit tokenized reject URL
with self.release_cr():
result = self.url_open(reject_url).read()
result = self.url_open(reject_url).text
self.assertIn("rejected", result)
self.assertIn(accept_url, result)
self.assertIn(self.activity_manual.name, result)

Loading…
Cancel
Save