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.

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