event_event_add.xml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="event_event_view_form_add" model="ir.ui.view">
  4. <field name="name">event.event.view.form.add</field>
  5. <field name="model">event.event</field>
  6. <field name="arch" type="xml">
  7. <form js_class="website_new_content_form">
  8. <group>
  9. <field name="website_url" invisible="1"/>
  10. <field name="company_id" invisible="1"/>
  11. <field name="name" placeholder="e.g. &quot;Conference for Architects&quot;" string="Event Name"/>
  12. <field name="address_id" context="{'show_address': 1}" options='{"always_reload": True}'/>
  13. <label for="date_begin" string="Start &#8594; End"/>
  14. <div class="o_row w-100">
  15. <field name="date_begin" widget="daterange" nolabel="1" options="{'related_end_date': 'date_end'}"/>
  16. <i class="fa fa-long-arrow-right mx-2" aria-label="Arrow icon" title="Arrow"/>
  17. <field name="date_end" widget="daterange" nolabel="1" options="{'related_start_date': 'date_begin'}"/>
  18. </div>
  19. </group>
  20. </form>
  21. </field>
  22. </record>
  23. <record id="event_event_action_add" model="ir.actions.act_window">
  24. <field name="name">New Event</field>
  25. <field name="res_model">event.event</field>
  26. <field name="view_mode">form</field>
  27. <field name="target">new</field>
  28. <field name="view_id" ref="event_event_view_form_add"/>
  29. <field name="context">{'default_address_id': False}</field>
  30. </record>
  31. </odoo>