This question has been flagged
5 Replies
12666 Views

while loading my calendar i have the error

 Uncaught TypeError: Cannot read property 'selection' of undefined

my view is

 <record model="ir.ui.view" id="calldata_calendar_view">
       <field name="name">calldata.calendar</field>
       <field name="model">calldata</field>
       <field name="type">calendar</field>
       <field name="arch" type="xml">
        <calendar string="Call details" date_start="Call_start">
           <field name="Dialled_number"  string="Dialled number"/>
       </calendar>
       </field>
       </record>

Any one please help ?

Avatar
Discard

Try to use the editor properly before posting your question your code is not coming properly.

Best Answer

The error is caused by a missing parameter(color) in the calendar tag. The calendar should have at least 2 parameters ie:

<calendar string="Call details" date_start="Call_start" color="Dialled_number">
    <field name="Dialled_number"  string="Dialled number"/> 
</calendar>
Avatar
Discard
Author

@Armand Pontejos Thanks alot :).I spent many hours on this error ,i am very happy that now its solved

Best Answer

Not sure but I think this will help you

    <record model="ir.ui.view" id="calldata_calendar_view">
       <field name="name">calldata.calendar</field>
       <field name="model">your obejct name</field>
       <field name="arch" type="xml">
            <calendar string="Call details" date_start="date_from" date_stop="date_to">
               <field name="Dialled_number"  string="Dialled number"/>
            </calendar>
       </field>
   </record>

    <record model="ir.actions.act_window.view" id="give any name to id">
        <field name="sequence" eval="1"/>
        <field name="view_mode">calendar</field>
        <field name="view_id" ref="calldata_calendar_view"/>
        <field name="act_window_id" ref="your menu id "/>
    </record>

Thanks

Avatar
Discard
Author

I changed code but error still comes

Author Best Answer

My code is <record model="ir.ui.view" id="calldata_calendar_view"> <field name="name">calldata.calendar</field> <field name="model">calldata</field> <field name="type">calendar</field> <field name="arch" type="xml"> <calendar string="Call details" date_start="Call_start"> <field name="Caller" string="Caller"/> </calendar> </field> </record>

Avatar
Discard
Author Best Answer

My code is <record model="ir.ui.view" id="calldata_calendar_view"> <field name="name">calldata.calendar</field> <field name="model">calldata</field> <field name="type">calendar</field> <field name="arch" type="xml"> <calendar string="Call details" date_start="Call_start"> <field name="Caller" string="Caller"/> </calendar> </field> </record>

Avatar
Discard
Best Answer

Not sure but I think

< field name="type">calendar< / field>

is should be replace by:

< field eval="2" name="priority"/ >

has we can see in project_view.xml line 563, I hope that will help you :)

Avatar
Discard
Author

I replaced the code but the issue still not solved :(

I am also have same problem