Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0] [MIG] website_sale_require_login #973

Open
wants to merge 30 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
8c79956
Add module website_sale_require_login.
yajo Nov 2, 2015
ab74794
OCA Transbot updated translations from Transifex
oca-transbot Apr 2, 2016
43fd726
version in website_sale_require_login
Dec 4, 2015
8a803d7
website_sale_require_login: Upgrade to v9 * Migrate website_sale_requ…
lasley Sep 17, 2016
edbde6e
[MIG] website_sale_require_login: Migrated to 10.0
Nov 1, 2016
b129bb7
[FIX] website_sale_require_login: run unittests w/o workflow + PEP8
Sep 28, 2017
4fd92c1
[FIX] website_sale_require_login: name test numbering
Sep 29, 2017
6a1cbe4
[REF] use variables to make it more readable and compatible
KolushovAlexandr Dec 8, 2017
5d75117
[MIG] website_sale_require_login: basic migration v10 to v11
oscarolar Dec 21, 2017
69c20b9
[UPD] Update website_sale_require_login.pot
oca-travis Jun 18, 2018
07ee3de
Added translation using Weblate (German)
Aug 27, 2018
53cee1d
porting website_sale_require_login to 12.0
eLBati Oct 1, 2018
3cbcb46
[UPD] README.rst
OCA-git-bot Oct 6, 2018
e6e39a0
[UPD] Update website_sale_require_login.pot
oca-travis Apr 17, 2019
50f95af
[FIX] website_sale_require_login: Fix public user test
yajo Apr 18, 2019
a8311f4
[UPD] README.rst
OCA-git-bot Jul 29, 2019
1357850
[IMP] website_sale_require_login: black, isort
Tardo Feb 2, 2020
0d98308
[MIG] website_sale_require_login: Migration to 13.0
Tardo Feb 2, 2020
f585957
[IMP] website_sale_require_login: Readme
Tardo Apr 21, 2020
1e7ae4f
[UPD] Update website_sale_require_login.pot
oca-travis Apr 28, 2020
a705293
[IMP] website_sale_require_login: black, isort, prettier
foramaktiv Nov 11, 2020
1eb2e11
[MIG][website_sale_require_login]: Migrate to version 14.0
foramaktiv Nov 11, 2020
a4e8f63
[NEW] block address controler
njeudy Nov 1, 2023
5ff60c4
[FIX] ui test
njeudy Nov 1, 2023
5fdf82d
[UPD] Update website_sale_require_login.pot
Dec 31, 2023
63fda11
[BOT] post-merge updates
OCA-git-bot Dec 31, 2023
cea6356
Update translation files
weblate Dec 31, 2023
44df5a9
[IMP] website_sale_require_login: pre-commit auto fixes
azimkhankuat Oct 2, 2024
d8fa1a1
[MIG] website_sale_require_login: Migration to 17.0
azimkhankuat Oct 2, 2024
5ae0fde
[IMP] website_sale_require_login: test_website_sale_require_login
azimkhankuat Oct 2, 2024
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
108 changes: 108 additions & 0 deletions website_sale_require_login/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
=========================
Require login to checkout
=========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:f4aa5874b86951a397f97b64909f0f3ba4ccac0e7fafc10caeb6f9c70ffcfb90
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/17.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-17-0/e-commerce-17-0-website_sale_require_login
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/e-commerce&target_branch=17.0
:alt: Try me on Runboat

|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 to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/e-commerce/issues/new?body=module:%20website_sale_require_login%0Aversion:%2017.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 <[email protected]>
- Oscar Alcala <[email protected]>
- Lorenzo Battistini <[email protected]>
- Foram Shah <[email protected]>
- `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/17.0/website_sale_require_login>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
5 changes: 5 additions & 0 deletions website_sale_require_login/__init__.py
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
20 changes: 20 additions & 0 deletions website_sale_require_login/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 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": "17.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"],
"assets": {
"web.assets_tests": [
"website_sale_require_login/static/tests/tours/checkout.esm.js",
],
},
"post_init_hook": "post_init_hook",
}
4 changes: 4 additions & 0 deletions website_sale_require_login/controllers/__init__.py
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
16 changes: 16 additions & 0 deletions website_sale_require_login/controllers/main.py
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)
8 changes: 8 additions & 0 deletions website_sale_require_login/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (C) 2020 Alexandre Díaz - Tecnativa S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.tools import config


def post_init_hook(env):
if config["test_enable"] or config["test_file"]:
env.ref("website_sale_require_login.cart").active = False
Empty file.
35 changes: 35 additions & 0 deletions website_sale_require_login/i18n/it.po
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"
#~ ")"
36 changes: 36 additions & 0 deletions website_sale_require_login/i18n/sl.po
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č <[email protected]>, 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č <[email protected]>\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 website_sale_require_login/i18n/website_sale_require_login.pot
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 14.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"
3 changes: 3 additions & 0 deletions website_sale_require_login/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
4 changes: 4 additions & 0 deletions website_sale_require_login/readme/CONFIGURE.md
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*.
8 changes: 8 additions & 0 deletions website_sale_require_login/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- Dave Lasley \<<[email protected]>\>
- Oscar Alcala \<<[email protected]>\>
- Lorenzo Battistini \<<[email protected]>\>
- Foram Shah \<<[email protected]>\>
- [Tecnativa](https://www.tecnativa.com):
- Rafael Blasco
- Jairo Llopis
- Alexandre Diaz
7 changes: 7 additions & 0 deletions website_sale_require_login/readme/DESCRIPTION.md
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*.
5 changes: 5 additions & 0 deletions website_sale_require_login/readme/USAGE.md
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.
Loading
Loading