website_pages_views.xml 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <?xml version="1.0"?>
  2. <odoo>
  3. <record id="event_pages_tree_view" model="ir.ui.view">
  4. <field name="name">Event Pages Tree</field>
  5. <field name="model">event.event</field>
  6. <field name="priority">99</field>
  7. <field name="mode">primary</field>
  8. <field name="inherit_id" ref="event.view_event_tree"/>
  9. <field name="arch" type="xml">
  10. <xpath expr="//tree" position="attributes">
  11. <attribute name="js_class">website_pages_list</attribute>
  12. <attribute name="type">object</attribute>
  13. <attribute name="action">open_website_url</attribute>
  14. </xpath>
  15. <field name="address_id" position="attributes">
  16. <attribute name="optional">hide</attribute>
  17. </field>
  18. <field name="date_end" position="attributes">
  19. <attribute name="optional">hide</attribute>
  20. </field>
  21. <field name="seats_used" position="attributes">
  22. <attribute name="optional">hide</attribute>
  23. </field>
  24. <field name="name" position="after">
  25. <field name="website_url"/>
  26. </field>
  27. <field name="stage_id" position="before">
  28. <field name="is_seo_optimized"/>
  29. <field name="is_published"/>
  30. <field name="website_id" position="move"/>
  31. </field>
  32. </field>
  33. </record>
  34. <record id="event_pages_kanban_view" model="ir.ui.view">
  35. <field name="name">Event Pages Kanban</field>
  36. <field name="model">event.event</field>
  37. <field name="priority">99</field>
  38. <field name="mode">primary</field>
  39. <field name="inherit_id" ref="event.view_event_kanban"/>
  40. <field name="arch" type="xml">
  41. <xpath expr="//kanban" position="attributes">
  42. <attribute name="js_class">website_pages_kanban</attribute>
  43. <attribute name="type">object</attribute>
  44. <attribute name="action">open_website_url</attribute>
  45. </xpath>
  46. <xpath expr="//kanban" position="inside">
  47. <field name="website_url" invisible="1"/>
  48. </xpath>
  49. <xpath expr="//div[hasclass('o_kanban_record_title')]" position="inside">
  50. <div class="text-muted" t-if="record.website_id.value" groups="website.group_multi_website">
  51. <i class="fa fa-globe me-1" title="Website"/>
  52. <field name="website_id"/>
  53. </div>
  54. </xpath>
  55. <xpath expr="//div[hasclass('o_kanban_record_bottom')]" position="after">
  56. <div class="border-top mt-2 pt-2">
  57. <field name="is_published" widget="boolean_toggle"/>
  58. <t t-if="record.is_published.raw_value">Published</t>
  59. <t t-else="">Not Published</t>
  60. </div>
  61. </xpath>
  62. </field>
  63. </record>
  64. <record id="action_event_pages_list" model="ir.actions.act_window">
  65. <field name="name">Event Pages</field>
  66. <field name="res_model">event.event</field>
  67. <field name="view_mode">tree,kanban</field>
  68. <field name="view_ids" eval="[(5, 0, 0),
  69. (0, 0, {'view_mode': 'tree', 'view_id': ref('event_pages_tree_view')}),
  70. (0, 0, {'view_mode': 'kanban', 'view_id': ref('event_pages_kanban_view')}),
  71. ]"/>
  72. <field name="context">{'create_action': 'website_event.event_event_action_add'}</field>
  73. </record>
  74. <menuitem id="menu_event_pages"
  75. parent="website.menu_content"
  76. sequence="40"
  77. name="Events"
  78. action="action_event_pages_list"/>
  79. </odoo>