Skip to content

Commit

Permalink
[IMP] website_project: remove preprocess_request content; user can th…
Browse files Browse the repository at this point in the history
…e add link with the menu editor

bzr revid: chm@openerp.com-20140423150135-ng1xkiopm2ks3v23
  • Loading branch information
chm@openerp.com committed Apr 23, 2014
1 parent 8ddf7a2 commit 1657ffb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
16 changes: 0 additions & 16 deletions addons/website_project/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,6 @@

from openerp.addons.web import http
from openerp.addons.web.http import request
from openerp.osv import osv


class Website(osv.Model):
_inherit = "website"

def preprocess_request(self, cr, uid, ids, request, context=None):
project_obj = request.registry['project.project']
project_ids = project_obj.search(cr, uid, [('privacy_visibility', "=", "public")], context=request.context)

request.context.update({
'website_project_ids': project_obj.browse(cr, uid, project_ids, context=request.context)
})

return super(Website, self).preprocess_request(cr, uid, ids, request, context=None)


class website_project(http.Controller):

Expand Down
9 changes: 0 additions & 9 deletions addons/website_project/views/website_project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@
<openerp>
<data>

<!-- Layout add nav and footer -->
<template id="footer_custom" inherit_id="website.layout" name="Footer Project's Links">
<xpath expr="//footer//ul[@name='products']" position="inside">
<li t-foreach="website_project_ids" t-as="project">
<a t-attf-href="/project/#{ project.id }"><span t-field="project.name"/></a>
</li>
</xpath>
</template>

<!-- Project -->
<template id="task_kanban_card" name="TaskKanban">
<div class="thumbnail">
Expand Down

0 comments on commit 1657ffb

Please sign in to comment.