跳至内容
菜单
此问题已终结

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!

形象
丢弃
最佳答案

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)



形象
丢弃
相关帖文 回复 查看 活动
2
10月 19
5276
3
7月 23
27206
2
6月 22
5782
2
9月 21
4732
1
11月 20
8045