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 define a domain to the attribute color in calendar view ?

By
kaisusr
on 11/30/14, 9:26 AM 1,397 views

Hello,

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"/>    
  </calendar>
   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
0

Med Said BARA

--Med Said BARA--
2664
| 5 5 7
Algeria
--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.

 

http://openerp-server.readthedocs.org/en/latest/03_module_dev_03.html#calendar-views

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

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

kaisusr
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

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

3 follower(s)

Stats

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