Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
7459 Zobrazení

Hi,

I need a means to force user registration / login before a user is able to checkout in the eCommerce module. I've found some entry points on the topic for older Odoo versions but I need a solution for 10.

Help greatly appreciated!

Avatar
Zrušit
Nejlepší odpověď

Hi,


Add a controller to change access

from odoo.addons.website_sale.controllers.main import WebsiteSale
from odoo import http

class SaleController(WebsiteSale):
    @http.route(auth='user')
    def checkout(self, **post):
         #the user is logged in to checkout
        return super(SaleController, self).checkout(**post)



Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
říj 19
5490
3
čvc 23
27861
2
čvn 22
6089
2
zář 21
5215
1
lis 20
8481