projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a360bc3
)
[FIX] redirect /page/website.xyz --> /page/xyz. Currently 302 but fme will convert...
author
Fabien Pinckaers
<fp@openerp.com>
Tue, 26 Aug 2014 08:29:18 +0000
(10:29 +0200)
committer
Fabien Pinckaers
<fp@openerp.com>
Tue, 26 Aug 2014 08:29:18 +0000
(10:29 +0200)
addons/website/controllers/main.py
patch
|
blob
|
history
diff --git
a/addons/website/controllers/main.py
b/addons/website/controllers/main.py
index
f8cb81b
..
28194a6
100644
(file)
--- a/
addons/website/controllers/main.py
+++ b/
addons/website/controllers/main.py
@@
-56,8
+56,10
@@
class Website(openerp.addons.web.controllers.main.Home):
values = {
'path': page,
}
- # allow shortcut for /page/<website_xml_id>
- if '.' not in page:
+ # /page/website.XXX --> /page/XXX
+ if page.startswith('website.'):
+ return request.redirect('/page/'+page[8:])
+ elif '.' not in page:
page = 'website.%s' % page
try: