跳至內容
選單
此問題已被標幟
1 回覆
7282 瀏覽次數

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
5283
3
7月 23
27223
2
6月 22
5784
2
9月 21
4742
1
11月 20
8050