Odoo Help


How to hide this menu item on the frontend for the public user?

Pascal Tremblay
on 6/6/16, 5:00 PM 1,077 views

Hello there,
I had to recreate the public user in one server.

How could I hide this menu item public user - AS when nobody is logged on the website?

Thanks to help. 

use record rule perhaps?

on 6/6/16, 9:33 PM

Prakash Sharma

--Prakash Sharma--
--Prakash Sharma--

I like to surround myself with brave, creative people.

My motivation for learning different technologies and algos drive me. I love challenges of a steep learning curve which I believe makes me a better learner. I have a strong desire to learn different technologies, which would enable me to become a full stack developer.

Prakash Sharma
On 6/7/16, 2:35 AM

you can try this module 


in short just check  request.uid == %(base.public_user)d

<t-if="request.uid == %(base.public_user)d)"> put you code here </t>


Pascal Tremblay

--Pascal Tremblay--
| 5 3 7
Alma, Canada
--Pascal Tremblay--

Pascal Tremblay
On 6/7/16, 1:46 PM

Our answer. hanks everybody.

<template id="layout_iv" inherit_id="website.layout" >

<xpath expr="//li[@class='dropdown']" position="replace">

<t t-if="request.uid != %(base.public_user)d">

<li class="divider" t-ignore="true" t-if="website.user_id != user_id"/>

<li class="dropdown" t-ignore="true" t-if="website.user_id != user_id">

<a href="#" class="dropdown-toggle" data-toggle="dropdown">


<span t-esc="user_id.name"/>

<span class="caret"></span>



<ul class="dropdown-menu js_usermenu" role="menu">

<li><a href="/web" role="menuitem">My Account</a></li>

<li class="divider"/>

<li><a t-attf-href="/web/session/logout?redirect=/" role="menuitem">Logout</a></li>






About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 6/6/16, 5:00 PM
Seen: 1077 times
Last updated: 6/7/16, 1:46 PM