Skip to Content
Menu
This question has been flagged
1 Reply
3058 Views

This is my code..bt i didn't get any view in my model..is there any issue with my code..pls help me in this quickly

<record id="view_calendar_booking_info" model="ir.ui.view">
<field name="name">booking.info.calender</field>
<field name="model">booking.info</field>
<field name="arch" type="xml">
<calendar string="booking.info.calender" color="selected_book" date_start="booking_date" date_stop="return_da" avatar_model="res.users" display="[username]" mode="week">
<!-- Fields used for the display text -->
<field name="selected_book" />
</calendar>
</field>
</record>

Avatar
Discard
Best Answer

Hi,

Did you added the calender in the view mode of the action of the corresponding menu ? If not add it.

sample,

<record id="action_invoice_tree" model="ir.actions.act_window">
<field name="name">Invoices</field>
<field name="res_model">account.invoice</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar,graph</field>
<field name="view_id" ref="invoice_tree"/>
<field name="context">{'type':'out_invoice'}</field>
<field name="search_view_id" ref="view_account_invoice_filter"/>
</record>

Nb : didn't checked is there anything wrong in your code.

Thanks

Avatar
Discard
Author

i have already added it in the action page..but no changes in the view..

This is my action page code

<record id="open_booking_info_action" model="ir.actions.act_window">

<field name="name">Booking Info</field>

<field name="res_model">booking.info</field>

<field name="view_type">form</field>

<field name="view_mode">tree,calender,form</field>

</record>

Author

Is that necessary to add these code in action page for calender view<field name="view_id" ref="invoice_tree"/>

<field name="context">{'type':'out_invoice'}</field>

<field name="search_view_id" ref="view_account_invoice_filter"/>

if needs could you please explain the needs of those three fields