Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions website_signup_legal_page_required/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3

=============================
Require accepting legal terms
=============================

This module was written to extend the functionality of website legal page to
force new users to accept the stablished legal terms before creating a new user
account.

Configuration
=============

To enable users to create accounts:

* Go to *Settings > Configuration > General settings*.
* Enable *Allow external users to sign up*.
* Enable *Activate the customer portal*.

To customize the legal pages, visit these **after installing the module**:

* `Legal advice </page/legal>`_.
* `Privacy policy </page/privacy>`_.
* `Terms of use </page/terms>`_.

Usage
=====

To use this module, you need to:

* Log out.
* In home page, press *Sign in*.
* Press *Sign up*.

See that check box at the end? It is now required. It is also available in the
backend user form.

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/186/9.0

For further information, please visit:

* https://www.odoo.com/forum/help-1

Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/OCA/website/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smashing it by providing a detailed and welcomed feedback.

Credits
=======

Images
------

* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.

Contributors
------------

* Rafael Blasco <rafaelbn@antiun.com>
* Jairo Llopis <yajo.sk8@gmail.com>
* Alessio Gerace <alessio.gerace@agilebg.com>


Maintainer
----------

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

This module is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

To contribute to this module, please visit https://odoo-community.org.
7 changes: 7 additions & 0 deletions website_signup_legal_page_required/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# -*- coding: utf-8 -*-
# © 2015 Antiun Ingeniería, S.L.
# © 2016 Alessio Gerace - Agile Business Group
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from . import controllers
from . import models
23 changes: 23 additions & 0 deletions website_signup_legal_page_required/__openerp__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
# © 2015 Antiun Ingeniería, S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
"name": "Require accepting legal terms",
"summary": "Force the user to accept the legal terms to open an account",
"version": "9.0.1.0.0",
"category": "Website",
"website": "http://www.antiun.com",
"author": "Antiun Ingeniería S.L.,"
" Agile Business Group, Odoo Community Association (OCA)",
"license": "AGPL-3",
"depends": [
"website_legal_page",
],
"data": [
"views/pages.xml",
"views/res_users.xml",
],
"application": False,
"installable": True,
}
6 changes: 6 additions & 0 deletions website_signup_legal_page_required/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# -*- coding: utf-8 -*-
# © 2015 Antiun Ingeniería, S.L.
# © 2016 Alessio Gerace - Agile Business Group
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from . import main
11 changes: 11 additions & 0 deletions website_signup_legal_page_required/controllers/exceptions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
# © 2015 Antiun Ingeniería, S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openerp import _
from openerp.addons.auth_signup.res_users import SignupError


class LegalTermsNotAcceptedError(SignupError):
def __init__(self, msg=_("You must accept our legal terms.")):
super(LegalTermsNotAcceptedError, self).__init__(msg)
18 changes: 18 additions & 0 deletions website_signup_legal_page_required/controllers/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
# © 2015 Antiun Ingeniería, S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openerp.http import request
from openerp.addons.auth_signup.controllers.main import AuthSignupHome
from . import exceptions


