Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
5 Trả lời
14405 Lượt xem

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 ?

Ảnh đại diện
Huỷ bỏ

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

Câu trả lời hay nhất

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>
Ảnh đại diện
Huỷ bỏ
Tác giả

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

Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Tác giả

I changed code but error still comes

Tác giả Câu trả lời hay nhất

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>

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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>

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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 :)

Ảnh đại diện
Huỷ bỏ
Tác giả

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

I am also have same problem

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 4 15
7061
3
thg 6 21
7580
6
thg 9 20
8847
0
thg 3 15
2260
2
thg 3 15
8366