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.

90 lines
3.7 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. <field name="url" position="after">
  9. <field name="internal_hash"/>
  10. <field name="external_hash"/>
  11. <field name="file_type"/>
  12. </field>
  13. </field>
  14. </record>
  15. <record id="view_external_attachment_tree" model="ir.ui.view">
  16. <field name="model">ir.attachment.metadata</field>
  17. <field name="arch" type="xml">
  18. <tree string="Attachments" >
  19. <field name="name"/>
  20. <field name="datas_fname"/>
  21. <field name="file_type"/>
  22. </tree>
  23. </field>
  24. </record>
  25. <record id="view_external_attachment_search" model="ir.ui.view">
  26. <field name="model">ir.attachment.metadata</field>
  27. <field name="arch" type="xml">
  28. <search string="Attachments">
  29. <field name="name" filter_domain="['|', ('name','ilike',self), ('datas_fname','ilike',self)]" string="Attachment"/>
  30. <field name="create_date"/>
  31. <filter icon="terp-stage"
  32. string="URL"
  33. domain="[('type','=','url')]"/>
  34. <filter icon="terp-stock_align_left_24"
  35. string="Binary"
  36. domain="[('type','=','binary')]"/>
  37. <separator/>
  38. <filter name="my_documents_filter"
  39. string="My Document(s)"
  40. icon="terp-personal"
  41. domain="[('create_uid','=',uid)]"
  42. help="Filter on my documents"/>
  43. <field name="create_uid"/>
  44. <field name="type"/>
  45. <group expand="0" string="Group By">
  46. <filter string="Owner" icon="terp-personal" domain="[]" context="{'group_by':'create_uid'}"/>
  47. <filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}" groups="base.group_no_one"/>
  48. <filter string="Company" icon="terp-gtk-home" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
  49. <filter string="Creation Month" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}"/>
  50. <filter string="File type" domain="[]" context="{'group_by': 'file_type'}"/>
  51. </group>
  52. </search>
  53. </field>
  54. </record>
  55. <record id="action_attachment" model="ir.actions.act_window">
  56. <field name="name">Meta data Attachments</field>
  57. <field name="type">ir.actions.act_window</field>
  58. <field name="res_model">ir.attachment.metadata</field>
  59. <field name="view_type">form</field>
  60. <field name="view_mode">tree,form</field>
  61. <field name="view_id" eval="False"/>
  62. <field name="search_view_id" ref="view_external_attachment_search"/>
  63. </record>
  64. <record id="ir_attachment_view2" model="ir.actions.act_window.view">
  65. <field eval="10" name="sequence"/>
  66. <field name="view_mode">tree</field>
  67. <field name="view_id" ref="view_external_attachment_tree"/>
  68. <field name="act_window_id" ref="action_attachment"/>
  69. </record>
  70. <record id="ir_attachment_view3" model="ir.actions.act_window.view">
  71. <field eval="10" name="sequence"/>
  72. <field name="view_mode">form</field>
  73. <field name="view_id" ref="view_attachment_improved_form"/>
  74. <field name="act_window_id" ref="action_attachment"/>
  75. </record>
  76. <menuitem id="menu_ir_attachment"
  77. parent="base.next_id_9"
  78. sequence="20"
  79. action="action_attachment"/>
  80. </data>
  81. </openerp>