Browse Source
[FIX] privacy_consent: make it work, basically
[FIX] privacy_consent: make it work, basically
Some little nasty details were overlooked in the v12 migration, which rendered the module basically useless: - The wizard used to ask for consent in manual activities did not fill the placeholders, resulting in an awkward UX. - The sent mails **did not have the token** to authenticate and actually allow accepting or rejecting. These buttons returned a 500 error. - Once the token is added, the form was ugly. - Sadly, some tests were testing the how and not the what. It is understandable due to the complexity of testing the what, even more without the `Form` utility, new on v12. These are fixed now too. @Tecnativa TT25868pull/50/head
Jairo Llopis
4 years ago
No known key found for this signature in database
GPG Key ID: 8B8A6900E4831A9B
7 changed files with 85 additions and 13 deletions
-
1privacy_consent/__manifest__.py
-
4privacy_consent/models/mail_mail.py
-
2privacy_consent/models/privacy_consent.py
-
7privacy_consent/static/src/css/privacy_consent.scss
-
13privacy_consent/templates/assets.xml
-
1privacy_consent/templates/form.xml
-
70privacy_consent/tests/test_consent.py
@ -0,0 +1,7 @@ |
|||
/* Copyright 2020 Tecnativa - Jairo Llopis |
|||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). */ |
|||
|
|||
.o_consent_form { |
|||
// Need !important to override an inline style of max-width: 300px |
|||
max-width: 100% !important; |
|||
} |
@ -0,0 +1,13 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<!-- Copyright 2020 Tecnativa - Jairo Llopis |
|||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> |
|||
|
|||
<data> |
|||
|
|||
<template id="assets_frontend" inherit_id="web.assets_frontend"> |
|||
<xpath expr="."> |
|||
<link rel="stylesheet" href="/privacy_consent/static/src/css/privacy_consent.scss" /> |
|||
</xpath> |
|||
</template> |
|||
|
|||
</data> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue