diff --git a/my_compassion/controllers/my_account.py b/my_compassion/controllers/my_account.py index 9ecd5f0..491cb3d 100644 --- a/my_compassion/controllers/my_account.py +++ b/my_compassion/controllers/my_account.py @@ -533,7 +533,7 @@ def my_donations(self, invoice_page=1, invoice_per_page=12, **kw): return request.render("my_compassion.my_donations_page_template", values) @route("/my/information", type="http", auth="user", website=True) - def my_information(self, form_id=None, **kw): + def my_information(self, form_id=None, privacy_policy=None, **kw): """ The route to display the information about the partner :param form_id: the form that has been filled or None @@ -547,6 +547,10 @@ def my_information(self, form_id=None, **kw): "partner": partner, } ) + + if privacy_policy == "accepted" and not partner.legal_agreement_date: + partner.legal_agreement_date = datetime.now() + return request.render("my_compassion.my_information_page_template", values) @route("/my/download/", type="http", auth="user", website=True) diff --git a/my_compassion/i18n/de.po b/my_compassion/i18n/de.po index 84d9610..8cf946f 100644 --- a/my_compassion/i18n/de.po +++ b/my_compassion/i18n/de.po @@ -17,6 +17,11 @@ msgstr "" msgid "(view agreement)" msgstr "(Vereinbarung anzeigen)" +#. module: my_compassion +#: model_terms:ir.ui.view,arch_db:my_compassion.my_information_privacy_data +msgid "Sign the Agreement" +msgstr "Unterschreiben" + #. module: my_compassion #: model_terms:ir.ui.view,arch_db:my_compassion.my_children_gift_history #: model_terms:ir.ui.view,arch_db:my_compassion.my_donations_gift_history diff --git a/my_compassion/i18n/fr_CH.po b/my_compassion/i18n/fr_CH.po index 6b97c09..ef08118 100644 --- a/my_compassion/i18n/fr_CH.po +++ b/my_compassion/i18n/fr_CH.po @@ -17,6 +17,11 @@ msgstr "" msgid "(view agreement)" msgstr "(voir le contrat)" +#. module: my_compassion +#: model_terms:ir.ui.view,arch_db:my_compassion.my_information_privacy_data +msgid "Sign the Agreement" +msgstr "Signer" + #. module: my_compassion #: model_terms:ir.ui.view,arch_db:my_compassion.my_children_gift_history #: model_terms:ir.ui.view,arch_db:my_compassion.my_donations_gift_history diff --git a/my_compassion/templates/my_account_personal_info.xml b/my_compassion/templates/my_account_personal_info.xml index e2a33ef..db5be09 100644 --- a/my_compassion/templates/my_account_personal_info.xml +++ b/my_compassion/templates/my_account_personal_info.xml @@ -141,6 +141,29 @@ /> (view agreement) +
+
+ + +
+ +