Florian da Costa
6 years ago
4 changed files with 55 additions and 26 deletions
-
1privacy_right_to_be_forgotten/README.rst
-
23privacy_right_to_be_forgotten/tests/common.py
-
30privacy_right_to_be_forgotten/tests/test_privacy_right_to_be_forgotten.py
-
25privacy_right_to_be_forgotten/wizards/res_partner_gdpr.py
@ -0,0 +1,23 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright 2018 Therp BV <https://therp.nl> |
||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). |
||||
|
from openerp.tests.common import SingleTransactionCase |
||||
|
from ..wizards.res_partner_gdpr import FIELDS_GDPR |
||||
|
|
||||
|
|
||||
|
class TestPrivacyGdpr(SingleTransactionCase): |
||||
|
|
||||
|
def _create_test_customer(self): |
||||
|
vals = {} |
||||
|
for field in FIELDS_GDPR: |
||||
|
if field == 'name': |
||||
|
vals.update({field: 'Name'}) |
||||
|
else: |
||||
|
vals.update({field: False}) |
||||
|
return self.env['res.partner'].create(vals) |
||||
|
|
||||
|
def _gdpr_cleanup(self, customer): |
||||
|
wiz = self.env['res.partner.gdpr'].create({ |
||||
|
'partner_ids': [(6, False, customer.ids)]}) |
||||
|
self.assertTrue(wiz.fields, True) |
||||
|
wiz.action_gdpr_res_partner_cleanup() |
Write
Preview
Loading…
Cancel
Save
Reference in new issue