Hello Community,
I have installed website_event module in Odoo12. Add I want that when company login then it should not visible for him. and if an individual(person) visible then event menu should visible. means it's work on Contact(partner) company_type field. I already asked a person or company information during the sign-up process. So, Anyone can suggest me a solution to my problem. Also, I override a website_event template where I want to apply this logic, which is below
<template id="website_event.index" name="Events22">
<t t-call="website.layout">
<div id="wrap">
.
.
.
</div>
</t>
</template>
Also Controller python Method:
@http.route(['/event', '/event/page/<int:page>', '/events', '/events/page/<int:page>'], type='http', auth="public",
website=True, sitemap=sitemap_event)
def events(self, page=1, **searches):
partner = request.env.user.partner_id
Event = request.env['event.event']
.
.
.
return request.render("website_event.index", values)
Thanks in advance