Odoo Help
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
|
etc.
How to define a domain to the attribute color in calendar view ?
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 ?
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
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 ...
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.
RegisterOdoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.
Test it nowQuestion tools
Stats
Asked: 11/30/14, 9:26 AM |
Seen: 2171 times |
Last updated: 3/16/15, 8:10 AM |
You can create an action for this calendar view with a "Domain values"... Eg: [('categ', '!=', False)]