Odoo Help

Welcome!

This community 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.

0

How to use template in calender view in odoo 9.0?

By
savita
on 6/6/16, 12:46 AM 250 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?

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 6/6/16, 12:46 AM
Seen: 250 times
Last updated: 6/6/16, 1:30 AM