website_views.xml 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <!-- website -->
  5. <record id="view_website_form_website_multi" model="ir.ui.view">
  6. <field name="name">website.form</field>
  7. <field name="model">website</field>
  8. <field name="inherit_id" ref="website.view_website_form"/>
  9. <field name="arch" type="xml">
  10. <xpath expr="//form" position="attributes">
  11. <attribute name="version">7.0</attribute>
  12. </xpath>
  13. <xpath expr="//header" position="replace"></xpath>
  14. <xpath expr="//field[@name='name']" position="after">
  15. <field name="menu_id"/>
  16. <field name="user_id" context="{ 'active_test' : False }" />
  17. </xpath>
  18. <xpath expr="//field[@name='default_lang_id']" position="attributes">
  19. <attribute name="required">True</attribute>
  20. </xpath>
  21. <xpath expr="//div[@name='other']" position="after">
  22. <div name="menu">
  23. <separator string="Menu"/>
  24. <group name="Menu">
  25. <button type="action" name="%(website.action_website_menu)d" string="Configure website menus" class="oe_link"/>
  26. </group>
  27. </div>
  28. </xpath>
  29. </field>
  30. </record>
  31. <record id="action_websites_configuration" model="ir.actions.act_window">
  32. <field name="name">Websites Settings</field>
  33. <field name="res_model">website</field>
  34. <field name="view_mode">tree,form</field>
  35. <field name="target">current</field>
  36. </record>
  37. <record id="website.menu_website_configuration" model="ir.ui.menu">
  38. <field name="name">Websites Settings</field>
  39. <field name="action" ref="website_multi.action_websites_configuration"/>
  40. </record>
  41. <!-- ir.ui.view -->
  42. <record id="view_view_form_website_multi" model="ir.ui.view">
  43. <field name="model">ir.ui.view</field>
  44. <field name="inherit_id" ref="base.view_view_form"/>
  45. <field name="arch" type="xml">
  46. <xpath expr="//field[@name='name']" position="after">
  47. <field name="website_id"/>
  48. <field name="key"/>
  49. </xpath>
  50. </field>
  51. </record>
  52. <!-- website.menu -->
  53. <record id="menu_search" model="ir.ui.view">
  54. <field name="name">website.menu.search</field>
  55. <field name="model">website.menu</field>
  56. <field name="arch" type="xml">
  57. <search string="Search Menus">
  58. <field name="name"/>
  59. <field name="url"/>
  60. <!-- <field name="website_id"/> -->
  61. <group string="Group By">
  62. <filter string="name" domain="[]" context="{'group_by': 'name'}"/>
  63. <filter string="url" domain="[]" context="{'group_by': 'url'}"/>
  64. <!-- <filter string="website" name="my_websites" domain="[]" context="{'group_by': 'website_id'}"/> -->
  65. </group>
  66. </search>
  67. </field>
  68. </record>
  69. <record id="menu_tree_website_multi" model="ir.ui.view">
  70. <field name="name">Website Multi Website Menu Tree</field>
  71. <field name="model">website.menu</field>
  72. <field name="inherit_id" ref="website.menu_tree"/>
  73. <field name="arch" type="xml">
  74. <xpath expr="//field[@name='name']" position="before">
  75. <field name="website_id"/>
  76. </xpath>
  77. </field>
  78. </record>
  79. <record id="action_website_menu" model="ir.actions.act_window">
  80. <field name="name">Website Menu</field>
  81. <field name="res_model">website.menu</field>
  82. <field name="view_mode">list</field>
  83. <!-- <field name="context">{'search_default_my_websites': 1}</field> -->
  84. </record>
  85. </data>
  86. </openerp>