[IMP] document : added missing filter string in search view.
[odoo/odoo.git] / addons / document / document_view.xml
1 <openerp>
2 <data>
3     <menuitem name="Document Management" id="menu_document_management_configuration" parent="knowledge.menu_document_configuration" sequence="1"/>
4
5     <record model="ir.ui.view" id="view_document_storage_form">
6         <field name="name">document.storage</field>
7         <field name="model">document.storage</field>
8         <field name="type">form</field>
9         <field name="arch" type="xml">
10             <form string="Storage Media">
11                 <group colspan="4" col="6">
12                     <field name="name" select="1" colspan="4"/>
13                     <field name="type"/>
14                     <newline/>
15                     <field name="user_id"/>
16                     <field name="online"/>
17                     <field name="readonly"/>
18                 </group>
19                 <group colspan="2" attrs="{'invisible':[('type','in',['db', 'db64'])]}">
20                     <field name="path"/>
21                 </group>
22             </form>
23         </field>
24     </record>
25
26     <record model="ir.ui.view" id="view_document_storage_tree">
27         <field name="name">document.storage</field>
28         <field name="model">document.storage</field>
29         <field name="type">tree</field>
30         <field name="arch" type="xml">
31             <tree string="Storage Media" toolbar="1">
32                 <field name="name"/>
33                 <field name="type"/>
34             </tree>
35         </field>
36     </record>
37
38     <record id="view_document_storage_filter" model="ir.ui.view">
39             <field name="name">Search View: Document Storage</field>
40             <field name="model">document.storage</field>
41             <field name="type">search</field>
42             <field name="arch" type="xml">
43                 <search string="Search Document storage">
44                     <field name="name" />
45                     <newline/>
46                     <group expand="0" string="Group By...">
47                         <filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
48                     </group>
49                </search>
50             </field>
51         </record>
52
53     <record model="ir.actions.act_window" id="action_document_storage_form">
54         <field name="name">Storage Media</field>
55         <field name="type">ir.actions.act_window</field>
56         <field name="res_model">document.storage</field>
57         <field name="view_type">form</field>
58         <field name="view_mode">tree,form</field>
59         <field name="search_view_id" ref="view_document_storage_filter"/>
60     </record>
61    <menuitem
62         name="Storage Media"
63         action="action_document_storage_form"
64         id="menu_document_storage_media"
65         groups="base.group_no_one"
66         parent="menu_document_management_configuration"/>
67
68     <record model="ir.ui.view" id="view_document_directory_form">
69         <field name="name">document.directory</field>
70         <field name="model">document.directory</field>
71         <field name="type">form</field>
72         <field name="arch" type="xml">
73             <form string="Directories" col="4">
74                 <field name="name" select="1" colspan="4"/>
75                 <field name="parent_id"/>
76                 <field name="storage_id" widget="selection" />
77                 <field name="user_id"/>
78                 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
79                 <notebook colspan="4">
80                 <page string="Definition">
81                     <separator string="Directory Type" colspan="4"/>
82                     <field name="type"/>
83                     <group colspan="4" col="4" attrs="{'invisible': [('type','!=','ressource')]}">
84                         <field name="ressource_type_id"  on_change="onchange_content_id(ressource_type_id)"
85                             attrs="{'required': [('type','=','ressource')] }"/>
86                         <newline/>
87                         <field name="resource_field"     domain="[('model_id','=',ressource_type_id), ('ttype', 'in', ('char', 'selection', 'date', 'datetime'))]"/>
88                         <field name="ressource_tree"/>
89                         <newline/>
90                         <field name="domain" attrs="{'required': [('type','=','ressource')], 'readonly': [('type','=','static')]}"/>
91                     </group>
92                     <group colspan="4" col="4">
93                         <field name="ressource_parent_type_id"/>
94                         <field name="ressource_id" select="2" readonly="1"/>
95                     </group>
96                     <group colspan="4" col="2" attrs="{'invisible': [('type','!=','ressource'),('ressource_parent_type_id','=',False)]}">
97                         <field name="resource_find_all"/>
98                     </group>
99
100                 </page>
101                 <page string="Generated Files" groups="base.group_no_one">
102                     <label colspan="4" string="For each entry here, virtual files will appear in this folder." />
103                     <field name="content_ids" nolabel="1" colspan="4" >
104                         <form string="Contents">
105                             <field name="name"/>
106                             <field name="sequence"/>
107                             <field name="prefix"/>
108                             <field name="suffix"/>
109                             <field name="extension"/>
110                             <field name="include_name"/>
111                             <separator string="PDF Report" colspan="4"/>
112                             <field name="report_id" domain="[('model_id','=',parent.ressource_type_id)]"/>
113                         </form>
114                         <tree string="Contents">
115                             <field name="sequence" string="Seq."/>
116                             <field name="name"/>
117                             <field name="suffix"/>
118                             <field name="extension"/>
119                         </tree>
120                     </field>
121                 </page>
122                 <page string="Dynamic context" groups="base.group_no_one">
123                     <label colspan="4" string="Define words in the context, for all child directories and files" />
124                     <field name="dctx_ids" nolabel="1" colspan="4">
125                         <tree string="Fields" editable="bottom">
126                             <field name="field"/>
127                             <field name="expr"/>
128                         </tree>
129                         <form string="Fields">
130                             <field name="field"/>
131                             <field name="expr"/>
132                         </form>
133                     </field>
134                 </page>
135                 <page string="Security">
136                     <label colspan="4" string="Only members of these groups will have access to this directory and its files." />
137                     <label colspan="4" string="These groups, however, do NOT apply to children directories, which must define their own groups." />
138                     <field name="group_ids" colspan="4" nolabel="1"/>
139                 </page>
140                 </notebook>
141             </form>
142         </field>
143     </record>
144     <record model="ir.ui.view" id="view_document_directory_tree">
145         <field name="name">document.directory</field>
146         <field name="model">document.directory</field>
147         <field name="type">tree</field>
148         <field name="field_parent">child_ids</field>
149         <field name="arch" type="xml">
150             <tree string="Directories" toolbar="1">
151                 <field name="name"/>
152                 <field name="type"/>
153                 <field name="user_id"/>
154                 <field name="company_id" groups="base.group_multi_company"/>
155                 <field name="storage_id"/>
156                 <field name="create_date"/>
157                 <field name="write_date"/>
158             </tree>
159         </field>
160     </record>
161
162     <record id="view_document_directory_filter" model="ir.ui.view">
163             <field name="name">Search View: Document Directory</field>
164             <field name="model">document.directory</field>
165             <field name="type">search</field>
166             <field name="arch" type="xml">
167                 <search string="Search Document Directory">
168                     <filter string="Static" domain="[('type','=','directory')]"/>
169                     <filter string="Resources" icon="terp-personal" domain="[('type','=','ressource')]"/>
170                     <separator orientation="vertical"/>
171                     <field name="name" />
172                     <field name="user_id" />
173                     <field name="company_id" groups="base.group_multi_company"/>
174                     <field name="storage_id" />
175                     <newline/>
176                     <group expand="0" string="Group By...">
177                         <filter string="Owner" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
178                         <separator orientation="vertical"/>
179                         <filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
180                         <filter string="Storage" domain="[]" icon="terp-accessories-archiver" context="{'group_by':'storage_id'}"/>
181                         <separator orientation="vertical" groups="base.group_multi_company"/>
182                         <filter string="Company" domain="[]" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
183                     </group>
184                </search>
185             </field>
186         </record>
187
188     <record model="ir.actions.act_window" id="action_document_directory_form">
189         <field name="name">Directories</field>
190         <field name="type">ir.actions.act_window</field>
191         <field name="res_model">document.directory</field>
192         <field name="view_type">form</field>
193         <field name="view_mode">tree,form</field>
194         <field name="search_view_id" ref="view_document_directory_filter"/>
195     </record>
196
197     <record id="action_dir_view1" model="ir.actions.act_window.view">
198         <field eval="10" name="sequence"/>
199         <field name="view_mode">tree</field>
200         <field name="view_id" ref="view_document_directory_tree"/>
201         <field name="act_window_id" ref="action_document_directory_form"/>
202     </record>
203     <record id="action_dir_view2" model="ir.actions.act_window.view">
204         <field eval="20" name="sequence"/>
205         <field name="view_mode">form</field>
206         <field name="view_id" ref="view_document_directory_form"/>
207         <field name="act_window_id" ref="action_document_directory_form"/>
208     </record>
209
210     <menuitem
211         action="action_document_directory_form"
212         id="menu_document_directories"
213         parent="menu_document_management_configuration"/>
214
215
216     <record model="ir.actions.act_window" id="action_document_directory_tree">
217         <field name="type">ir.actions.act_window</field>
218         <field name="name">Directories' Structure</field>
219         <field name="res_model">document.directory</field>
220         <field name="view_type">tree</field>
221         <field name="view_id" ref="document.view_document_directory_tree"/>
222         <field name="domain">[('ressource_parent_type_id','=',False),('parent_id','=',False)]</field>
223     </record>
224     <menuitem
225         action="action_document_directory_tree"
226         id="menu_document_directories_tree"
227         parent="menu_document_management_configuration" sequence="5"/>
228
229     <record model="ir.ui.view" id="view_document_file_form">
230         <field name="name">ir.attachment</field>
231         <field name="model">ir.attachment</field>
232         <field name="priority" eval="1"/>
233         <field name="type">form</field>
234         <field name="arch" type="xml">
235             <form string="Documents">
236                 <group colspan="4" col="6">
237                     <field name="name" select="1" colspan="4" />
238                     <field name="parent_id"/>
239                     <newline/>
240                     <field name="user_id"/>
241                     <field name="company_id" groups="base.group_multi_company" widget="selection"/>
242                 </group>
243                 <notebook colspan="4">
244                 <page string="Attachment">
245                     <group col="2" colspan="2">
246                         <separator string="Data" colspan="2"/>
247                         <field name="type"/>
248                         <newline />
249                         <group col="2" colspan="2" attrs="{'invisible':[('type','=','url')]}">
250                             <field name="datas" filename="datas_fname"/>
251                             <field name="datas_fname" select="1"/>
252                         </group>
253                         <group col="2" colspan="2" attrs="{'invisible':[('type','=','binary')]}">
254                             <field name="url" widget="url"/>
255                         </group>
256                     </group>
257                     <group col="2" colspan="2">
258                     <field name="res_id" invisible="True"/>
259                         <group col="2" colspan="2" attrs="{'invisible': [('res_id','=',0)]}">
260                             <separator string="Attached to" colspan="2"/>
261                             <field name="res_model" readonly="True" invisible="True"/>
262                             <field name="res_name" readonly="1"/>
263                         </group>
264                         <separator string="Related to" colspan="2"/>
265                             <field name="partner_id"/>
266                     </group>
267                     <group col="2" colspan="2" groups="base.group_no_one">
268                         <separator string="Created" colspan="2"/>
269                         <field name="create_uid" readonly="1"/>
270                         <field name="create_date" readonly="1"/>
271                     </group>
272                     <group col="2" colspan="2" groups="base.group_no_one">
273                         <separator string="Modified" colspan="2"/>
274                         <field name="write_uid" readonly="1"/>
275                         <field name="write_date" readonly="1"/>
276                     </group>
277                 </page>
278                 <page string="Indexed Content - experimental" groups="base.group_no_one">
279                     <field name="index_content" colspan="4" nolabel="1"/>
280                 </page>
281                 <page string="Notes">
282                     <field colspan="4" name="description" nolabel="1"/>
283                 </page>
284                 </notebook>
285             </form>
286         </field>
287     </record>
288
289     <record id="view_attach_filter_inherit0" model="ir.ui.view">
290             <field name="name">IR Attachment0</field>
291             <field name="model">ir.attachment</field>
292             <field name="type">search</field>
293             <field name="inherit_id" ref="base.view_attachment_search"/>
294             <field name="arch" type="xml">
295                 <field name="create_uid" position="replace">
296                     <field name="user_id">
297                         <filter string="My Document(s)"
298                             icon="terp-personal"
299                             domain="[('user_id','=',uid)]"
300                             help="Filter on my documents" />
301                     </field>
302                     <field name="parent_id" />
303                     <field name="index_content"/>
304                 </field>
305             </field>
306     </record>
307
308
309     <record id="view_attach_filter_inherit2" model="ir.ui.view">
310
311             <field name="name">IR Attachment2</field>
312             <field name="model">ir.attachment</field>
313             <field name="type">search</field>
314             <field name="inherit_id" ref="base.view_attachment_search"/>
315             <field name="arch" type="xml">
316                 <filter string="Owner" position="replace">
317                     <filter string="Owner" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
318                     <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
319                     <filter string="Directory" icon="terp-folder-green" domain="[]" context="{'group_by':'parent_id'}"/>
320                 </filter>
321             </field>
322     </record>
323
324
325     <record model="ir.ui.view" id="view_document_file_tree">
326         <field name="name">ir.attachment</field>
327         <field name="model">ir.attachment</field>
328         <field name="type">tree</field>
329         <field name="priority" eval="1"/>
330         <field name="arch" type="xml">
331             <tree colors="blue:type in ('url',)">
332                 <field name="name"/>
333                 <field name="parent_id" />
334                 <field name="user_id"/>
335                 <field name="company_id"/>
336                 <field name="create_date" groups="base.group_no_one"/>
337                 <field name="write_date" groups="base.group_no_one"/>
338                 <field name="partner_id"/>
339                 <field name="type"/>
340             </tree>
341
342         </field>
343     </record>
344
345     <record model="ir.actions.act_window" id="action_document_file_form">
346         <field name="name">Documents</field>
347         <field name="type">ir.actions.act_window</field>
348         <field name="res_model">ir.attachment</field>
349         <field name="view_type">form</field>
350         <field name="help">The Documents repository gives you access to all attachments, such as mails, project documents, invoices etc.</field>
351     </record>
352     <menuitem name="Documents" id="menu_document_doc" parent="knowledge.menu_document" sequence="0"/>
353     <menuitem
354         name="Documents"
355         action="action_document_file_form"
356         id="menu_document_files"
357         parent="menu_document_doc"/>
358
359     <record model="ir.actions.act_window" id="action_document_file_directory_form">
360         <field name="type">ir.actions.act_window</field>
361         <field name="res_model">ir.attachment</field>
362         <field name="name">Directory</field>
363         <field name="view_type">form</field>
364         <field name="domain">[('parent_id','child_of',active_id)]</field>
365         <field name="context">{'parent_id':active_id}</field>
366     </record>
367
368     <record model="ir.values" id="ir_action_document_file_directory_form">
369         <field name="key2" eval="'tree_but_open'"/>
370         <field name="model" eval="'document.directory'"/>
371         <field name="name">Browse Files</field>
372         <field name="value" eval="'ir.actions.act_window,%d'%action_document_file_directory_form"/>
373     </record>
374
375     <record model="ir.ui.view" id="view_attachment_form_inherit">
376         <field name="name">ir.attachment.view.inherit</field>
377         <field name="model">ir.attachment</field>
378         <field name="inherit_id" ref="base.view_attachment_form"/>
379         <field name="arch" type="xml">
380             <field name="datas_fname" position = "replace" >
381             </field>
382         </field>
383     </record>
384
385     <record model="ir.ui.view" id="view_process_node_form_inherit1">
386         <field name="name">process.node.form</field>
387         <field name="model">process.node</field>
388             <field name="type">form</field>
389             <field name="inherit_id" ref="process.view_process_node_form"/>
390         <field name="priority" eval="1"/>
391         <field name="arch" type="xml">
392             <field name="subflow_id" position="after">
393                 <field name="directory_id" domain="[('ressource_type_id','=',model_id),('ressource_parent_type_id','=',False)]"/>
394                 <newline/>
395             </field>
396         </field>
397     </record>
398
399     <record model="ir.ui.view" id="view_process_form_inherit1">
400         <field name="name">process.process.form</field>
401         <field name="model">process.process</field>
402             <field name="type">form</field>
403             <field name="inherit_id" ref="process.view_process_form"/>
404         <field name="priority" eval="1"/>
405         <field name="arch" type="xml">
406             <field name="subflow_id" position="after">
407                 <field name="directory_id" domain="[('ressource_type_id','=',model_id),('ressource_parent_type_id','=',False)]"/>
408                 <newline/>
409             </field>
410         </field>
411     </record>
412
413     <act_window domain="[('partner_id', '=', active_id)]"
414         context="{'default_partner_id': active_id}"
415         id="act_res_partner_document" name="Related Documents"
416         res_model="ir.attachment"
417         src_model="res.partner"/>
418
419     <act_window
420         domain="[('parent_id', '=', active_id)]"
421         context="{'default_parent_id': active_id}"
422         id="zoom_directory" name="Related Documents"
423         res_model="ir.attachment"
424         src_model="document.directory"/>
425 </data>
426 </openerp>
427