Odoo v8 中的路由页面



尝试在Odoo8中路由类似页面时收到错误404:

class vips_salepage(http.Controller):
@http.route('/salepage/<filialpage>', type='http', auth="public", website=True)
def page(self, filialpage, **kw):
cr, uid, context, registry = request.cr, request.uid, request.context, request.registry
# here my code
return http.request.render('vips_shop.indexpage2', result)
@http.route('/salepage/', type='http', auth="public", website=True)
def page(self, **kw):
cr, uid, context, registry = request.cr, request.uid, request.context, request.registry
# here my code
return http.request.render('vips_shop.filial_list_page', result)

页面/销售页面/成功显示。

当我尝试获取/salepage/filialname时,我收到404错误。

如果我删除

@http.route('/salepage/', type='http', auth="public", website=True)
def page(self, **kw):
cr, uid, context, registry = request.cr, request.uid, request.context, request.registry
# here my code
return http.request.render('vips_shop.filial_list_page', result)

/销售页面/孝顺名称显示正常!

在Odoov9中,在Odoov8中一切正常,我不能同时使用两条路线。

为什么会这样?

问题已成功解决。 不同路由下同一方法名称错误

最新更新