crm_lead_views.xml 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?xml version="1.0"?>
  2. <odoo>
  3. <record id="event_registration_action_from_lead" model="ir.actions.act_window">
  4. <field name="name">Event registrations</field>
  5. <field name="type">ir.actions.act_window</field>
  6. <field name="res_model">event.registration</field>
  7. <field name="view_mode">tree,kanban,form,calendar,graph</field>
  8. <field name="domain">[('lead_ids', '=', active_id)]</field>
  9. <field name="context">{'create': False}</field>
  10. <field name="help" type="html">
  11. <p class="o_view_nocontent_empty_folder">
  12. No registration found
  13. </p>
  14. </field>
  15. </record>
  16. <record id="crm_lead_view_form" model="ir.ui.view">
  17. <field name="name">crm.lead.view.form.inherit.event.crm</field>
  18. <field name="model">crm.lead</field>
  19. <field name="inherit_id" ref="crm.crm_lead_view_form"/>
  20. <field name="arch" type="xml">
  21. <xpath expr="//button[@name='action_schedule_meeting']" position="after">
  22. <field name="registration_ids" invisible="1"/>
  23. <button name="%(event_registration_action_from_lead)d" type="action" class="oe_stat_button" icon="fa-ticket"
  24. attrs="{'invisible': [('registration_count', '=', 0)]}" groups="event.group_event_user">
  25. <div class="o_stat_info">
  26. <field name="registration_count"/>
  27. <span class="o_stat_text"> Attendees</span>
  28. </div>
  29. </button>
  30. </xpath>
  31. </field>
  32. </record>
  33. <record id="crm_lead_action_from_registration" model="ir.actions.act_window">
  34. <field name="name">Leads</field>
  35. <field name="res_model">crm.lead</field>
  36. <field name="view_mode">tree,kanban,graph,pivot,calendar,form,activity</field>
  37. <field name="domain">[('registration_ids', 'in', active_id)]</field>
  38. <field name="context">{'create': False}</field>
  39. <field name="help" type="html">
  40. <p class="o_view_nocontent_empty_folder">
  41. No leads found
  42. </p>
  43. </field>
  44. </record>
  45. <record id="crm_lead_action_from_event" model="ir.actions.act_window">
  46. <field name="name">Leads</field>
  47. <field name="res_model">crm.lead</field>
  48. <field name="view_mode">tree,kanban,graph,pivot,calendar,form,activity</field>
  49. <field name="domain">[('event_id', '=', active_id)]</field>
  50. <field name="context">{'create': False}</field>
  51. <field name="help" type="html">
  52. <p class="o_view_nocontent_empty_folder">
  53. No leads found
  54. </p>
  55. </field>
  56. </record>
  57. </odoo>