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

Uncaught TypeError: Cannot read property 'selection' of undefined ? [Closed]

By
Anuradha
on 9/7/13, 9:08 AM 3,921 views

The Question has been closed for reason: duplicate question

by
Daniel Reis
on 09/23/2013 05:38:16
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 ?
1

Jagdish Panchal

--Jagdish Panchal--
2674
| 5 3 6
Gandhinagar, India
--Jagdish Panchal--

OpenERP Developer

Jagdish Panchal
On 9/10/13, 2:43 AM

This will help you

     <record id="a_abc_view" model="ir.ui.view">
        <field name="name">a.abc.form</field>
        <field name="model">a.abc</field>
        <field name="arch" type="xml">
            <form string="Test" version="7.0">
                <group cols="2">
                    <field name="field_1" />
                    <field name="field_1" />
                    <field name="date" />
                    <field name="dialled_number"  string="Dialled number"/>
                </group>
            </form>
        </field>
    </record>

   <record id="test_serarch" model="ir.ui.view">
        <field name="name">Test Search</field>
        <field name="model">a.abc</field>
        <field name="arch" type="xml">
            <search string="Test  Search">
                <field name="field_1" />
                <field name="field_1"/>
            </search>
        </field>
    </record>

    <record model="ir.ui.view" id="calldata_calendar_view">
       <field name="name">a.abc</field>
       <field name="model">a.abc</field>
       <field name="priority" eval="2"/>
       <field name="arch" type="xml">
            <calendar string="Call details" date_start="date">
                <field name="field_1"/>
                <field name="dialled_number"  string="Dialled number"/>
            </calendar>

       </field>
   </record>


<record model="ir.actions.act_window" id="test_abc_1">
    <field name="name">Test</field>
    <field name="res_model">a.abc</field>
    <field name="view_type">form</field>
    <field name="view_mode">form,calendar</field>
    <field name="view_id" eval="False"/>
    <field name="search_view_id" ref="test_serarch"/>
</record>

  <menuitem  action="test_abc_1" sequence="3" id="test_abc_1_02" parent="Your menu id where u want put this one" />

    <record model="ir.actions.act_window.view" id="test_id">
        <field name="name">Test</field>
        <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="test_abc_1_02"/>
    </record>
0
Bem P
On 9/23/13, 4:07 AM

Hi I had the same problem, 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>

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 9/7/13, 9:08 AM
Seen: 3921 times
Last updated: 3/16/15, 8:10 AM