I'm trying to display calendar in Odoo website
Please find my below code:
website_calendar_templates.xml
<template id="header_footer_custom" inherit_id="website.footer_default" name="Footer Events Link"> <xpath expr="//ul[@id='products']" position="inside"> <li><a href="/calendar">Calendar</a></li> </xpath></template><template id="website_calendar_assets_frontend" inherit_id="website.assets_frontend" name="Calendar block assets"> <xpath expr="." position="inside">
<script type="text/javascript" src="/website_calendar/static/lib/date/js/date.js"></script> <script type="text/javascript" src="/website_calendar/static/src/js/website_calendar_block.js"></script> <script type="text/javascript" src="/website_calendar/static/lib/fullcalendar/js/fullcalendar.js"></script> </xpath> </template>
<template id="index" name="calendar">
<t t-call="website.layout"> <div id="wrap">
<div class="oe_structure"/>
<div class="container"> <div class="calendar">
</div></div><div class="oe_structure"/></div> </t></template>
website_calendar_block.js
(function () {//odoo.define('website_calendar.website', function(require) {//"use strict";
'use strict';
var website = openerp.website;
var _t = openerp._t;
website.ready().then(function () { website.if_dom_contains('div.calendar', function ($el) { var $calendar = $el.find('.calendar');
}());
main.py:
class WebsiteCalendarController(http.Controller):
@http.route(['/calendar'], type='http', auth="public", website=True)
def calendar(self ,page=1, **searches):
#return request.redirect("website_calendar.index",values)
return request.render('website_calendar.index', {'values': [""]})
I have added Calendar in Top Menu . when click on calendar In my website page it render the page but doesn't display calendar in website
can anyone please help me to resolve it .
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
3570
Views
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
Publish Calendar on Website
Solved
|
|
1
Jul 20
|
6448 | |
|
0
Dec 24
|
41 | ||
|
0
Dec 24
|
39 | ||
|
2
Sep 24
|
342 | ||
|
1
Oct 24
|
607 |