@@ -61,5 +61,18 @@ class Website(openerp.addons.web.controllers.main.Home):
|
||||
def admin(self, *args, **kw):
|
||||
return super(Website, self).index(*args, **kw)
|
||||
|
||||
@http.route('/page/<path:path>', type='http', auth="db")
|
||||
def index(self, **kw):
|
||||
editable = bool(request.session._uid)
|
||||
try:
|
||||
request.session.check_security()
|
||||
except http.SessionExpiredException:
|
||||
editable = False
|
||||
path = kw['path']
|
||||
modules = request.registry.get("ir.ui.view").render(request.cr, 1, path, {})
|
||||
if editable:
|
||||
html = html.replace('<!--editable-->', get_html_head())
|
||||
return html
|
||||
|
||||
|
||||
# vim:expandtab:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<html>
|
||||
<body>
|
||||
<header>This is the header</header>
|
||||
<header>This is the header <t t-esc="1+1"/></header>
|
||||
<div class="main">This is the main content</div>
|
||||
<nav>
|
||||
<ul class="menu_list">
|
||||
@@ -33,10 +33,5 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem name="Test views"
|
||||
id="base.menu_test_view"
|
||||
parent="base.menu_config"
|
||||
sequence="80"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
Reference in New Issue
Block a user