[IMP] base, http_routing, website: allow custom routing rule

After this commit, you will be able (in technical mode) to update the url for
the python controllers.

Eg.
You can now rename /shop in /garden and /shop/product/ in /garden/vegetable/

Most of urls will be replaced at fly in the renderd qweb, with the function
url_for but all old urls will keep available. So if you access url /shop you
will be automatically redirected to /garden (308 Permanent Redirect).

As for cdn and other post-process of att, the automatically replacement in the
rendered qweb is only done when you will be not website editor. But the new
dispatch of URL will be applied in all cases.

For developper, since it is Permanent Redirect, don't forget to clear cache or
open chrome debug tool (with option 'Disable cache while DevTools is Open) to
see your lasts changes.

closes odoo/odoo#36555

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This commit is contained in:
Jeremy Kersten
2019-09-30 13:58:14 +00:00
parent b6b42ef73f
commit be8fc2296b
17 changed files with 349 additions and 143 deletions
+3 -2
View File
@@ -3,8 +3,8 @@ access_website_public,website,website.model_website,,1,0,0,0
access_website_designer,website,website.model_website,group_website_designer,1,1,1,1
access_website_menu,access_website_menu,model_website_menu,,1,0,0,0
access_website_menu_designer,Web Menu Manager,model_website_menu,group_website_designer,1,1,1,1
access_website_redirect,access_website_redirect,model_website_redirect,,1,0,0,0
access_website_redirect_designer,Web Redirect Manager,model_website_redirect,group_website_designer,1,1,1,1
access_website_rewrite,access_website_rewrite,model_website_rewrite,,0,0,0,0
access_website_rewrite_designer,Web Rewrite Manager,model_website_rewrite,group_website_designer,1,1,1,1
access_website_page,access_website_page,model_website_page,,1,0,0,0
access_website_page_designer,Web Page Manager,model_website_page,group_website_designer,1,1,1,1
access_website,web menu manager,website.model_website,group_website_designer,1,1,1,1
@@ -18,3 +18,4 @@ access_website_visitor_lastconnection_designer,access_website_visitor_lastconnec
access_website_visitor_lastconnection_system,access_website_visitor_lastconnection_system,model_website_visitor_lastconnection,base.group_system,1,1,1,1
access_website_track_designer,access_website_track_designer,model_website_track,website.group_website_designer,1,1,1,1
access_website_track_system,access_website_track_system,model_website_track,base.group_system,1,1,1,1
access_website_route_designer,access_website_designer_route,model_website_route,group_website_designer,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
3 access_website_designer website website.model_website group_website_designer 1 1 1 1
4 access_website_menu access_website_menu model_website_menu 1 0 0 0
5 access_website_menu_designer Web Menu Manager model_website_menu group_website_designer 1 1 1 1
6 access_website_redirect access_website_rewrite access_website_redirect access_website_rewrite model_website_redirect model_website_rewrite 1 0 0 0 0
7 access_website_redirect_designer access_website_rewrite_designer Web Redirect Manager Web Rewrite Manager model_website_redirect model_website_rewrite group_website_designer 1 1 1 1
8 access_website_page access_website_page model_website_page 1 0 0 0
9 access_website_page_designer Web Page Manager model_website_page group_website_designer 1 1 1 1
10 access_website web menu manager website.model_website group_website_designer 1 1 1 1
18 access_website_visitor_lastconnection_system access_website_visitor_lastconnection_system model_website_visitor_lastconnection base.group_system 1 1 1 1
19 access_website_track_designer access_website_track_designer model_website_track website.group_website_designer 1 1 1 1
20 access_website_track_system access_website_track_system model_website_track base.group_system 1 1 1 1
21 access_website_route_designer access_website_designer_route model_website_route group_website_designer 1 1 1 1