~unifield-team/unifield-wm/us-826

« back to all changes in this revision

Viewing changes to delete_button/view/picking_view.xml

  • Committer: Quentin THEURET
  • Date: 2016-03-04 12:15:00 UTC
  • Revision ID: qt@tempo-consulting.fr-20160304121500-u2ay8zrf83ih9fu3
US-826 [IMP] Change the way to check if products is not consistent on add multiple line wizard

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="UTF-8"?>
 
2
<openerp>
 
3
    <data>
 
4
    <!-- INCOMING SHIPMENT -->
 
5
        <record id="view_picking_in_form" model="ir.ui.view">
 
6
            <field name="name">view.picking.in.form</field>
 
7
            <field name="model">stock.picking</field>
 
8
            <field name="type">form</field>
 
9
            <field name="inherit_id" ref="stock.view_picking_in_form" />
 
10
            <field eval="300" name="priority"/>
 
11
            <field name="arch" type="xml">
 
12
                <data>
 
13
                    <xpath expr="/form" position="attributes">
 
14
                        <attribute name="hide_delete_button">1</attribute>
 
15
                    </xpath>
 
16
                </data>
 
17
            </field>
 
18
        </record>
 
19
        
 
20
        <record id="view_picking_in_tree" model="ir.ui.view">
 
21
            <field name="name">unifield.stock.picking.in.tree</field>
 
22
            <field name="model">stock.picking</field>
 
23
            <field name="type">tree</field>
 
24
            <field name="inherit_id" ref="stock.view_picking_in_tree" />
 
25
            <field eval="300" name="priority"/>
 
26
            <field name="arch" type="xml">
 
27
                <data>
 
28
                    <xpath expr="/tree" position="attributes">
 
29
                        <attribute name="hide_delete_button">1</attribute>
 
30
                        <attribute name="colors">blue:state in ('draft') and min_date &gt;= current_date;grey:state in ('done');red:state not in ('cancel', 'done') and min_date &lt; current_date</attribute>
 
31
                    </xpath>
 
32
                    <xpath expr="/tree/field[@name='state']" position="after">
 
33
                        <button name="delete_button" type="object" icon="gtk-del" string="Delete" states="draft"
 
34
                        confirm='Do you really want to delete selected record(s) ?'/>
 
35
                    </xpath>
 
36
                </data>
 
37
            </field>
 
38
        </record>
 
39
        
 
40
    <!-- INTERNAL MOVES -->
 
41
        <record id="view_picking_form" model="ir.ui.view">
 
42
            <field name="name">view.picking.form </field>
 
43
            <field name="model">stock.picking</field>
 
44
            <field name="type">form</field>
 
45
            <field name="inherit_id" ref="stock.view_picking_form" />
 
46
            <field eval="300" name="priority"/>
 
47
            <field name="arch" type="xml">
 
48
                <data>
 
49
                    <xpath expr="/form" position="attributes">
 
50
                        <attribute name="hide_delete_button">1</attribute>
 
51
                    </xpath>
 
52
                </data>
 
53
            </field>
 
54
        </record>
 
55
        
 
56
        <record id="vpicktree" model="ir.ui.view">
 
57
            <field name="name">stock.picking.tree</field>
 
58
            <field name="model">stock.picking</field>
 
59
            <field name="type">tree</field>
 
60
            <field name="inherit_id" ref="stock.vpicktree" />
 
61
            <field eval="300" name="priority"/>
 
62
            <field name="arch" type="xml">
 
63
                <data>
 
64
                    <xpath expr="/tree" position="attributes">
 
65
                        <attribute name="hide_delete_button">1</attribute>
 
66
                        <attribute name="colors">blue:state in ('draft') and min_date &gt;= current_date;grey:state in ('cancel');red:state not in ('cancel', 'done') and min_date &lt; current_date</attribute>
 
67
                    </xpath>
 
68
                    <xpath expr="/tree/field[@name='state']" position="after">
 
69
                        <button name="delete_button" type="object" icon="gtk-del" string="Delete" states="draft"
 
70
                        confirm='Do you really want to delete selected record(s) ?'/>
 
71
                    </xpath>
 
72
                </data>
 
73
            </field>
 
74
        </record>
 
75
        
 
76
        <!-- Delivery Orders : OUTGOING -->
 
77
        <record id="view_picking_out_form" model="ir.ui.view">
 
78
            <field name="name">stock.picking.out.form</field>
 
79
            <field name="model">stock.picking</field>
 
80
            <field name="type">form</field>
 
81
            <field name="inherit_id" ref="stock.view_picking_out_form" />
 
82
            <field name="arch" type="xml">
 
83
                <data>
 
84
                    <xpath expr="/form" position="attributes">
 
85
                        <attribute name='hide_delete_button'>1</attribute>
 
86
                    </xpath>
 
87
                </data>
 
88
            </field>
 
