[FIX] broken routes for pages
authorFabien Meghazi <fme@openerp.com>
Wed, 14 May 2014 10:11:24 +0000 (12:11 +0200)
committerFabien Meghazi <fme@openerp.com>
Wed, 14 May 2014 10:11:24 +0000 (12:11 +0200)
addons/website/controllers/main.py
addons/website_crm/controllers/main.py
addons/website_event/controllers/main.py
addons/website_hr/controllers/main.py

index 37d1528..5068d7d 100644 (file)
@@ -49,7 +49,7 @@ class Website(openerp.addons.web.controllers.main.Home):
         # TODO: can't we just put auth=public, ... in web client ?
         return super(Website, self).web_login(*args, **kw)
 
-    @http.route('/page/<page:page>', type='http', auth="public", website=True, multilang=True)
+    @http.route('/page/<path:page>', type='http', auth="public", website=True, multilang=True)
     def page(self, page, **opt):
         values = {
             'path': page,
index e3662ef..e7dc2e7 100644 (file)
@@ -16,7 +16,7 @@ class contactus(http.Controller):
         )
         return url
 
-    @http.route(['/page/website.contactus'], type='http', auth="public", website=True, multilang=True)
+    @http.route(['/page/website.contactus', '/page/contactus'], type='http', auth="public", website=True, multilang=True)
     def contact(self, **kwargs):
         values = {}
         for field in ['description', 'partner_name', 'phone', 'contact_name', 'email_from', 'name']:
index a3df520..3e0a072 100644 (file)
@@ -169,7 +169,7 @@ class website_event(http.Controller):
 
         return request.website.render("website_event.index", values)
 
-    @http.route(['/event/<model("event.event"):event>/page/<page:path>'], type='http', auth="public", website=True, multilang=True)
+    @http.route(['/event/<model("event.event"):event>/page/<path:page>'], type='http', auth="public", website=True, multilang=True)
     def event_page(self, event, page, **post):
         values = {
             'event': event,
index 20c865b..d48dde3 100644 (file)
@@ -5,7 +5,7 @@ from openerp.addons.web.http import request
 
 class website_hr(http.Controller):
 
-    @http.route(['/page/website.aboutus'], type='http', auth="public", website=True, multilang=True)
+    @http.route(['/page/website.aboutus', '/page/aboutus'], type='http', auth="public", website=True, multilang=True)
     def blog(self, **post):
         hr_obj = request.registry['hr.employee']
         employee_ids = hr_obj.search(request.cr, request.uid, [('website_published', '=', True)],