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?.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
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.
I edited my answer. This you solve this?
tq so much Axel..I'll try the way u told.
solved?
did you solved it? I need the same thing
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
Jun 23
|
2000 | ||
|
1
Apr 21
|
1150 | ||
|
1
Feb 18
|
1675 | ||
|
1
Jan 24
|
316 | ||
|
1
Sep 23
|
528 |