Skip to Content
Menu
This question has been flagged
2532 Views

I'am trying to inherit calender in our custom module.otherthen calender functionalities i want to make some changes in calender view.This is possible by using template.but when i try to use template its giving an error.

I followed writing below code in my calender view.

<record model="ir.ui.view" id="event_calendar_view1">

<field name="name">service.advisor.planner</field>

<field name="model">service.advisor.planner</field>

<field name="priority" eval="1"/>

<field name="auto_refresh">1</field>

<field name="arch" type="xml">

    <calendar string="Calendar" date_start="start_date" date_stop="end_date" color="name">

        <field name = "name"/>

        <field name = "start_date"/>

        <field name = "end_date"/>

        <template>

            <t t-name="something"></t>

        </template>

    </calendar>

</field>

</record>

And now iam getting following error when i use this code.

TypeError: self.fields[fieldname] is undefined
http://localhost:8069/web_calendar/static/src/js/web_calendar.js:469
Traceback:
CalendarView<.perform_necessary_name_gets/<@http://localhost:8069/web_calendar/static/src/js/web_calendar.js:469:1
_.forEach@http://localhost:8069/web/static/lib/underscore/underscore.js:145:9
_.mixin/</_.prototype[name]@http://localhost:8069/web/static/lib/underscore/underscore.js:1484:29
CalendarView<.perform_necessary_name_gets@http://localhost:8069/web_calendar/static/src/js/web_calendar.js:467:9
CalendarView<._do_search/this.event_source.events/<@http://localhost:8069/web_calendar/static/src/js/web_calendar.js:830:32
jQuery.Callbacks/fire@http://localhost:8069/web/static/lib/jquery/jquery.js:3119:38
jQuery.Callbacks/self.fireWith@http://localhost:8069/web/static/lib/jquery/jquery.js:3231:49
.Deferred/promise.then/</</<@http://localhost:8069/web/static/lib/jquery/jquery.js:3283:73
jQuery.Callbacks/fire@http://localhost:8069/web/static/lib/jquery/jquery.js:3119:38
jQuery.Callbacks/self.fireWith@http://localhost:8069/web/static/lib/jquery/jquery.js:3231:49
.Deferred/</deferred[tuple[0]]@http://localhost:8069/web/static/lib/jquery/jquery.js:3321:33
jQuery.Callbacks/fire@http://localhost:8069/web/static/lib/jquery/jquery.js:3119:38
jQuery.Callbacks/self.fireWith@http://localhost:8069/web/static/lib/jquery/jquery.js:3231:49
.Deferred/promise.then/</</<@http://localhost:8069/web/static/lib/jquery/jquery.js:3283:73
jQuery.Callbacks/fire@http://localhost:8069/web/static/lib/jquery/jquery.js:3119:38
jQuery.Callbacks/self.fireWith@http://localhost:8069/web/static/lib/jquery/jquery.js:3231:49
.Deferred/promise.then/</</<@http://localhost:8069/web/static/lib/jquery/jquery.js:3283:73
jQuery.Callbacks/fire@http://localhost:8069/web/static/lib/jquery/jquery.js:3119:38
jQuery.Callbacks/self.fireWith@http://localhost:8069/web/static/lib/jquery/jquery.js:3231:49
done@http://localhost:8069/web/static/lib/jquery/jquery.js:9275:33
.send/callback@http://localhost:8069/web/static/lib/jquery/jquery.js:9685:57
How to change the calender view by using template or any other way?
Avatar
Discard