Skip to Content
Menu
This question has been flagged
1 Odpoveď
7433 Zobrazenia

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šiť
Best Answer

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šiť
Related Posts Replies Zobrazenia Aktivita
2
okt 19
5480
3
júl 23
27830
2
jún 22
6067
2
sep 21
5190
1
nov 20
8461