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 customize the calendar view ?

By
Axel Sabotier
on 4/23/14, 5:00 AM 1,437 views

On OpenERP 7, I want to add the location of the events in the calendar view (in addition to the date, the name and the name of the responsible of the event). So, I'm editing this file of the "web_calendar" module : "static/src/js/calendar.js".

From this file, I can access to any table of the database. This line display a list of users in the console :

new instance.web.Model('res.users').query(['login']).all().done(
        function(test_table){
            console.log(test_table);
        });

But I can't access to the "calendar.event" table, I get an empty variable.

new instance.web.Model('calendar.event').query(['location']).all().done(
            function(test_table){
                console.log(test_table);
            });

"calendar.event" and its field "location" are available. Otherwise, when I try with a table which doesn't exist, I get 'Object "table.random" doesn't exist'.
I have add some events in my calendar, so I don't think it could be because of an empty database.

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

0 follower(s)

Stats

Asked: 4/23/14, 5:00 AM
Seen: 1437 times
Last updated: 3/16/15, 8:10 AM