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 can I change status color in calendar view?

By
venugopal voraganti
on 7/5/15, 4:49 AM 1,066 views

I am getting bit confusion in changing the color of a record based on its status in calendar view. Can anyone help me how can I change the color of status in calendar view?.

1

Axel Mendoza

--Axel Mendoza--
10308
| 7 7 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full time employee trying to understand what to do an how

Reach me at aekroft@gmail.com

Axel Mendoza
On 7/14/15, 12:19 AM

Normally you should define what is the field that define a different color(using the color attribute of calendar tag) based on the values it may have. So in your case if that field is the state field you could do something like this:

<calendar string="Appointments" color="state" date_start="appointment_date" date_delay="duration">
<field name="patient_name"/>
</calendar>


Edited:

For your requirement to manually map your states with a color you will need to extends the widget instance.web_calendar.CalendarView the init function to initialize the object "this.color_map" with your map of values to color


Hey Axel..tq for your reply. I know how to use color attribute but in my case I want to define my own colors like green,red,blue,etc. to 'status' field as we normally to in tree view.

venugopal voraganti
on 7/14/15, 4:16 AM

I edited my answer. This you solve this?

Axel Mendoza
on 7/17/15, 12:30 PM

tq so much Axel..I'll try the way u told.

venugopal voraganti
on 7/26/15, 4:28 AM

solved?

Axel Mendoza
on 12/23/15, 3:19 PM

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

2 follower(s)

Stats

Asked: 7/5/15, 4:49 AM
Seen: 1066 times
Last updated: 7/21/15, 1:35 AM