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.

110 lines
4.8 KiB

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