diff --git a/setup/website_legal_page/odoo/__init__.py b/setup/website_legal_page/odoo/__init__.py new file mode 100644 index 0000000000..de40ea7ca0 --- /dev/null +++ b/setup/website_legal_page/odoo/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/setup/website_legal_page/odoo/addons/__init__.py b/setup/website_legal_page/odoo/addons/__init__.py new file mode 100644 index 0000000000..de40ea7ca0 --- /dev/null +++ b/setup/website_legal_page/odoo/addons/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/setup/website_legal_page/odoo/addons/website_legal_page b/setup/website_legal_page/odoo/addons/website_legal_page new file mode 120000 index 0000000000..bf3f4b6744 --- /dev/null +++ b/setup/website_legal_page/odoo/addons/website_legal_page @@ -0,0 +1 @@ +../../../../website_legal_page \ No newline at end of file diff --git a/setup/website_legal_page/setup.py b/setup/website_legal_page/setup.py new file mode 100644 index 0000000000..28c57bb640 --- /dev/null +++ b/setup/website_legal_page/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/website_legal_page/README.rst b/website_legal_page/README.rst index 0a75c43e2b..883565955f 100644 --- a/website_legal_page/README.rst +++ b/website_legal_page/README.rst @@ -1,6 +1,8 @@ .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :alt: License: AGPL-3 + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +================== Website legal page ================== @@ -48,13 +50,9 @@ relationship by providing information to you. Bug Tracker =========== -Bugs are tracked on `GitHub 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 -`here `_. +Bugs are tracked on `GitHub Issues `_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smash it by providing detailed and welcomed feedback. Credits @@ -80,11 +78,12 @@ Thanks to [johnny_automatic](https://openclipart.org/user-detail/johnny_automati Contributors ------------ -* Rafael Blasco +* Rafael Blasco * Antonio Espinosa * Igor Pastor * Jairo Llopis * Dave Lasley +* Nicola Malcontenti Maintainer ---------- diff --git a/website_legal_page/__init__.py b/website_legal_page/__init__.py index 6dcbba5704..630eeef135 100644 --- a/website_legal_page/__init__.py +++ b/website_legal_page/__init__.py @@ -1,4 +1,4 @@ # -*- coding: utf-8 -*- -# © 2015 Antiun Ingeniería S.L. (http://www.antiun.com) -# © 2015 Antonio Espinosa # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import controllers diff --git a/website_legal_page/__manifest__.py b/website_legal_page/__manifest__.py index e83f4b639c..24177c05bb 100644 --- a/website_legal_page/__manifest__.py +++ b/website_legal_page/__manifest__.py @@ -1,13 +1,13 @@ # -*- coding: utf-8 -*- -# © 2015 Antiun Ingeniería S.L. (http://www.antiun.com) -# © 2015 Antonio Espinosa +# Copyright 2015 Antonio Espinosa +# Copyright 2017 Jairo Llopis # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': "Website Legal Page", 'description': 'Add legal information, such as privacy policy', 'category': 'Website', - 'version': '9.0.1.0.0', + 'version': '10.0.1.0.0', 'depends': [ 'website', ], @@ -19,9 +19,9 @@ ], 'author': 'Antiun Ingeniería S.L., ' 'Tecnativa, ' - 'LasLabs Inc, ' + 'LasLabs, ' 'Odoo Community Association (OCA)', - 'website': 'http://www.antiun.com', + 'website': 'https://www.tecnativa.com', 'license': 'AGPL-3', - 'installable': False, + 'installable': True, } diff --git a/website_legal_page/controllers/__init__.py b/website_legal_page/controllers/__init__.py new file mode 100644 index 0000000000..230ef7d3af --- /dev/null +++ b/website_legal_page/controllers/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import main diff --git a/website_legal_page/controllers/main.py b/website_legal_page/controllers/main.py new file mode 100644 index 0000000000..8fc10c9a4b --- /dev/null +++ b/website_legal_page/controllers/main.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 LasLabs Inc. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import http +from odoo.addons.website.controllers.main import Website + + +class Legal(Website): + + @http.route([ + '/legal/', + ], + auth='public', + type='http', + website=True, + ) + def show_legal_page(self, page, **kwargs): + return self.page('website_legal_page.%s' % page, **kwargs) diff --git a/website_legal_page/i18n/bg.po b/website_legal_page/i18n/bg.po new file mode 100644 index 0000000000..3eaa398564 --- /dev/null +++ b/website_legal_page/i18n/bg.po @@ -0,0 +1,68 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * website_legal_page +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: website (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-11-29 03:55+0000\n" +"PO-Revision-Date: 2016-05-26 15:27+0000\n" +"Last-Translator: <>\n" +"Language-Team: Bulgarian (http://www.transifex.com/oca/OCA-website-9-0/language/bg/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: bg\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: website_legal_page +#: model:ir.ui.view,arch_db:website_legal_page.acceptance_full +msgid ", and the" +msgstr "" + +#. module: website_legal_page +#: model:ir.ui.view,arch_db:website_legal_page.acceptance_full +msgid ", the" +msgstr "" + +#. module: website_legal_page +#: model:ir.ui.view,arch_db:website_legal_page.acceptance_full +msgid "I accept the" +msgstr "" + +#. module: website_legal_page +#: model:ir.ui.view,arch_db:website_legal_page.legal_advice_link +msgid "Legal advice" +msgstr "" + +#. module: website_legal_page +#: model:ir.ui.view,arch_db:website_legal_page.privacy_policy_link +msgid "Privacy policy" +msgstr "" + +#. module: website_legal_page +#: model:ir.ui.view,arch_db:website_legal_page.terms_of_use_link +msgid "Terms of use" +msgstr "" + +#. module: website_legal_page +#: model:ir.ui.view,arch_db:website_legal_page.acceptance_full +msgid "legal advice" +msgstr "" + +#. module: website_legal_page +#: model:ir.ui.view,arch_db:website_legal_page.acceptance_full +msgid "of this website." +msgstr "" + +#. module: website_legal_page +#: model:ir.ui.view,arch_db:website_legal_page.acceptance_full +msgid "privacy policy" +msgstr "политика за личните данни" + +#. module: website_legal_page +#: model:ir.ui.view,arch_db:website_legal_page.acceptance_full +msgid "terms of use" +msgstr "" diff --git a/website_legal_page/i18n/el_GR.po b/website_legal_page/i18n/el_GR.po index a2e704e936..ed7709693c 100644 --- a/website_legal_page/i18n/el_GR.po +++ b/website_legal_page/i18n/el_GR.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: website (9.0)\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-05-27 02:54+0000\n" -"PO-Revision-Date: 2016-05-26 15:27+0000\n" +"POT-Creation-Date: 2016-11-29 03:55+0000\n" +"PO-Revision-Date: 2016-10-11 11:48+0000\n" "Last-Translator: OCA Transbot \n" "Language-Team: Greek (Greece) (http://www.transifex.com/oca/OCA-website-9-0/language/el_GR/)\n" "MIME-Version: 1.0\n" @@ -20,12 +20,12 @@ msgstr "" #. module: website_legal_page #: model:ir.ui.view,arch_db:website_legal_page.acceptance_full msgid ", and the" -msgstr "" +msgstr ", και το" #. module: website_legal_page #: model:ir.ui.view,arch_db:website_legal_page.acceptance_full msgid ", the" -msgstr "" +msgstr ", το" #. module: website_legal_page #: model:ir.ui.view,arch_db:website_legal_page.acceptance_full diff --git a/website_legal_page/i18n/fr.po b/website_legal_page/i18n/fr.po index f03c271cc8..81e13be7ff 100644 --- a/website_legal_page/i18n/fr.po +++ b/website_legal_page/i18n/fr.po @@ -4,13 +4,14 @@ # # Translators: # Christophe CHAUVET , 2016 +# Sébastien Alix , 2016 msgid "" msgstr "" "Project-Id-Version: website (9.0)\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-05-27 02:54+0000\n" -"PO-Revision-Date: 2016-05-26 15:43+0000\n" -"Last-Translator: OCA Transbot \n" +"POT-Creation-Date: 2016-11-29 03:55+0000\n" +"PO-Revision-Date: 2016-11-10 14:06+0000\n" +"Last-Translator: Sébastien Alix \n" "Language-Team: French (http://www.transifex.com/oca/OCA-website-9-0/language/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -21,17 +22,17 @@ msgstr "" #. module: website_legal_page #: model:ir.ui.view,arch_db:website_legal_page.acceptance_full msgid ", and the" -msgstr ", et le" +msgstr ", et les" #. module: website_legal_page #: model:ir.ui.view,arch_db:website_legal_page.acceptance_full msgid ", the" -msgstr ", le" +msgstr ", la" #. module: website_legal_page #: model:ir.ui.view,arch_db:website_legal_page.acceptance_full msgid "I accept the" -msgstr "" +msgstr "J'accepte les" #. module: website_legal_page #: model:ir.ui.view,arch_db:website_legal_page.legal_advice_link @@ -46,7 +47,7 @@ msgstr "Politique de vie privée" #. module: website_legal_page #: model:ir.ui.view,arch_db:website_legal_page.terms_of_use_link msgid "Terms of use" -msgstr "Condition d'utilisation" +msgstr "Conditions d'utilisation" #. module: website_legal_page #: model:ir.ui.view,arch_db:website_legal_page.acceptance_full @@ -66,4 +67,4 @@ msgstr "politique de vie privée" #. module: website_legal_page #: model:ir.ui.view,arch_db:website_legal_page.acceptance_full msgid "terms of use" -msgstr "condition d'utilisation" +msgstr "conditions d'utilisation" diff --git a/website_legal_page/i18n/pt_PT.po b/website_legal_page/i18n/pt_PT.po new file mode 100644 index 0000000000..b9e83d80f6 --- /dev/null +++ b/website_legal_page/i18n/pt_PT.po @@ -0,0 +1,69 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * website_legal_page +# +# Translators: +# Pedro Castro Silva , 2016 +msgid "" +msgstr "" +"Project-Id-Version: website (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 04:17+0000\n" +"PO-Revision-Date: 2016-12-17 18:52+0000\n" +"Last-Translator: Pedro Castro Silva \n" +"Language-Team: Portuguese (Portugal) (http://www.transifex.com/oca/OCA-website-9-0/language/pt_PT/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: pt_PT\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: website_legal_page +#: model:ir.ui.view,arch_db:website_legal_page.acceptance_full +msgid ", and the" +msgstr ", e o" + +#. module: website_legal_page +#: model:ir.ui.view,arch_db:website_legal_page.acceptance_full +msgid ", the" +msgstr ", o" + +#. module: website_legal_page +#: model:ir.ui.view,arch_db:website_legal_page.acceptance_full +msgid "I accept the" +msgstr "Aceitos os" + +#. module: website_legal_page +#: model:ir.ui.view,arch_db:website_legal_page.legal_advice_link +msgid "Legal advice" +msgstr "Aconselhamento jurídico" + +#. module: website_legal_page +#: model:ir.ui.view,arch_db:website_legal_page.privacy_policy_link +msgid "Privacy policy" +msgstr "Política de privacidade" + +#. module: website_legal_page +#: model:ir.ui.view,arch_db:website_legal_page.terms_of_use_link +msgid "Terms of use" +msgstr "Termos de utilização" + +#. module: website_legal_page +#: model:ir.ui.view,arch_db:website_legal_page.acceptance_full +msgid "legal advice" +msgstr "aconselhamento jurídico" + +#. module: website_legal_page +#: model:ir.ui.view,arch_db:website_legal_page.acceptance_full +msgid "of this website." +msgstr "deste website." + +#. module: website_legal_page +#: model:ir.ui.view,arch_db:website_legal_page.acceptance_full +msgid "privacy policy" +msgstr "política de privacidade" + +#. module: website_legal_page +#: model:ir.ui.view,arch_db:website_legal_page.acceptance_full +msgid "terms of use" +msgstr "termos de utilização" diff --git a/website_legal_page/i18n/website_legal_page.pot b/website_legal_page/i18n/website_legal_page.pot deleted file mode 100644 index 34e3f37701..0000000000 --- a/website_legal_page/i18n/website_legal_page.pot +++ /dev/null @@ -1,280 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * website_legal_page -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-06-16 11:37+0000\n" -"PO-Revision-Date: 2015-06-16 11:37+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: website_legal_page -#: view:website:website.privacy -msgid "(\"us\", \"we\", or \"our\") operates" -msgstr "" - -#. module: website_legal_page -#: view:website:website.terms -msgid "(\"us\", \"we\", or \"our\")." -msgstr "" - -#. module: website_legal_page -#: view:website:website.privacy -msgid "(the \"Site\"). This page informs you of our policies regarding the collection, use and disclosure\n" -" of Personal Information we receive from users of the Site." -msgstr "" - -#. module: website_legal_page -#: view:website:website.terms -msgid ",\n" -" without regard to its conflict of law provisions." -msgstr "" - -#. module: website_legal_page -#: view:website:website.terms -msgid "All provisions of the Terms which by their nature should survive termination shall survive\n" -" termination, including, without limitation, ownership provisions, warranty disclaimers, indemnity\n" -" and limitations of liability." -msgstr "" - -#. module: website_legal_page -#: view:website:website.terms -msgid "By accessing or using the Service you agree to be bound by these Terms. If you disagree with\n" -" any part of the terms then you may not access the Service." -msgstr "" - -#. module: website_legal_page -#: view:website:website.terms -msgid "Changes" -msgstr "" - -#. module: website_legal_page -#: view:website:website.privacy -msgid "Changes To This Privacy Policy" -msgstr "" - -#. module: website_legal_page -#: view:website:website.privacy -#: view:website:website.terms -msgid "Contact Us" -msgstr "" - -#. module: website_legal_page -#: view:website:website.privacy -msgid "Cookies" -msgstr "" - -#. module: website_legal_page -#: view:website:website.privacy -msgid "Cookies are files with small amount of data, which may include an anonymous unique identifier.\n" -" Cookies are sent to your browser from a web site and stored on your computer's hard drive." -msgstr "" - -#. module: website_legal_page -#: view:website:website.legal -#: view:website:website.privacy -#: view:website:website.terms -msgid "Email address:" -msgstr "" - -#. module: website_legal_page -#: view:website:website.legal -#: view:website:website.privacy -#: view:website:website.terms -msgid "Fax number:" -msgstr "" - -#. module: website_legal_page -#: view:website:website.terms -msgid "Governing Law" -msgstr "" - -#. module: website_legal_page -#: view:website:website.privacy -#: view:website:website.terms -msgid "If you have any questions about these Terms, please contact us." -msgstr "" - -#. module: website_legal_page -#: view:website:website.privacy -msgid "Information Collection And Use" -msgstr "" - -#. module: website_legal_page -#: view:website:website.layout -#: view:website:website.legal -msgid "Legal advice" -msgstr "" - -#. module: website_legal_page -#: view:website:website.privacy -msgid "Like many site operators, we collect information that your browser sends whenever you visit our\n" -" Site (\"Log Data\"). This Log Data may include information such as your computer's Internet\n" -" Protocol (\"IP\") address, browser type, browser version, the pages of our Site that you visit, the\n" -" time and date of your visit, the time spent on those pages and other statistics." -msgstr "" - -#. module: website_legal_page -#: view:website:website.privacy -msgid "Like many sites, we use \"cookies\" to collect information. You can instruct your browser to refuse\n" -" all cookies or to indicate when a cookie is being sent. However, if you do not accept cookies, you\n" -" may not be able to use some portions of our Site." -msgstr "" - -#. module: website_legal_page -#: view:website:website.terms -msgid "Links To Other Web Sites" -msgstr "" - -#. module: website_legal_page -#: view:website:website.privacy -msgid "Log Data" -msgstr "" - -#. module: website_legal_page -#: view:website:website.terms -msgid "Our Service may contain links to third­party web sites or services that are not owned or controlled\n" -" by ​us. We has no control over, and assumes no responsibility for, the\n" -" content, privacy policies, or practices of any third party web sites or services. You further\n" -" acknowledge and agree that ​we shall not be responsible or liable,\n" -" directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection\n" -" with use of or reliance on any such content, goods or services available on or through any such\n" -" web sites or services." -msgstr "" - -#. module: website_legal_page -#: view:website:website.terms -msgid "Our failure to enforce any right or provision of these Terms will not be considered a waiver of\n" -" those rights. If any provision of these Terms is held to be invalid or unenforceable by a court, the\n" -" remaining provisions of these Terms will remain in effect. These Terms constitute the entire\n" -" agreement between us regarding our Service, and supersede and replace any prior agreements\n" -" we might have between us regarding the Service." -msgstr "" - -#. module: website_legal_page -#: view:website:website.legal -#: view:website:website.privacy -#: view:website:website.terms -msgid "Phone number:" -msgstr "" - -#. module: website_legal_page -#: view:website:website.terms -msgid "Please read these Terms of Use (\"Terms\", \"Terms of Use\") carefully before using the" -msgstr "" - -#. module: website_legal_page -#: view:website:website.layout -#: view:website:website.privacy -msgid "Privacy policy" -msgstr "" - -#. module: website_legal_page -#: view:website:website.privacy -msgid "Security" -msgstr "" - -#. module: website_legal_page -#: view:website:website.legal -msgid "VAT number:" -msgstr "" - -#. module: website_legal_page -#: view:website:website.terms -msgid "Termination" -msgstr "" - -#. module: website_legal_page -#: view:website:website.terms -msgid "Terms of Use (\"Terms\")" -msgstr "" - -#. module: website_legal_page -#: view:website:website.layout -#: view:website:website.terms -msgid "Terms of use" -msgstr "" - -#. module: website_legal_page -#: view:website:website.legal -msgid "The owner of this website is" -msgstr "" - -#. module: website_legal_page -#: view:website:website.privacy -msgid "The security of your Personal Information is important to us, but remember that no method of\n" -" transmission over the Internet, or method of electronic storage, is 100% secure. While we strive to\n" -" use commercially acceptable means to protect your Personal Information, we cannot guarantee\n" -" its absolute security." -msgstr "" - -#. module: website_legal_page -#: view:website:website.terms -msgid "These Terms shall be governed and construed in accordance with the laws of ​" -msgstr "" - -#. module: website_legal_page -#: view:website:website.terms -msgid "We may terminate or suspend access to our Service immediately, without prior notice or liability,\n" -" for any reason whatsoever, including without limitation if you breach the Terms." -msgstr "" - -#. module: website_legal_page -#: view:website:website.privacy -msgid "We may update this Privacy Policy from time to time. We will notify\n" -" you of any changes by posting the new Privacy Policy on the Site. You are advised to review this\n" -" Privacy Policy periodically for any changes." -msgstr "" - -#. module: website_legal_page -#: view:website:website.terms -msgid "We reserve the right, at our sole discretion, to modify or replace these Terms at any time. If a\n" -" revision is material we will try to provide at least ​30 days notice prior to any new\n" -" terms taking effect. What constitutes a material change will be determined at our sole discretion.\n" -" By continuing to access or use our Service after those revisions become effective, you agree to\n" -" be bound by the revised terms. If you do not agree to the new terms, please stop using the\n" -" Service." -msgstr "" - -#. module: website_legal_page -#: view:website:website.terms -msgid "We strongly advise you to read the terms and conditions and privacy policies of any third­party\n" -" web sites or services that you visit." -msgstr "" - -#. module: website_legal_page -#: view:website:website.privacy -msgid "We use your Personal Information only for providing and improving the Site. By using the Site,\n" -" you agree to the collection and use of information in accordance with this policy." -msgstr "" - -#. module: website_legal_page -#: view:website:website.privacy -msgid "While using our Site, we may ask you to provide us with certain personally identifiable information\n" -" that can be used to contact or identify you. Personally identifiable information may include, but is\n" -" not limited to your name (\"Personal Information\")." -msgstr "" - -#. module: website_legal_page -#: view:website:website.legal -msgid "You can contact us at:" -msgstr "" - -#. module: website_legal_page -#: view:website:website.terms -msgid "Your access to and use of the Service is conditioned on your acceptance of and compliance with\n" -" these Terms. These Terms apply to all visitors, users and others who access or use the Service." -msgstr "" - -#. module: website_legal_page -#: view:website:website.terms -msgid "website (the \"Service\") operated by ​" -msgstr "" - diff --git a/website_legal_page/migrations/10.0.1.0.0/pre-migrate.py b/website_legal_page/migrations/10.0.1.0.0/pre-migrate.py new file mode 100644 index 0000000000..a52aaf5f8d --- /dev/null +++ b/website_legal_page/migrations/10.0.1.0.0/pre-migrate.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 Jairo Llopis +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.rename_xmlids( + env.cr, + ( + ("website.legal", "website_legal_page.advice"), + ("website.privacy", "website_legal_page.privacy-policy"), + ("website.terms", "website_legal_page.terms-of-use"), + ) + ) diff --git a/website_legal_page/tests/__init__.py b/website_legal_page/tests/__init__.py new file mode 100644 index 0000000000..b905e6252c --- /dev/null +++ b/website_legal_page/tests/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import test_controller diff --git a/website_legal_page/tests/test_controller.py b/website_legal_page/tests/test_controller.py new file mode 100644 index 0000000000..a5f5a9b57c --- /dev/null +++ b/website_legal_page/tests/test_controller.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 LasLabs Inc. +# License APL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo.tests.common import HttpCase + + +class TestController(HttpCase): + + def _test_page(self, page, code=200): + response = self.url_open(page) + self.assertEqual(response.getcode(), code) + + def test_unknown(self): + """ It should return a 404 for unknown pages. """ + self._test_page('/legal/no-page', 404) + + def test_privacy(self): + """ It should return a 200 for privacy policy page. """ + self._test_page('/legal/privacy-policy') + + def test_advice(self): + """ It should return a 200 for advice page. """ + self._test_page('/legal/advice') + + def test_tos(self): + """ It should return a 200 for ToS page. """ + self._test_page('/legal/terms-of-use') diff --git a/website_legal_page/views/website_legal.xml b/website_legal_page/views/website_legal.xml index 3d524891cb..1067889527 100644 --- a/website_legal_page/views/website_legal.xml +++ b/website_legal_page/views/website_legal.xml @@ -6,17 +6,17 @@ inherit_id="website.layout_footer_copyright" name="Legal advice Link"> - - Legal advice + - Legal Advice -