event_track_views.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. <?xml version="1.0"?>
  2. <odoo>
  3. <record id="website_visitor_action_from_track" model="ir.actions.act_window">
  4. <field name="name">Visitors Wishlist</field>
  5. <field name="res_model">website.visitor</field>
  6. <field name="view_mode">kanban,tree,form,graph</field>
  7. <field name="domain">[('event_track_wishlisted_ids', 'in', [active_id])]</field>
  8. <field name="help" type="html">
  9. <p class="o_view_nocontent_smiling_face">
  10. Wait for visitors to add this track to their list of favorites
  11. </p>
  12. </field>
  13. </record>
  14. <record id="event_track_view_form_quick_create" model="ir.ui.view">
  15. <field name="name">event.track.view.form.quick.create</field>
  16. <field name="model">event.track</field>
  17. <field name="priority">1000</field>
  18. <field name="arch" type="xml">
  19. <form>
  20. <group>
  21. <field name="event_id" invisible="context.get('default_event_id', False)"/>
  22. <field name="name" placeholder="e.g. Inspiring Business Talk"/>
  23. <field name="date"/>
  24. </group>
  25. </form>
  26. </field>
  27. </record>
  28. <record model="ir.ui.view" id="view_event_track_kanban">
  29. <field name="name">event.track.kanban</field>
  30. <field name="model">event.track</field>
  31. <field name="arch" type="xml">
  32. <kanban default_group_by="stage_id" quick_create_view="website_event_track.event_track_view_form_quick_create">
  33. <field name="color"/>
  34. <field name="partner_id"/>
  35. <field name="stage_id" options='{"group_by_tooltip": {"description": "Description"}}'/>
  36. <field name="website_url"/>
  37. <field name="activity_ids"/>
  38. <field name="activity_state"/>
  39. <field name="legend_blocked"/>
  40. <field name="legend_normal"/>
  41. <field name="legend_done"/>
  42. <templates>
  43. <progressbar field="kanban_state" colors='{"done": "success", "blocked": "danger"}'/>
  44. <t t-name="kanban-box">
  45. <div t-attf-class="{{!selection_mode ? 'oe_kanban_color_' + kanban_getcolor(record.color.raw_value) : ''}} oe_kanban_card oe_kanban_global_click">
  46. <div class="o_dropdown_kanban dropdown" groups="base.group_user">
  47. <a role="button" class="dropdown-toggle o-no-caret btn" data-bs-toggle="dropdown" href="#" aria-label="Dropdown menu" title="Dropdown menu">
  48. <span class="fa fa-ellipsis-v"/>
  49. </a>
  50. <div class="dropdown-menu" role="menu">
  51. <a role="menuitem" t-att-href="record.website_url.value" class="dropdown-item">View Track</a>
  52. <t t-if="widget.editable"><a role="menuitem" type="edit" class="dropdown-item">Edit Track</a></t>
  53. <t t-if="widget.deletable"><a role="menuitem" type="delete" class="dropdown-item">Delete</a></t>
  54. <ul class="oe_kanban_colorpicker" data-field="color"/>
  55. </div>
  56. </div>
  57. <div class="oe_kanban_content">
  58. <div class="o_kanban_record_top">
  59. <h4 class="o_kanban_record_title"><field name="name"/></h4>
  60. </div>
  61. <div class="o_kanban_record_body">
  62. <t t-if="duration"><field name="duration" widget="float_time"/> hours</t>
  63. <field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
  64. </div>
  65. <div class="o_kanban_record_bottom">
  66. <div class="oe_kanban_bottom_left">
  67. <field name="priority" widget="priority"/>
  68. <field name="activity_ids" widget="kanban_activity"/>
  69. </div>
  70. <div class="oe_kanban_bottom_right">
  71. <field name="kanban_state" widget="state_selection" groups="base.group_user"/>
  72. <img t-att-src="kanban_image('res.partner', 'avatar_128', record.partner_id.raw_value)"
  73. t-att-title="record.partner_id.value" t-att-alt="record.partner_id.value"
  74. class="oe_kanban_avatar"/>
  75. </div>
  76. </div>
  77. </div>
  78. </div>
  79. </t>
  80. </templates>
  81. </kanban>
  82. </field>
  83. </record>
  84. <record id="view_event_track_calendar" model="ir.ui.view">
  85. <field name="name">event.track.calendar</field>
  86. <field name="model">event.track</field>
  87. <field eval="2" name="priority"/>
  88. <field name="arch" type="xml">
  89. <calendar date_start="date" date_delay="duration" string="Event Tracks" color="location_id" event_limit="5">
  90. <field name="location_id" filters="1"/>
  91. <field name="event_id"/>
  92. <field name="partner_id" avatar_field="avatar_128"/>
  93. <field name="user_id" avatar_field="avatar_128"/>
  94. </calendar>
  95. </field>
  96. </record>
  97. <record model="ir.ui.view" id="view_event_track_search">
  98. <field name="name">event.track.search</field>
  99. <field name="model">event.track</field>
  100. <field name="arch" type="xml">
  101. <search string="Event Tracks">
  102. <field name="name"/>
  103. <field name="tag_ids"/>
  104. <field name="event_id"/>
  105. <field name="location_id"/>
  106. <field name="stage_id"/>
  107. <field name="partner_id"/>
  108. <filter string="My Tracks" name="my_tracks" domain="[('user_id', '=', uid)]"/>
  109. <separator/>
  110. <filter string="Published" name="filter_published" domain="[('website_published', '=', True)]"/>
  111. <separator/>
  112. <filter string="Unread Messages" name="message_needaction" domain="[('message_needaction', '=', True)]"/>
  113. <separator/>
  114. <filter string="Always Wishlisted" name="filter_wishlisted_by_default" domain="[('wishlisted_by_default', '=', True)]"/>
  115. <separator/>
  116. <filter name="filter_date" date="date"/>
  117. <separator/>
  118. <filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
  119. <separator/>
  120. <filter invisible="1" string="Late Activities" name="activities_overdue"
  121. domain="[('my_activity_date_deadline', '&lt;', context_today().strftime('%Y-%m-%d'))]"
  122. help="Show all records which has next action date is before today"/>
  123. <filter invisible="1" string="Today Activities" name="activities_today"
  124. domain="[('my_activity_date_deadline', '=', context_today().strftime('%Y-%m-%d'))]"/>
  125. <filter invisible="1" string="Future Activities" name="activities_upcoming_all"
  126. domain="[('my_activity_date_deadline', '&gt;', context_today().strftime('%Y-%m-%d'))]"/>
  127. <group expand="0" string="Group By">
  128. <filter string="Responsible" name="responsible" context="{'group_by': 'user_id'}"/>
  129. <filter string="Stage" name="stage" context="{'group_by': 'stage_id'}"/>
  130. <filter string="Date" name="date" context="{'group_by': 'date'}"/>
  131. <filter string="Event" name="event" context="{'group_by': 'event_id'}"/>
  132. <filter string="Location" name="location" context="{'group_by': 'location_id'}"/>
  133. </group>
  134. </search>
  135. </field>
  136. </record>
  137. <record model="ir.ui.view" id="view_event_track_form">
  138. <field name="name">event.track.form</field>
  139. <field name="model">event.track</field>
  140. <field name="arch" type="xml">
  141. <form string="Event Track">
  142. <header>
  143. <field name="stage_id" widget="statusbar" options="{'clickable': '1'}"/>
  144. </header>
  145. <sheet string="Track">
  146. <div class="oe_button_box" name="button_box">
  147. <field name="website_url" invisible="1"/>
  148. <button name="%(website_event_track.website_visitor_action_from_track)d"
  149. type="action"
  150. class="oe_stat_button"
  151. icon="fa-bell"
  152. groups="event.group_event_user">
  153. <field name="wishlist_visitor_count" string="Wishlisted By" widget="statinfo"/>
  154. </button>
  155. <field name="is_published" widget="website_redirect_button"/>
  156. </div>
  157. <field name="legend_blocked" invisible="1"/>
  158. <field name="legend_normal" invisible="1"/>
  159. <field name="legend_done" invisible="1"/>
  160. <widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
  161. <div class="d-flex gap-4 mb-3">
  162. <div class="flex-grow-1">
  163. <label for="name"/>
  164. <h1>
  165. <field name="name" placeholder="e.g. Inspiring Business Talk"/>
  166. </h1>
  167. </div>
  168. <field name="website_image" widget="image" class="oe_avatar"/>
  169. <field name="kanban_state" widget="state_selection"/>
  170. </div>
  171. <group>
  172. <group>
  173. <field name="date"/>
  174. <field name="location_id"/>
  175. <label for="duration"/>
  176. <div class="o_row">
  177. <field name="duration" widget="float_time"/>
  178. <span>hours</span>
  179. </div>
  180. <field name="active" invisible="1"/>
  181. <field name="wishlisted_by_default"/>
  182. </group>
  183. <group>
  184. <field name="company_id" invisible="1"/>
  185. <field name="user_id" domain="[('share', '=', False)]"/>
  186. <field name="event_id"/>
  187. <field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
  188. <field name="color" widget="color_picker"/>
  189. </group>
  190. </group>
  191. <notebook>
  192. <page string="Speaker" name="speaker">
  193. <group string="Contact Details" class="display-flex justify-content-between">
  194. <group>
  195. <field name="partner_id" context="{'default_phone': contact_phone, 'default_email': contact_email}"/>
  196. <field name="contact_email" attrs="{'readonly': [('partner_id', '!=', False)]}"/>
  197. <field name="contact_phone" class="o_force_ltr" attrs="{'readonly': [('partner_id', '!=', False)]}"/>
  198. </group>
  199. </group>
  200. <group string="Speaker Bio" class="display-flex justify-content-between">
  201. <group>
  202. <field name="partner_name"/>
  203. <field name="partner_email"/>
  204. <field name="partner_phone" class="o_force_ltr"/>
  205. <field name="partner_function"/>
  206. <field name="partner_company_name"/>
  207. </group>
  208. <group>
  209. <field name="image" nolabel="1" widget="image" class="oe_avatar"/>
  210. </group>
  211. </group>
  212. <group>
  213. <field name="partner_biography" string="Biography" placeholder='e.g. "John Doe was born in..."'/>
  214. </group>
  215. </page>
  216. <page string="Description" name="description">
  217. <field name="description" placeholder='e.g. "This talk will be about..."'/>
  218. </page>
  219. <page string="Interactivity" name="interactivity">
  220. <group>
  221. <group name="event_track_cta_group">
  222. <field name="website_cta"/>
  223. <field name="website_cta_title" placeholder="e.g. Get Yours Now !"
  224. attrs="{'invisible': [('website_cta', '=', False)],
  225. 'required': [('website_cta', '=', True)]}"/>
  226. <field name="website_cta_url" placeholder="e.g. http://www.example.com"
  227. attrs="{'invisible': [('website_cta', '=', False)],
  228. 'required': [('website_cta', '=', True)]}"/>
  229. <label for="website_cta_delay"
  230. attrs="{'invisible': [('website_cta', '=', False)]}"/>
  231. <div attrs="{'invisible': [('website_cta', '=', False)]}">
  232. <field name="website_cta_delay" class="oe_inline"
  233. attrs="{'required': [('website_cta', '=', True)]}"/> minutes after track starts
  234. </div>
  235. </group>
  236. </group>
  237. </page>
  238. </notebook>
  239. </sheet>
  240. <div class="oe_chatter">
  241. <field name="message_follower_ids"/>
  242. <field name="activity_ids"/>
  243. <field name="message_ids" options="{'post_refresh': 'recipients'}"/>
  244. </div>
  245. </form>
  246. </field>
  247. </record>
  248. <record model="ir.ui.view" id="view_event_track_tree">
  249. <field name="name">event.track.tree</field>
  250. <field name="model">event.track</field>
  251. <field name="arch" type="xml">
  252. <tree string="Event Track">
  253. <field name="name"/>
  254. <field name="active" invisible="1"/>
  255. <field name="partner_name"/>
  256. <field name="partner_id" optional="hide"/>
  257. <field name="partner_email"/>
  258. <field name="partner_phone"/>
  259. <field name="event_id" invisible="context.get('default_event_id')"/>
  260. <field name="wishlisted_by_default" optional="hide"/>
  261. <field name="wishlist_visitor_count" optional="hide"/>
  262. <field name="stage_id"/>
  263. <field name="color" widget="color_picker" optional="hide"/>
  264. <field name="activity_exception_decoration" widget="activity_exception"/>
  265. </tree>
  266. </field>
  267. </record>
  268. <record model="ir.ui.view" id="view_event_track_graph">
  269. <field name="name">event.track.graph</field>
  270. <field name="model">event.track</field>
  271. <field name="arch" type="xml">
  272. <graph string="Tracks" sample="1">
  273. <field name="location_id"/>
  274. <field name="duration" operator="+"/>
  275. <field name="website_cta_delay" invisible="1"/>
  276. <field name="color" invisible="1"/>
  277. </graph>
  278. </field>
  279. </record>
  280. <record model="ir.actions.act_window" id="action_event_track">
  281. <field name="name">Event Tracks</field>
  282. <field name="res_model">event.track</field>
  283. <field name="view_mode">kanban,tree,form,calendar,graph,activity</field>
  284. <field name="help" type="html">
  285. <p class="o_view_nocontent_smiling_face">
  286. Create a Track
  287. </p><p>
  288. Tracks define your event schedule. They can be talks, workshops or any similar activity.
  289. </p>
  290. </field>
  291. </record>
  292. <record model="ir.actions.act_window" id="action_event_track_from_event">
  293. <field name="res_model">event.track</field>
  294. <field name="name">Event Tracks</field>
  295. <field name="view_mode">kanban,tree,form,calendar,graph,activity</field>
  296. <field name="context">{'search_default_event_id': active_id, 'default_event_id': active_id}</field>
  297. <field name="help" type="html">
  298. <p class="o_view_nocontent_smiling_face">
  299. Create a Track
  300. </p><p>
  301. Tracks define your event schedule. They can be talks, workshops or any similar activity.
  302. </p>
  303. </field>
  304. </record>
  305. <record id="event_track_action_from_visitor" model="ir.actions.act_window">
  306. <field name="name">Wishlisted Tracks</field>
  307. <field name="res_model">event.track</field>
  308. <field name="view_mode">kanban,tree,form</field>
  309. <field name="domain">[('wishlist_visitor_ids', 'in', [active_id])]</field>
  310. <field name="help" type="html">
  311. <p class="o_view_nocontent_empty_folder">
  312. No track favorited by this visitor
  313. </p>
  314. </field>
  315. </record>
  316. </odoo>