class ForceLegalTerms(AuthSignupHome):
def _signup_with_values(self, token, values, *args, **kwargs):
"""Force accepting legal terms to open an account."""
if request.params.get("accepted_legal_terms"):
values["accepted_legal_terms"] = True
return super(ForceLegalTerms, self)._signup_with_values(
token, values, *args, **kwargs)
else:
raise exceptions.LegalTermsNotAcceptedError()
76 changes: 76 additions & 0 deletions website_signup_legal_page_required/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_signup_legal_page_required
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: website (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-02-25 14:25+0000\n"
"PO-Revision-Date: 2015-10-27 18:24+0000\n"
"Last-Translator: <>\n"
"Language-Team: Catalan (http://www.transifex.com/oca/OCA-website-8-0/language/ca/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: ca\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: website_signup_legal_page_required
#: view:website:auth_signup.fields
msgid ""
",\n"
" the"
msgstr ""

#. module: website_signup_legal_page_required
#: field:res.users,accepted_legal_terms:0
msgid "Accepted legal terms"
msgstr ""

#. module: website_signup_legal_page_required
#: help:res.users,accepted_legal_terms:0
msgid "Did the user accept our legal terms when opening the account?"
msgstr ""

#. module: website_signup_legal_page_required
#: view:website:auth_signup.fields
msgid "I accept the"
msgstr ""

#. module: website_signup_legal_page_required
#: model:ir.model,name:website_signup_legal_page_required.model_res_users
msgid "Users"
msgstr ""

#. module: website_signup_legal_page_required
#: code:addons/website_signup_legal_page_required/exceptions.py:10
#, python-format
msgid "You must accept our legal terms."
msgstr ""

#. module: website_signup_legal_page_required
#: view:website:auth_signup.fields
msgid "and the"
msgstr ""

#. module: website_signup_legal_page_required
#: view:website:auth_signup.fields
msgid "legal advice"
msgstr ""

#. module: website_signup_legal_page_required
#: view:website:auth_signup.fields
msgid "of this website."
msgstr ""

#. module: website_signup_legal_page_required
#: view:website:auth_signup.fields
msgid "privacy policy"
msgstr "Política privacitat"

#. module: website_signup_legal_page_required
#: view:website:auth_signup.fields
msgid "terms of use"
msgstr ""
166 changes: 166 additions & 0 deletions website_signup_legal_page_required/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_signup_legal_page_required
#
# Translators:
# Rudolf Schnapka <rs@techno-flex.de>, 2016
msgid ""
msgstr ""
"Project-Id-Version: website (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-06 02:53+0000\n"
"PO-Revision-Date: 2016-05-01 20:00+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>\n"
"Language-Team: German (http://www.transifex.com/oca/OCA-website-8-0/language/de/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: de\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: website_signup_legal_page_required
#: field:res.users,meeting_count:0
msgid "# Meetings"
msgstr ""

#. module: website_signup_legal_page_required
#: view:website:auth_signup.fields
msgid ""
",\n"
" the"
msgstr ",\ndie"

#. module: website_signup_legal_page_required
#: field:res.users,accepted_legal_terms:0
msgid "Accepted legal terms"
msgstr "Nutzungsbedingungen angenommen"

#. module: website_signup_legal_page_required
#: field:res.users,property_stock_customer:0
msgid "Customer Location"
msgstr ""

#. module: website_signup_legal_page_required
#: help:res.users,accepted_legal_terms:0
msgid "Did the user accept our legal terms when opening the account?"
msgstr "Hat der Benutzer unsere Nutzungsbedingungen akzeptiert, als er das Konto eröffnet hat?"

#. module: website_signup_legal_page_required
#: view:website:auth_signup.fields
msgid "I accept the"
msgstr "Ich akzeptiere die "

#. module: website_signup_legal_page_required
#: field:res.users,opportunity_ids:0
msgid "Leads and Opportunities"
msgstr ""

#. module: website_signup_legal_page_required
#: field:res.users,meeting_ids:0
msgid "Meetings"
msgstr ""

#. module: website_signup_legal_page_required
#: field:res.users,opportunity_count:0
msgid "Opportunity"
msgstr ""

#. module: website_signup_legal_page_required
#: field:res.users,phonecall_count:0 field:res.users,phonecall_ids:0
msgid "Phonecalls"
msgstr ""

#. module: website_signup_legal_page_required
#: field:res.users,website_published:0
msgid "Publish"
msgstr ""

#. module: website_signup_legal_page_required
#: help:res.users,website_published:0
msgid "Publish on the website"
msgstr ""

#. module: website_signup_legal_page_required
#: field:res.users,property_stock_supplier:0
msgid "Supplier Location"
msgstr ""

#. module: website_signup_legal_page_required
#: help:res.users,property_stock_customer:0
msgid ""
"This stock location will be used, instead of the default one, as the "
"destination location for goods you send to this partner"
msgstr ""

#. module: website_signup_legal_page_required
#: help:res.users,property_stock_supplier:0
msgid ""
"This stock location will be used, instead of the default one, as the source "
"location for goods you receive from the current partner"
msgstr ""

#. module: website_signup_legal_page_required
#: model:ir.model,name:website_signup_legal_page_required.model_res_users
msgid "Users"
msgstr "Benutzer"

#. module: website_signup_legal_page_required
#: field:res.users,website_description:0
msgid "Website Partner Full Description"
msgstr ""

#. module: website_signup_legal_page_required
#: field:res.users,website_short_description:0
msgid "Website Partner Short Description"
msgstr ""

#. module: website_signup_legal_page_required
#: field:res.users,website_meta_description:0
msgid "Website meta description"
msgstr "Webseiten Meta-Beschreibung"

#. module: website_signup_legal_page_required
#: field:res.users,website_meta_keywords:0
msgid "Website meta keywords"
msgstr "Webseiten Meta-Schlüsselwörter"

#. module: website_signup_legal_page_required
#: field:res.users,website_meta_title:0
msgid "Website meta title"
msgstr "Webseiten Meta-Titel"

#. module: website_signup_legal_page_required
#: code:addons/website_signup_legal_page_required/exceptions.py:10
#, python-format
msgid "You must accept our legal terms."
msgstr "Sie müssen unsere Nutzungsbedingungen akzeptieren."

#. module: website_signup_legal_page_required
#: view:website:auth_signup.fields
msgid "and the"
msgstr "und die"

#. module: website_signup_legal_page_required
#: view:website:auth_signup.fields
msgid "legal advice"
msgstr "Nutzungshinweise"

#. module: website_signup_legal_page_required
#: view:website:auth_signup.fields
msgid "of this website."
msgstr "der Webseite."

#. module: website_signup_legal_page_required
#: view:website:auth_signup.fields
msgid "privacy policy"
msgstr "Datenschutzbestimmungen"

#. module: website_signup_legal_page_required
#: view:website:auth_signup.fields
msgid "terms of use"
msgstr "Nutzungsbedingungen"

#. module: website_signup_legal_page_required
#: field:res.users,self:0
msgid "unknown"
msgstr ""
Loading