Odoo Help


Using template in calendar view?

Andrius Laukavičius
on 8/8/14, 2:40 AM 1,174 views

I is possible to use Qweb template in calendar view? I want to modify it a bit, but all I can do is just add new fields to be showed in calendar item, like this - ```field1, field2, field3...```

Is there any better way to customize calendar view, like you can with kanban view by using Qweb templating engine?

For example if I use like this:

        <record model="ir.ui.view" id="view_calendar_service_work_calendar">
            <field name="name">Service Works Calendar</field>
            <field name="model">calendar.service.work</field>
            <field name="priority" eval="1"/>
            <field name="arch" type="xml">
                <calendar string="Service Works" date_start="start_time" color="employee_id" date_stop="end_time" mode="week">
                    <field name="name"/>
                    <field name="employee_id"/>                                     


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


This will throw error:

 Uncaught TypeError: Cannot read property 'type' of undefined 


As a matter of fact, if I use anything other than field tag, it will throw that error. I can't even use div tag. So it seems you can't style calendar at all?


odoo.ma by IBS Group

--odoo.ma by IBS Group--
odoo.ma by IBS Group
| 4 5 8
Tétouan, Morocco
--odoo.ma by IBS Group--

For more informations about IBS, please visit our website at www.ibs-na.com.

For a specific questions, collaboration or help, please send us an email to support@ibs-na.com

odoo.ma by IBS Group
On 8/10/14, 1:31 PM

You cannot have that kind of customization when it comes to the calendar view.

The calendar view is based on this library: http://dhtmlx.com/docs/products/dhtmlxScheduler/

So if you want to modify how it looks, you will have to modify the way Odoo interacts with that library and the way it renders events. You can find it in web_calendar

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 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: 8/8/14, 2:40 AM
Seen: 1174 times
Last updated: 3/16/15, 8:10 AM