~unifield-team/unifield-wm/uftp-319

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
    
        <!-- Attachment -->
        <record id="view_attachment_form_2" model="ir.ui.view">
            <field name="name">ir.attachment.view</field>
            <field name="model">ir.attachment</field>
            <field name="type">form</field>
            <field name="priority">10</field>
            <field name="arch" type="xml">
                <form string="Attachments" hide_new_button="1" hide_duplicate_button="1">
                    <group colspan="4" col="6">
                        <field name="name" />
                        <field name="type" invisible="1"/>
                        <field name="company_id" groups="base.group_multi_company" widget="selection"/>
                    </group>
                    <notebook colspan="4">
                    <page string="Attachment">
                    <group col="4" colspan="4">
                        <separator string="Data" colspan="4"/>
                        <newline />
                        <group col="2" colspan="4" attrs="{'invisible':[('type','=','url')]}">
                            <field name="datas" filename="datas_fname"/>
                            <field name="datas_fname" select="1"/>
                        </group>
                        <group col="2" colspan="4" attrs="{'invisible':[('type','=','binary')]}">
                            <field name="url" widget="url"/>
                        </group>
                    </group>
                        <group col="2" colspan="2">
                            <separator string="Attached To" colspan="2"/>
                            <field name="res_model" select="2" invisible="1"/>
                            <field name="res_id" invisible="1"/>
                            <field name="res_name"/>
                        </group>
                    <group col="2">
                        <separator string="Created" colspan="2"/>
                        <field name="create_uid" select="2"/>
                        <field name="create_date" select="2"/>
                    </group>
                    </page>
                    <page string="Notes">
                        <field name="description" nolabel="1" colspan="4"/>
                    </page>
                    </notebook>
                </form>
            </field>
        </record>
        
        <record id="view_attachment_tree_2" model="ir.ui.view">
            <field name="name">ir.attachment.view.tree</field>
            <field name="model">ir.attachment</field>
            <field name="type">tree</field>
            <field name="priority">10</field>
            <field name="arch" type="xml">
                <tree string="Attachments" hide_new_button="1">
                    <field name="name"/>
                    <field name="datas_fname"/>
                    <field name="type" invisible="1"/>
                    <field name="company_id" groups="base.group_multi_company"/>
                    <field name="create_uid"/>
                    <field name="create_date"/>
                </tree>
            </field>
        </record>
        
        <record id="view_attachment_search_2" model="ir.ui.view">
            <field name="name">ir.attachment.search</field>
            <field name="model">ir.attachment</field>
            <field name="type">search</field>
            <field name="priority">10</field>
            <field name="arch" type="xml">
                <search string="Attachments">
                    <group colspan="4" col="10">
                        <filter icon="terp-stage"
                            string="URL"
                            domain="[('type','=','url')]"/>
                        <filter icon="terp-stock_align_left_24"
                            string="Binary"
                            domain="[('type','=','binary')]"/>
                        <separator orientation="vertical"/>
                        <filter icon="terp-go-month" string="Month"
                            domain="[('create_date','&lt;=', time.strftime('%%Y-%%m-%%d')),('create_date','&gt;=',time.strftime('%%Y-%%m-01'))]"/>
                        <separator orientation="vertical"/>
                        <field name="name"/>
                        <field name="type"/>
                        <field name="datas_fname"/>
                        <field name="create_uid">
                            <filter icon="terp-personal"
                                domain="[('create_uid','=',uid)]"
                                help="Filter on my documents" />
                        </field>
                    </group>
                    <newline/>
                    <group expand="0" string="Group By...">
                        <filter string="Owner" icon="terp-personal" domain="[]" context="{'group_by':'create_uid'}"/>
                        <filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}" />
                        <filter string="Company" icon="terp-gtk-home" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
                        <separator orientation="vertical"/>
                        <filter string="Month" help="Creation Month" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}"/>
                    </group>
                </search>
            </field>
        </record>
    
    </data>
</openerp>