Odoo Help


How can I change a specific label in a calendar view?

Juan Formoso
on 11/12/14, 6:52 AM 1,678 views

I'm trying to modify a label in a calendar view. This label uses to appear in every calendar view, just below the minicalendar on the right side of the screen. Obviously, the string of the label is different depending on the selected calendar view. In my case, I would like to change the label which appears in the calendar view of the section opportunities (crm). The label is Salesperson. I have located the file which contents the code of the calendar view, but this one is composed by only a few lines:

<!-- CRM Lead Calendar View -->
<record model="ir.ui.view" id="crm_case_calendar_view_leads">
    <field name="name">CRM - Leads Calendar</field>
    <field name="model">crm.lead</field>
    <field name="priority" eval="2"/>
    <field name="arch" type="xml">
        <calendar string="Leads Generation"
            date_start="date_action" color="user_id">
            <field name="name"/>
            <field name="partner_name"/>

And here there are not any Salesperson strings. Where is it?



The label is comes from the attribute "color" of the calendar tag. See the below

<calendar string="Leads Generation"  date_start="date_action" color="user_id">

In the crm.lead "user_id" is labelled with "Salesperson" thats why in calendar view it is appear.

If you want different label then just changed the field of the "color" attribute. It will changed label on calendar view.

I hope it is useful to you.

Thank you! But this case is not the same as other views, because I am not able to modify the string of the color field, how can I do this?

Juan Formoso
on 11/12/14, 9:54 AM

Hi, are you do not want to change the field "user_id" ?

Emipro Technologies Pvt. Ltd.
on 11/12/14, 10:02 AM

if yes then you have two option to achieve your objective. 1) make one field which is fields.function and as like the user_id and set string as your desire and set that fields.function field into color="...." 2) Just inherit crm.lead model and give new defination of user_id field and give new string into .py file.

Emipro Technologies Pvt. Ltd.
on 11/12/14, 10:04 AM

If No then just change the field name into "color" attribute of the calendar tag thats it. like color="xxxx".

Emipro Technologies Pvt. Ltd.
on 11/12/14, 10:05 AM

That's right. Thank you!

Juan Formoso
on 11/12/14, 10:41 AM
Ludo - Neobis
On 11/12/14, 7:29 AM

Isn't the salesperson the same as user_id field on crm leads? I don't know if you can change that easily, for I have not worked with javascript before.

Furthermore, does CRM not override the default calendar JS file from the web_calendar module? If so, you could check that file.

Yes, user_id means salesperson on crm leads and opportunities. Isn't there another way to change the label better than modifying js?

Juan Formoso
on 11/12/14, 9:59 AM

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: 11/12/14, 6:52 AM
Seen: 1678 times
Last updated: 3/16/15, 8:10 AM