Odoo Help


How to define a domain to the attribute color in calendar view ?

on 11/30/14, 9:26 AM 2,240 views


i have a calendar view like the following:

  <calendar  color="categ" date_start="date_debut" date_stop="date_fin" string="organisation salon">
        <field name="sujet"/>    
   categ is many2one fields and i want to define a domain on this field in the calendar view, please any idea ?

You can create an action for this calendar view with a "Domain values"... Eg: [('categ', '!=', False)]

Jérémy Kersten (jke)
on 11/30/14, 4:17 PM

Med Said BARA

--Med Said BARA--

| 5 5 7
--Med Said BARA--
Med Said BARA
On 11/30/14, 10:20 AM

In "Calendar Views" the only supported  attributes are: string, date_start, date_stop, date_delay, dat_lenght, color, and mode.

So i think it's not possible !

But maybe you can switch to "Gantt Views", which have the same attributes, with one additionnal attributes "level".

The level tag can be used to achive your need.



Med Said BARA
on 11/30/14, 10:24 AM

Thanx Med Said, but i need a calendar view not a gantt view

on 11/30/14, 10:26 AM

try using https://www.odoo.com/apps/7.0/super_calendar/

Med Said BARA
on 11/30/14, 10:50 AM

Or just take a look in the super_calendar.py and super_calendar_view.xml code to see how domain is used on a many2one fields ...

Med Said BARA
on 11/30/14, 11:10 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

3 follower(s)


Asked: 11/30/14, 9:26 AM
Seen: 2240 times
Last updated: 3/16/15, 8:10 AM