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
7289 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
5288
3
čvc 23
27241
2
čvn 22
5787
2
zář 21
4744
1
lis 20
8056