@ -28,18 +28,18 @@
</xpath>
</xpath>
<xpath expr= "//field[@name='seats_used']" position= "after" >
<xpath expr= "//field[@name='seats_used']" position= "after" >
<field string= "calendar event id" name= "calendar_event_id" />
<field string= "calendar event id" name= "calendar_event_id" invisible= "context.get('booking_event_view')" />
<field name= "online_event" />
<field name= "onthespot_event" />
<field name= "free_participation" />
<field name= "participation_product_id" />
<field name= "recurring_event" />
<field name= "recurring_event_newsletter_id" />
<field name= "find_out_more_link" />
<field name= "online_link" />
<field name= "online_id" />
<field name= "online_password" />
<field name= "online_event" invisible= "context.get('booking_event_view')" />
<field name= "onthespot_event" invisible= "context.get('booking_event_view')" />
<field name= "free_participation" invisible= "context.get('booking_event_view')" />
<field name= "participation_product_id" invisible= "context.get('booking_event_view')" />
<field name= "recurring_event" invisible= "context.get('booking_event_view')" />
<field name= "recurring_event_newsletter_id" invisible= "context.get('booking_event_view')" />
<field name= "find_out_more_link" invisible= "context.get('booking_event_view')" />
<field name= "online_link" invisible= "context.get('booking_event_view')" />
<field name= "online_id" invisible= "context.get('booking_event_view')" />
<field name= "online_password" invisible= "context.get('booking_event_view')" />
</xpath>
</xpath>
<xpath expr= "//field[@name='date_begin']" position= "replace" >
<xpath expr= "//field[@name='date_begin']" position= "replace" >
<field name= "date_begin" />
<field name= "date_begin" />
@ -47,16 +47,66 @@
<xpath expr= "//field[@name='date_end']" position= "replace" >
<xpath expr= "//field[@name='date_end']" position= "replace" >
<field name= "date_end" />
<field name= "date_end" />
</xpath>
</xpath>
<xpath expr= "//field[@name='address_id']" position= "attributes" >
<attribute name= "invisible" > context.get('booking_event_view')</attribute>
</xpath>
<xpath expr= "//field[@name='user_id']" position= "attributes" >
<attribute name= "invisible" > context.get('booking_event_view')</attribute>
</xpath>
</field>
</field>
</record>
</record>
<record id= "act_event_registration_from_event" model= "ir.actions.act_window" >
<field name= "res_model" > event.registration</field>
<field name= "name" > Attendees</field>
<field name= "view_mode" > tree,kanban,form,calendar,graph</field>
<field name= "domain" > [('event_id', '=', active_id)]</field>
<field name= "context" > {'default_event_id': active_id,'booking_view':True}</field>
<field name= "help" type= "html" >
<p class= "o_view_nocontent_smiling_face" >
Create an Attendee
</p>
</field>
</record>
<record id= "act_booking_event_registration_from_event" model= "ir.actions.act_window" >
<field name= "res_model" > event.registration</field>
<field name= "name" > Attendees</field>
<field name= "view_mode" > kanban,tree,form,calendar,graph</field>
<field name= "domain" > [('event_id', '=', active_id)]</field>
<field name= "context" > {'default_event_id': active_id,'booking_view':True}</field>
<field name= "help" type= "html" >
<p class= "o_view_nocontent_smiling_face" >
Create an Attendee
</p>
</field>
</record>
<record id= "kalachakra_event_view_form" model= "ir.ui.view" >
<record id= "kalachakra_event_view_form" model= "ir.ui.view" >
<field name= "name" > event.view.form.inherit.kalachakra</field>
<field name= "name" > event.view.form.inherit.kalachakra</field>
<field name= "model" > event.event</field>
<field name= "model" > event.event</field>
<field name= "inherit_id" ref= "event.view_event_form" />
<field name= "inherit_id" ref= "event.view_event_form" />
<field name= "arch" type= "xml" >
<field name= "arch" type= "xml" >
<xpath expr= "//field[@name='stage_id']" position= "before" >
<xpath expr= "//div[@name='button_box']" position= "replace" >
<div class= "oe_button_box" name= "button_box" attrs= "{'invisible':[('booking_event','=',False)]}" groups= "base.group_user" >
<button name= "%(act_booking_event_registration_from_event)d"
type="action"
context="{'search_default_expected': True,'booking_view':True}"
class="oe_stat_button"
icon="fa-users"
help="Total Registrations for this Event">
<field name= "seats_expected" widget= "statinfo" string= "Attendees" />
</button>
</div>
<div class= "oe_button_box" name= "button_box" attrs= "{'invisible':[('booking_event','=',True)]}" groups= "base.group_user" >
<button name= "%(kalachakra.act_event_registration_from_event)d"
type="action"
context="{'search_default_expected': True,'booking_view':False}"
class="oe_stat_button"
icon="fa-users"
help="Total Registrations for this Event">
<field name= "seats_expected" widget= "statinfo" string= "Attendees" />
</button>
</div>
</xpath>
<xpath expr= "//field[@name='stage_id']" position= "before" >
<button name= "add_event_to_google_agenda" type= "object" attrs= "{'invisible':[('calendar_event_id','!=',False)]}" string= "Add event to google agenda" class= "btn btn-warning" />
<button name= "add_event_to_google_agenda" type= "object" attrs= "{'invisible':[('calendar_event_id','!=',False)]}" string= "Add event to google agenda" class= "btn btn-warning" />
<button name= "remove_event_from_google_agenda" attrs= "{'invisible':[('calendar_event_id','=',False)]}" type= "object" string= "Remove event from google agenda" class= "btn btn-danger" />
<button name= "remove_event_from_google_agenda" attrs= "{'invisible':[('calendar_event_id','=',False)]}" type= "object" string= "Remove event from google agenda" class= "btn btn-danger" />
<button name= "generate_calendar_events" attrs= "{'invisible':[('generated_events','=',False)]}" type= "object" string= "Add all event to google agenda" class= "btn btn-primary" />
<button name= "generate_calendar_events" attrs= "{'invisible':[('generated_events','=',False)]}" type= "object" string= "Add all event to google agenda" class= "btn btn-primary" />
@ -168,4 +218,5 @@
</field>
</field>
</record>
</record>
</odoo>
</odoo>