website_blog_views.xml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <?xml version="1.0"?>
  2. <odoo>
  3. <!-- Blog views -->
  4. <record id="view_blog_blog_list" model="ir.ui.view">
  5. <field name="name">blog.blog.list</field>
  6. <field name="model">blog.blog</field>
  7. <field name="arch" type="xml">
  8. <tree string="Blogs">
  9. <field name="name"/>
  10. <field name="blog_post_count"/>
  11. <field name="website_id" groups="website.group_multi_website"/>
  12. <field name="active" invisible="1"/>
  13. </tree>
  14. </field>
  15. </record>
  16. <record id="view_blog_blog_form" model="ir.ui.view">
  17. <field name="name">blog.blog.form</field>
  18. <field name="model">blog.blog</field>
  19. <field name="arch" type="xml">
  20. <form string="Blog">
  21. <sheet>
  22. <widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
  23. <group>
  24. <field name="active" invisible="1"/>
  25. <field name="name"/>
  26. <field name="subtitle"/>
  27. <field name="website_id" options="{'no_create': True}" groups="website.group_multi_website"/>
  28. </group>
  29. </sheet>
  30. <div class="oe_chatter">
  31. <field name="message_follower_ids" groups="base.group_user"/>
  32. <field name="message_ids"/>
  33. </div>
  34. </form>
  35. </field>
  36. </record>
  37. <record id="blog_blog_view_search" model="ir.ui.view">
  38. <field name="name">blog.blog.search</field>
  39. <field name="model">blog.blog</field>
  40. <field name="arch" type="xml">
  41. <search string="Blog">
  42. <field name="name"/>
  43. <filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
  44. </search>
  45. </field>
  46. </record>
  47. <record id="action_blog_blog" model="ir.actions.act_window">
  48. <field name="name">Blogs</field>
  49. <field name="res_model">blog.blog</field>
  50. <field name="view_mode">tree,form</field>
  51. </record>
  52. <record id="blog_tag_tree" model="ir.ui.view">
  53. <field name="name">blog_tag_tree</field>
  54. <field name="model">blog.tag</field>
  55. <field name="arch" type="xml">
  56. <tree string="Tag List">
  57. <field name="name"/>
  58. <field name="category_id"/>
  59. <field name="post_ids"/>
  60. </tree>
  61. </field>
  62. </record>
  63. <record id="blog_tag_form" model="ir.ui.view">
  64. <field name="name">blog_tag_form</field>
  65. <field name="model">blog.tag</field>
  66. <field name="arch" type="xml">
  67. <form string="Tag Form">
  68. <sheet>
  69. <group>
  70. <field name="name"/>
  71. <field name="category_id"/>
  72. </group>
  73. <label for="post_ids" string="Used in: "/>
  74. <field name="post_ids"/>
  75. </sheet>
  76. </form>
  77. </field>
  78. </record>
  79. <record id="action_tags" model="ir.actions.act_window">
  80. <field name="name">Blog Tags</field>
  81. <field name="res_model">blog.tag</field>
  82. <field name="view_mode">tree,form</field>
  83. <field name="view_id" ref="blog_tag_tree"/>
  84. </record>
  85. <record id="blog_tag_category_form" model="ir.ui.view">
  86. <field name="name">blog_tag_category_form</field>
  87. <field name="model">blog.tag.category</field>
  88. <field name="arch" type="xml">
  89. <form string="Tag Category Form">
  90. <sheet>
  91. <group>
  92. <field name="name"/>
  93. </group>
  94. </sheet>
  95. </form>
  96. </field>
  97. </record>
  98. <record id="blog_tag_category_tree" model="ir.ui.view">
  99. <field name="name">blog_tag_category_tree</field>
  100. <field name="model">blog.tag.category</field>
  101. <field name="arch" type="xml">
  102. <tree string="Tag Categories">
  103. <field name="name"/>
  104. </tree>
  105. </field>
  106. </record>
  107. <record id="action_tag_category" model="ir.actions.act_window">
  108. <field name="name">Tag Category</field>
  109. <field name="res_model">blog.tag.category</field>
  110. <field name="view_mode">tree,form</field>
  111. <field name="view_id" ref="blog_tag_category_tree"/>
  112. </record>
  113. <menuitem name="Blogs"
  114. id="menu_website_blog_root_global"
  115. sequence="100"
  116. parent="website.menu_website_global_configuration"
  117. groups="website.group_website_designer"/>
  118. <menuitem id="menu_blog_global" parent="menu_website_blog_root_global" name="Blogs" action="action_blog_blog" sequence="20"/>
  119. <menuitem id="menu_blog_tag_global" parent="menu_website_blog_root_global" name="Tags" action="action_tags" sequence="30"/>
  120. <menuitem id="menu_website_blog_tag_category_global" parent="menu_website_blog_root_global"
  121. name="Tag Categories" action="action_tag_category" sequence="40"/>
  122. </odoo>