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.

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