event_lead_rule_views.xml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <data>
  4. <record id="event_lead_rule_view_search" model="ir.ui.view">
  5. <field name="name">event.lead.rule.view.search</field>
  6. <field name="model">event.lead.rule</field>
  7. <field name="arch" type="xml">
  8. <search string="Search Lead Generation Rules">
  9. <field name="name" string="Name"/>
  10. <separator/>
  11. <filter string="Archived" name="filter_inactive" domain="[('active', '=', False)]"/>
  12. <filter string="Creation Type" name="filter_lead_creation_basis" context="{'group_by': 'lead_creation_basis'}"/>
  13. <filter string="Trigger Type" name="filter_lead_creation_trigger" context="{'group_by': 'lead_creation_trigger'}"/>
  14. </search>
  15. </field>
  16. </record>
  17. <record id="event_lead_rule_view_tree" model="ir.ui.view">
  18. <field name="name">event.lead.rule.view.tree</field>
  19. <field name="model">event.lead.rule</field>
  20. <field name="arch" type="xml">
  21. <tree string="Lead Generation Rules">
  22. <field name="name"/>
  23. <field name="lead_creation_basis" string="Lead Creation Type" invisible="1"/>
  24. <field name="lead_creation_trigger"/>
  25. <field name="event_type_ids" widget="many2many_tags"/>
  26. <field name="event_id"/>
  27. <field name="company_id" groups="base.group_multi_company"/>
  28. </tree>
  29. </field>
  30. </record>
  31. <record id="event_lead_rule_view_form" model="ir.ui.view">
  32. <field name="name">event.lead.rule.view.form</field>
  33. <field name="model">event.lead.rule</field>
  34. <field name="arch" type="xml">
  35. <form string="Lead Generation Rule">
  36. <sheet>
  37. <widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
  38. <div class="oe_title">
  39. <label for="name"/>
  40. <h1><field name="name" placeholder="e.g. B2B Fairs"/></h1>
  41. </div>
  42. <field name="active" invisible="1"/>
  43. <field name="company_id" invisible="1"/>
  44. <group name="lead_creation_configuration">
  45. <group name="lead_creation_basis" invisible="1">
  46. <field name="lead_creation_basis" widget="radio"/>
  47. </group>
  48. <group>
  49. <field name="lead_creation_trigger" widget="radio"/>
  50. </group>
  51. </group>
  52. <group string="For any of these Events">
  53. <group>
  54. <field name="event_type_ids" widget="many2many_tags"/>
  55. <field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
  56. </group>
  57. <group>
  58. <field name="event_id" options="{'no_create': True}"/>
  59. </group>
  60. </group>
  61. <group string="If the Attendees meet these Conditions">
  62. <field name="event_registration_filter" widget="domain" options="{'model': 'event.registration'}" nolabel="1" colspan="2"/>
  63. </group>
  64. <group string="Lead Default Values">
  65. <group class="col">
  66. <field name="lead_type" groups="crm.group_use_lead"/>
  67. <field name="lead_sales_team_id"/>
  68. <field name="lead_user_id"/>
  69. </group>
  70. <group class="col">
  71. <field name="lead_tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
  72. </group>
  73. </group>
  74. </sheet>
  75. </form>
  76. </field>
  77. </record>
  78. <record id="event_lead_rule_action" model="ir.actions.act_window">
  79. <field name="name">Lead Generation Rule</field>
  80. <field name="type">ir.actions.act_window</field>
  81. <field name="res_model">event.lead.rule</field>
  82. <field name="view_mode">tree,form</field>
  83. <field name="help" type="html">
  84. <p class="o_view_nocontent_smiling_face">Create a Lead Generation Rule</p>
  85. <p>Those automatically create leads when attendees register.</p>
  86. </field>
  87. </record>
  88. <menuitem name="Lead Generation"
  89. id="event_lead_rule_menu"
  90. action="event_lead_rule_action"
  91. parent="event.menu_event_configuration"
  92. sequence="10"
  93. groups="event.group_event_manager"/>
  94. </data>
  95. </odoo>