89
        </record>
 
90
        
 
91
        <record id="view_picking_out_tree" model="ir.ui.view">
 
92
            <field name="name">stock.picking.out.tree</field>
 
93
            <field name="model">stock.picking</field>
 
94
            <field name="type">tree</field>
 
95
            <field name="inherit_id" ref="stock.view_picking_out_tree" />
 
96
            <field name="arch" type="xml">
 
97
                <data>
 
98
                    <xpath expr="/tree" position="attributes">
 
99
                        <attribute name='hide_delete_button'>1</attribute>
 
100
                        <attribute name='colors'>blue:state in ('draft') and min_date &gt;= current_date;grey:state in ('cancel');red:state not in ('cancel', 'done') and min_date &lt; current_date</attribute>
 
101
                    </xpath>
 
102
                    <xpath expr="/tree/field[@name='state']" position="after">
 
103
                        <button name="delete_button" type="object" icon="gtk-del" string="Delete" 
 
104
                        attrs="{'invisible' : [('state','!=','draft')]}" confirm='Do you really want to delete selected record(s) ?'/>
 
105
                    </xpath>
 
106
                </data>
 
107
            </field>
 
108
        </record>
 
109
        
 
110
        <!-- PICKING -->
 
111
        <record id="view_picking_ticket_form" model="ir.ui.view">
 
112
            <field name="name">picking.ticket.form</field>
 
113
            <field name="model">stock.picking</field>
 
114
            <field name="type">form</field>
 
115
            <field name="inherit_id" ref="msf_outgoing.view_picking_ticket_form" />
 
116
            <field name="arch" type="xml">
 
117
                <data>
 
118
                    <xpath expr="/form" position="attributes">
 
119
                        <attribute name='hide_delete_button'>1</attribute>
 
120
                        <attribute name='hide_duplicate_button'>1</attribute>
 
121
                    </xpath>
 
122
                </data>
 
123
            </field>
 
124
        </record>
 
125
        
 
126
        <record id="view_picking_ticket_tree" model="ir.ui.view">
 
127
            <field name="name">picking.ticket.tree</field>
 
128
            <field name="model">stock.picking</field>
 
129
            <field name="type">tree</field>
 
130
            <field name="inherit_id" ref="msf_outgoing.view_picking_ticket_tree" />
 
131
            <field name="arch" type="xml">
 
132
                <data>
 
133
                    <xpath expr="/tree" position="attributes">
 
134
                        <attribute name='hide_delete_button'>1</attribute>
 
135
                    </xpath>
 
136
                    <xpath expr="/tree/button[@name='validate_picking']" position="after">
 
137
                        <button name="delete_button" type="object" icon="gtk-del" string="Delete" 
 
138
                        states='draft' confirm='Do you really want to delete selected record(s) ?'/>
 
139
                    </xpath>
 
140
                </data>
 
141
            </field>
 
142
        </record>
 
143
        
 
144
        <!-- PACKING -->
 
145
        <record id="view_packing_tree" model="ir.ui.view">
 
146
            <field name="name">picking.ticket.tree</field>
 
147
            <field name="model">stock.picking</field>
 
148
            <field name="type">tree</field>
 
149
            <field name="inherit_id" ref="msf_outgoing.view_packing_tree" />
 
150
            <field name="arch" type="xml">
 
151
                <data>
 
152
                    <xpath expr="/tree" position="attributes">
 
153
                        <attribute name='hide_delete_button'>1</attribute>
 
154
                    </xpath>
 
155
                    <xpath expr="/tree/field[@name='state']" position="after">
 
156
                        <button name="delete_button" type="object" icon="gtk-del" string="Delete" 
 
157
                        states='draft' confirm='Do you really want to delete selected record(s) ?'/>
 
158
                    </xpath>
 
159
                </data>
 
160
            </field>
 
161
        </record>
 
162
 
 
163
        <record id="real_average_consumption_tree_view" model="ir.ui.view">
 
164
            <field name="name">real.average.consumption.tree.view</field>
 
165
            <field name="model">real.average.consumption</field>
 
166
            <field name="type">tree</field>
 
167
            <field name="inherit_id" ref="consumption_calculation.real_average_consumption_tree_view" />
 
168
            <field name="arch" type="xml">
 
169
                <data>
 
170
                    <xpath expr="/tree" position="attributes">
 
171
                        <attribute name='hide_delete_button'>1</attribute>
 
172
                    </xpath>
 
173
                    <xpath expr="/tree/field[@name='state']" position="after">
 
174
                        <button name="delete_button" type="object" icon="gtk-del" string="Delete" 
 
175
                        states='draft'  confirm='Do you really want to delete selected record(s) ?'/>
 
176
                    </xpath>
 
177
                </data>
 
178
            </field>
 
179
        </record>
 
180
        
 
181
    </data>
 
182
</openerp>