Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
5 Odpowiedzi
14399 Widoki

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 ?

Awatar
Odrzuć

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

Najlepsza odpowiedź

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>
Awatar
Odrzuć
Autor

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

Najlepsza odpowiedź

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

Awatar
Odrzuć
Autor

I changed code but error still comes

Autor Najlepsza odpowiedź

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>

Awatar
Odrzuć
Autor Najlepsza odpowiedź

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>

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Autor

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

I am also have same problem

Powiązane posty Odpowiedzi Widoki Czynność
1
kwi 15
7060
3
cze 21
7580
6
wrz 20
8841
0
mar 15
2260
2
mar 15
8359