-
-
Notifications
You must be signed in to change notification settings - Fork 500
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by pedrobaeza
- Loading branch information
Showing
23 changed files
with
849 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
setup/website_sale_require_login/odoo/addons/website_sale_require_login
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../website_sale_require_login |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import setuptools | ||
|
||
setuptools.setup( | ||
setup_requires=['setuptools-odoo'], | ||
odoo_addon=True, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
========================= | ||
Require login to checkout | ||
========================= | ||
|
||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Beta | ||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fe--commerce-lightgray.png?logo=github | ||
:target: https://github.com/OCA/e-commerce/tree/13.0/website_sale_require_login | ||
:alt: OCA/e-commerce | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/e-commerce-13-0/e-commerce-13-0-website_sale_require_login | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png | ||
:target: https://runbot.odoo-community.org/runbot/113/13.0 | ||
:alt: Try me on Runbot | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module extends the functionality of eCommerce to force users | ||
to login before buying anything in the website and allow you to get rid of | ||
those duplicated entries of returning unauthenticated users. | ||
|
||
If you do not allow external users to sign up, this can serve you to make | ||
checkout available only for those that have a user account, and make some sort | ||
of *members club*. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Configuration | ||
============= | ||
|
||
You probably want to enable any user to sign up: | ||
|
||
* Go to *Settings > General Settings > Website > Customer Account*. | ||
* Enable *Free sign up*. | ||
|
||
Usage | ||
===== | ||
|
||
To use this module, you need to: | ||
|
||
* Log out. | ||
* Try to buy something. | ||
* You will be forced to log in. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/e-commerce/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 <https://github.com/OCA/e-commerce/issues/new?body=module:%20website_sale_require_login%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Authors | ||
~~~~~~~ | ||
|
||
* Tecnativa | ||
* LasLabs | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* Dave Lasley <dave@laslabs.com> | ||
* Oscar Alcala <oscar@vauxoo.com> | ||
* Lorenzo Battistini <lorenzo.battistini@agilebg.com> | ||
* Foram Shah <foram.shah@initos.com> | ||
|
||
* `Tecnativa <https://www.tecnativa.com>`_: | ||
|
||
* Rafael Blasco | ||
* Jairo Llopis | ||
* Alexandre Diaz | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
This module is maintained by the OCA. | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
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. | ||
|
||
This module is part of the `OCA/e-commerce <https://github.com/OCA/e-commerce/tree/13.0/website_sale_require_login>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Copyright 2015 Antiun Ingeniería, S.L. - Jairo Llopis | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from . import controllers | ||
from .hooks import post_init_hook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright 2015 Antiun Ingeniería, S.L. - Jairo Llopis | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
{ | ||
"name": "Require login to checkout", | ||
"summary": "Force users to login for buying", | ||
"version": "14.0.1.0.0", | ||
"category": "Website", | ||
"website": "https://github.com/OCA/e-commerce", | ||
"author": "Tecnativa, " "LasLabs, " "Odoo Community Association (OCA)", | ||
"license": "AGPL-3", | ||
"installable": True, | ||
"depends": ["website_sale_suggest_create_account", "web_tour"], | ||
"data": ["views/website_sale.xml", "views/assets.xml"], | ||
"post_init_hook": "post_init_hook", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# © 2015 Antiun Ingeniería, S.L. - Jairo Llopis | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from . import main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright 2015 Antiun Ingeniería, S.L. - Jairo Llopis | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from odoo import http | ||
|
||
from odoo.addons.website_sale.controllers.main import WebsiteSale | ||
|
||
|
||
class RequireLoginToCheckout(WebsiteSale): | ||
@http.route(auth="user") | ||
def checkout(self, **post): | ||
return super().checkout(**post) | ||
|
||
@http.route(auth="user") | ||
def address(self, **post): | ||
return super().address(**post) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Copyright (C) 2020 Alexandre Díaz - Tecnativa S.L. | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
from odoo import SUPERUSER_ID, api | ||
from odoo.tools import config | ||
|
||
|
||
def post_init_hook(cr, registry): | ||
if config["test_enable"] or config["test_file"]: | ||
with api.Environment.manage(): | ||
env = api.Environment(cr, SUPERUSER_ID, {}) | ||
env.ref("website_sale_require_login.cart").active = False | ||
env.ref("website_sale_require_login.short_cart_summary").active = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 11.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"Last-Translator: Automatically generated\n" | ||
"Language-Team: none\n" | ||
"Language: de\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: nplurals=2; plural=n != 1;\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * website_sale_require_login | ||
# | ||
# Translators: | ||
# Paolo Valier, 2016 | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: e-commerce (8.0)\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2016-05-06 13:06+0000\n" | ||
"PO-Revision-Date: 2016-05-01 08:33+0000\n" | ||
"Last-Translator: Paolo Valier\n" | ||
"Language-Team: Italian (http://www.transifex.com/oca/OCA-e-commerce-8-0/" | ||
"language/it/)\n" | ||
"Language: it\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" | ||
|
||
#~ msgid "" | ||
#~ "(\n" | ||
#~ " user_id != website.user_id and\n" | ||
#~ " not optional_products and\n" | ||
#~ " website_sale_order and\n" | ||
#~ " website_sale_order.website_order_line\n" | ||
#~ " )" | ||
#~ msgstr "" | ||
#~ "(\n" | ||
#~ "user_id != website.user_id and\n" | ||
#~ "not optional_products and\n" | ||
#~ "website_sale_order and\n" | ||
#~ "website_sale_order.website_order_line\n" | ||
#~ ")" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * website_sale_require_login | ||
# | ||
# Translators: | ||
# Matjaž Mozetič <m.mozetic@matmoz.si>, 2016 | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: e-commerce (8.0)\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2016-03-29 10:29+0000\n" | ||
"PO-Revision-Date: 2016-04-01 04:55+0000\n" | ||
"Last-Translator: Matjaž Mozetič <m.mozetic@matmoz.si>\n" | ||
"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-e-commerce-8-0/" | ||
"language/sl/)\n" | ||
"Language: sl\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" | ||
"%100==4 ? 2 : 3);\n" | ||
|
||
#~ msgid "" | ||
#~ "(\n" | ||
#~ " user_id != website.user_id and\n" | ||
#~ " not optional_products and\n" | ||
#~ " website_sale_order and\n" | ||
#~ " website_sale_order.website_order_line\n" | ||
#~ " )" | ||
#~ msgstr "" | ||
#~ "(\n" | ||
#~ " user_id != website.user_id and\n" | ||
#~ " not optional_products and\n" | ||
#~ " website_sale_order and\n" | ||
#~ " website_sale_order.website_order_line\n" | ||
#~ " )" |
13 changes: 13 additions & 0 deletions
13
website_sale_require_login/i18n/website_sale_require_login.pot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 13.0\n" | ||
"Report-Msgid-Bugs-To: \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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
You probably want to enable any user to sign up: | ||
|
||
* Go to *Settings > General Settings > Website > Customer Account*. | ||
* Enable *Free sign up*. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
* Dave Lasley <dave@laslabs.com> | ||
* Oscar Alcala <oscar@vauxoo.com> | ||
* Lorenzo Battistini <lorenzo.battistini@agilebg.com> | ||
* Foram Shah <foram.shah@initos.com> | ||
|
||
* `Tecnativa <https://www.tecnativa.com>`_: | ||
|
||
* Rafael Blasco | ||
* Jairo Llopis | ||
* Alexandre Diaz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
This module extends the functionality of eCommerce to force users | ||
to login before buying anything in the website and allow you to get rid of | ||
those duplicated entries of returning unauthenticated users. | ||
|
||
If you do not allow external users to sign up, this can serve you to make | ||
checkout available only for those that have a user account, and make some sort | ||
of *members club*. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
To use this module, you need to: | ||
|
||
* Log out. | ||
* Try to buy something. | ||
* You will be forced to log in. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.