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.

112 lines
4.8 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <openerp>
  3. <data>
  4. <record id="view_attachment_improved_form" model="ir.ui.view">
  5. <field name="model">ir.attachment.metadata</field>
  6. <field name="inherit_id" ref="base.view_attachment_form" />
  7. <field name="arch" type="xml">
  8. <xpath expr="/form/*" position="before">
  9. <header>
  10. <button name="run" states="pending,failed"
  11. string="Run" type="object" class="oe_highlight"/>
  12. <button name="set_done" states="pending,failed"
  13. string="Set to Done" type="object"/>
  14. </header>
  15. </xpath>
  16. <field name="url" position="after">
  17. <field name="sync_date"/>
  18. <field name="state"/>
  19. <field name="internal_hash"/>
  20. <field name="external_hash"/>
  21. <field name="file_type"/>
  22. </field>
  23. <group name="description_group">
  24. <group name="state_message" string="Error" colspan="4">
  25. <field name="state_message" nolabel="1"/>
  26. </group>
  27. </group>
  28. </field>
  29. </record>
  30. <record id="view_external_attachment_tree" model="ir.ui.view">
  31. <field name="model">ir.attachment.metadata</field>
  32. <field name="arch" type="xml">
  33. <tree string="Attachments" default_order='create_date desc'>
  34. <field name="name"/>
  35. <field name="datas_fname"/>
  36. <field name="file_type"/>
  37. <field name="type"/>
  38. <field name="create_date"/>
  39. <field name="state"/>
  40. </tree>
  41. </field>
  42. </record>
  43. <record id="view_external_attachment_search" model="ir.ui.view">
  44. <field name="model">ir.attachment.metadata</field>
  45. <field name="arch" type="xml">
  46. <search string="Attachments">
  47. <field name="name" filter_domain="['|', ('name','ilike',self), ('datas_fname','ilike',self)]" string="Attachment"/>
  48. <field name="create_date"/>
  49. <filter icon="terp-stage"
  50. string="URL"
  51. domain="[('type','=','url')]"/>
  52. <filter icon="terp-stock_align_left_24"
  53. string="Binary"
  54. domain="[('type','=','binary')]"/>
  55. <separator/>
  56. <filter name="my_documents_filter"
  57. string="My Document(s)"
  58. icon="terp-personal"
  59. domain="[('create_uid','=',uid)]"
  60. help="Filter on my documents"/>
  61. <field name="create_uid"/>
  62. <field name="type"/>
  63. <filter string="Pending" domain="[('state', '=', 'pending')]"/>
  64. <filter string="Failed" domain="[('state', '=', 'failed')]"/>
  65. <filter string="Done" domain="[('state', '=', 'done')]"/>
  66. <group expand="0" string="Group By">
  67. <filter string="Owner" icon="terp-personal" domain="[]" context="{'group_by':'create_uid'}"/>
  68. <filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}" groups="base.group_no_one"/>
  69. <filter string="Company" icon="terp-gtk-home" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
  70. <filter string="Creation Month" name="creation_month" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}"/>
  71. <filter string="State" domain="[]" context="{'group_by': 'state'}"/>
  72. <filter string="File type" domain="[]" context="{'group_by': 'file_type'}"/>
  73. </group>
  74. </search>
  75. </field>
  76. </record>
  77. <record id="action_attachment" model="ir.actions.act_window">
  78. <field name="name">Meta data Attachments</field>
  79. <field name="type">ir.actions.act_window</field>
  80. <field name="res_model">ir.attachment.metadata</field>
  81. <field name="view_type">form</field>
  82. <field name="view_mode">tree,form</field>
  83. <field name="view_id" eval="False"/>
  84. <field name="search_view_id" ref="view_external_attachment_search"/>
  85. </record>
  86. <record id="ir_attachment_view2" model="ir.actions.act_window.view">
  87. <field eval="10" name="sequence"/>
  88. <field name="view_mode">tree</field>
  89. <field name="view_id" ref="view_external_attachment_tree"/>
  90. <field name="act_window_id" ref="action_attachment"/>
  91. </record>
  92. <record id="ir_attachment_view3" model="ir.actions.act_window.view">
  93. <field eval="10" name="sequence"/>
  94. <field name="view_mode">form</field>
  95. <field name="view_id" ref="view_attachment_improved_form"/>
  96. <field name="act_window_id" ref="action_attachment"/>
  97. </record>
  98. <menuitem id="menu_ir_attachment"
  99. parent="base.next_id_9"
  100. sequence="20"
  101. action="action_attachment"/>
  102. </data>
  103. </openerp>