Openerp 如何限制使用Odoo访问网页?

Openerp 如何限制使用Odoo访问网页?,openerp,odoo-8,Openerp,Odoo 8,我想用odoo限制对网页的访问。然后,public可以访问/page-1,但只有连接的用户才能访问/page-2。 默认情况下似乎不可能,但您知道模块是否提供了这种功能? 谢谢在为第2页创建路由方法时,您应该使用auth=“user” 例如: @http.route('/page-2',type='http',auth='user',website=True) def页面_2(自身,**kwargs): //您的代码..在为第2页创建路由方法时,应使用auth=“user” 例如: @http.

我想用odoo限制对网页的访问。然后,public可以访问/page-1,但只有连接的用户才能访问/page-2。 默认情况下似乎不可能,但您知道模块是否提供了这种功能? 谢谢

在为第2页创建路由方法时,您应该使用auth=“user” 例如:

@http.route('/page-2',type='http',auth='user',website=True) def页面_2(自身,**kwargs):
//您的代码..

在为第2页创建路由方法时,应使用auth=“user” 例如:

@http.route('/page-2',type='http',auth='user',website=True) def页面_2(自身,**kwargs):

//您的代码..

当我搜索“odoo restrict access”时,似乎有很多信息,没有任何帮助吗?当我搜索“odoo restrict access”时,似乎有很多信息,没有任何帮助吗?您是对的@techsavy,但我需要动态设置它,我无法在每次创建新页面时创建新方法:(@billyJoe您可以对动态页面使用一种方法。@http.route(['/shop/page/','/shop/category//page/',type='http',auth=“user”,website=True)def shop(self,page=0,category=None,search='',**post):@billyJoe只需在模板视图中添加安全组,并添加您想要访问该特定页面的用户。您是对的@techsavy,但我需要动态设置,我无法在每次创建新页面时创建新方法:(@billyJoe您可以对动态页面使用一种方法。@http.route(['/shop/page/','/shop/category//page/'],type='http',auth=“user”,website=True)def shop(self,page=0,category=None,search='',**post):@billyJoe只需在模板视图中添加安全组,并添加要访问该特定页面的用户。