Odoo Help


How to Open Calendar view in OpenERP 8

Ghanshyam Prajapati
on 4/11/14, 5:01 AM 1,104 views

Hello Everyone,

I need your help,
in my .py file,,

class test_hr(osv.osv):
_name = 'test.hr'
_columns= {
        'name' : fields.char('Name', size=20, readonly=True),
        'user_id': fields.many2one('res.users', 'Users'),
        'from_datetime': fields.datetime('From Datetime'),
        'to_datetime': fields.datetime('To Datetime'),

in view file,

    <record id="view_test_hr_state_calendar" model="ir.ui.view">
        <field name="name">test.hr.calendar</field>
        <field name="model">test.hr</field>
        <field name="arch" type="xml">
            <calendar string="Test Schedule" date_start="from_datetime" date_stop="to_datetime" color="user_id" avatar_model="res.users" display="[name]" mode="day">
                <field name="name"/>
                <field name="user_id"/>
                <field name="from_datetime"/>
                <field name="to_datetime"/>

i created one record, with,

  • user_id = Administrator,
  • from_datetime = '2014-03-01 08:00:00'
  • to_datetime = '2014-03-01 12:00:00'

Now the case is, I have one wizard with date field, when i select date '2014-03-01' and then click on button, it should return calendar view with '2014-03-01' date, and also should display above record in calendar view,

Please help me out,


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

0 follower(s)


Asked: 4/11/14, 5:01 AM
Seen: 1104 times
Last updated: 3/16/15, 8:10 AM