You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

142 lines
5.4 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <openerp>
  3. <data>
  4. <record id="image_form_view" model="ir.ui.view">
  5. <field name="name">Multi image form</field>
  6. <field name="model">base_multi_image.image</field>
  7. <field name="arch" type="xml">
  8. <form string="Image">
  9. <group>
  10. <group
  11. string="Owner"
  12. attrs="{
  13. 'invisible': [
  14. ('show_technical', '=', False),
  15. ],
  16. }">
  17. <field name="show_technical" invisible="True"/>
  18. <field name="owner_model"/>
  19. <field name="owner_id"/>
  20. <field name="sequence"/>
  21. </group>
  22. <group string="Name">
  23. <field name="name"/>
  24. <field name="storage"/>
  25. <field name="extension"/>
  26. </group>
  27. </group>
  28. <group>
  29. <group string="Options">
  30. <field
  31. name="url"
  32. attrs="{
  33. 'invisible': [('storage', '!=', 'url')],
  34. 'required': [('storage', '=', 'url')],
  35. }"
  36. widget="url"/>
  37. <field
  38. name="path"
  39. attrs="{
  40. 'invisible': [('storage', '!=', 'file')],
  41. 'required': [('storage', '=', 'file')],
  42. }"/>
  43. <field name="filename" invisible="1"/>
  44. <field
  45. name="file_db_store"
  46. attrs="{
  47. 'invisible': [('storage', '!=', 'db')],
  48. 'required': [('storage', '=', 'db')],
  49. }"
  50. filename="filename"/>
  51. </group>
  52. <group string="Preview">
  53. <field name="image_medium"
  54. widget="image"
  55. readonly="True"
  56. nolabel="1" />
  57. </group>
  58. </group>
  59. <group string="Comments">
  60. <field name="comments" nolabel="1" />
  61. </group>
  62. </form>
  63. </field>
  64. </record>
  65. <record id="image_tree_view" model="ir.ui.view">
  66. <field name="name">Multi image tree</field>
  67. <field name="model">base_multi_image.image</field>
  68. <field name="arch" type="xml">
  69. <tree string="Images">
  70. <field name="name"/>
  71. <field name="storage"/>
  72. <field name="owner_model"/>
  73. <field name="owner_id"/>
  74. <field name="sequence" invisible="True"/>
  75. </tree>
  76. </field>
  77. </record>
  78. <record id="image_kanban_view" model="ir.ui.view">
  79. <field name="name">Product multi image kanban</field>
  80. <field name="model">base_multi_image.image</field>
  81. <field name="arch" type="xml">
  82. <kanban string="Product Images">
  83. <field name="name"/>
  84. <field name="storage"/>
  85. <field name="sequence"/>
  86. <templates>
  87. <t t-name="kanban-box">
  88. <div style="position: relative">
  89. <a t-if="! read_only_mode"
  90. type="delete"
  91. style="position: absolute; right: 0; padding: 4px; diplay: inline-block">X</a>
  92. <div class="oe_module_vignette">
  93. <a type="open">
  94. <img
  95. t-att-src="kanban_image(
  96. 'base_multi_image.image',
  97. 'image_small',
  98. record.id.value)"
  99. class="oe_kanban_image"/>
  100. </a>
  101. <div class="oe_module_desc">
  102. <div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_color_border">
  103. <table class="oe_kanban_table">
  104. <tr>
  105. <td class="oe_kanban_title1"
  106. align="left"
  107. valign="middle">
  108. <h4>
  109. <a type="open">
  110. <field name="name"/>
  111. </a>
  112. </h4>
  113. <field name="storage"/>
  114. </td>
  115. </tr>
  116. </table>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. </t>
  122. </templates>
  123. </kanban>
  124. </field>
  125. </record>
  126. <record id="image_action" model="ir.actions.act_window">
  127. <field name="name">Multi images</field>
  128. <field name="res_model">base_multi_image.image</field>
  129. <field name="view_mode">kanban,tree,form</field>
  130. </record>
  131. <menuitem
  132. id="image_menu"
  133. action="image_action"
  134. parent="base.menu_config"/>
  135. </data>
  136. </openerp>