event_edit_registration.xml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="view_event_registration_editor_form" model="ir.ui.view">
  4. <field name="name">registration.editor.form</field>
  5. <field name="model">registration.editor</field>
  6. <field name="arch" type="xml">
  7. <form string="Registration">
  8. <field name="seats_available_insufficient" invisible="1"/>
  9. <div class="alert alert-warning m-0" role="alert" attrs="{'invisible': [('seats_available_insufficient', '=', False)]}">
  10. <p class="my-0">
  11. <span>Not enough seats available. All registrations were created as "Unconfirmed" and can be updated later on.</span>
  12. </p>
  13. </div>
  14. <sheet>
  15. <p>Before updating the linked registrations of <field name="sale_order_id" readonly="1" class="oe_inline"/>
  16. please give attendee details.</p>
  17. <field name="event_registration_ids">
  18. <tree string="Registration" editable="top" create="false" delete="false">
  19. <field name="event_id" readonly='1' force_save="1"/>
  20. <field name="registration_id" readonly='1' force_save="1"/>
  21. <field name="event_ticket_id" domain="[('event_id', '=', event_id)]" readonly='1' force_save="1"/>
  22. <field name="name"/>
  23. <field name="email"/>
  24. <field name="mobile" class="o_force_ltr"/>
  25. <field name="phone" class="o_force_ltr"/>
  26. <field name="sale_order_line_id" invisible="1"/>
  27. </tree>
  28. </field>
  29. </sheet>
  30. <footer>
  31. <button string="Create/Update registrations" name="action_make_registration" type="object" class="btn-primary" data-hotkey="q"/>
  32. <button string="Skip" class="btn-secondary" special="cancel" data-hotkey="z"/>
  33. </footer>
  34. </form>
  35. </field>
  36. </record>
  37. <record id="action_sale_order_event_registration" model="ir.actions.act_window">
  38. <field name="name">Event Registrations</field>
  39. <field name="type">ir.actions.act_window</field>
  40. <field name="res_model">registration.editor</field>
  41. <field name="view_mode">form</field>
  42. <field name="view_id" ref="view_event_registration_editor_form"/>
  43. <field name="target">new</field>
  44. <field name="context">{}</field>
  45. </record>
  46. </odoo>