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

« back to all changes in this revision

Viewing changes to kit/kit_view.xml

  • Committer: jf
  • Date: 2011-03-23 13:23:55 UTC
  • Revision ID: jf@tempo4-20110323132355-agyf1soy7m5ewatr
Initial Import

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
 
    
5
 
        <record id="view_composition_kit_form" model="ir.ui.view">
6
 
            <field name="name">composition.kit.form</field>
7
 
            <field name="model">composition.kit</field>
8
 
            <field name="type">form</field>
9
 
            <field name="arch" type="xml">
10
 
                <form string="Kit Composition" > <!-- the hide_duplicate_button="1" is defined in the fields view get as "Theoretical Kit Composition" and "Kit Composition List have the same view" -->
11
 
                        <group col="6" colspan="4">
12
 
                                <group col="4" colspan="4">
13
 
                                <field name="composition_type" invisible="True" />
14
 
                                <field name="composition_product_id" colspan="4" on_change="on_change_product_id(composition_product_id)" attrs="{'readonly': [('state', '!=', 'draft')]}" />
15
 
                                <field name="composition_kit_creation_id" attrs="{'invisible': [('state', '!=', 'in_production')]}" />
16
 
                        </group>
17
 
                        <group col="6" colspan="2">
18
 
                                <field name="composition_version_txt" attrs="{'required': [('composition_type', '=', 'theoretical')], 'invisible': [('composition_type', '!=', 'theoretical')], 'readonly': [('state', '!=', 'draft')]}" colspan="2" />
19
 
                                <field name="composition_version_id"
20
 
                                        context="{'wizard_composition_type': 'theoretical', 'composition_type': 'theoretical'}"
21
 
                                        attrs="{'invisible': [('composition_type', '!=', 'real')], 'readonly': [('state', '!=', 'draft')]}"
22
 
                                        domain="[('composition_product_id', '=', composition_product_id), ('composition_type', '=', 'theoretical'), ('state', '=', 'completed')]"
23
 
                                        colspan="2" />
24
 
                                <field name="composition_creation_date" colspan="2" attrs="{'readonly': [('state', '!=', 'draft')]}" />
25
 
                                <field name="composition_batch_check" invisible="True" colspan="2" />
26
 
                                <field name="composition_expiry_check" invisible="True" colspan="2" />
27
 
                                <field name="composition_reference" colspan="2" attrs="{'required': [('composition_type', '=', 'real'), ('composition_expiry_check', '=', False)], 'invisible': ['|', ('composition_expiry_check', '=', True), ('composition_type', '!=', 'real')], 'readonly': [('state', '!=', 'draft')]}" />
28
 
                                <field name="composition_lot_id" colspan="2"
29
 
                                        on_change="on_change_lot_id(composition_lot_id)"
30
 
                                        domain="[('product_id', '=', composition_product_id)]" attrs="{'required': [('composition_type', '=', 'real'), ('composition_expiry_check', '=', True)], 'invisible': ['|', ('composition_expiry_check', '=', False), ('composition_type', '!=', 'real')], 'readonly': [('state', '!=', 'draft')]}" />
31
 
                                <field name="composition_exp" colspan="2" attrs="{'invisible': [('composition_type', '!=', 'real')]}" />
32
 
                                <field name="active" attrs="{'invisible': [('composition_type', '!=', 'theoretical')]}" colspan="1" />
33
 
                                <button colspan="2" name="reset_to_version" type="object" string="Load items from Version" icon="gtk-sort-descending" attrs="{'invisible': ['|', ('composition_type', '!=', 'real'), ('state', '!=', 'draft')]}" />
34
 
                                <button colspan="2" name="modify_expiry_date" string="Modify Expiry Date" type="object" icon="terp-go-today" attrs="{'invisible': [('composition_type', '!=', 'real')]}" />
35
 
                        </group>
36
 
                    </group>
37
 
                    <notebook colspan="4">
38
 
                        <page string="Composition Items">
39
 
                                <field name="composition_item_ids" mode="tree,form" nolabel="True" widget="one2many_list" attrs="{'readonly': [('state', '!=', 'draft')]}" colspan="4">
40
 
                                        <form string="Theoretical Kit Item">
41
 
                                                    <group col="6" colspan="4">
42
 
                                                                <notebook colspan="4">
43
 
                                                                        <page string="Composition Item">
44
 
                                                                                        <field name="item_module" />
45
 
                                                                                        <field name="item_product_id" />
46
 
                                                                        <field name="item_qty" />
47
 
                                                                        <field name="item_uom_id" domain="[('uom_by_product', '=', item_product_id)]" />
48
 
                                                                </page>
49
 
                                                                <page string="Notes">
50
 
                                                                        <field name="item_description" nolabel="True" />
51
 
                                                                </page>
52
 
                                                                </notebook>
53
 
                                                    </group>
54
 
                                                </form>
55
 
                                        <tree string="Theoretical Kit Item" editable="top" colors="red: inactive_product==True">
56
 
                                                        <field name="item_module" />
57
 
                                                        <field name="item_product_id" on_change="on_product_change(item_product_id)" />
58
 
                                                        <field name="item_qty" on_change="onchange_uom_qty(item_uom_id, item_qty)" />
59
 
                                                        <field name="item_uom_id" on_change="onchange_uom_qty(item_uom_id, item_qty)" domain="[('uom_by_product', '=', item_product_id)]" />
60
 
                                                        <field name="item_asset_id" context="{'product_id': item_product_id}" domain="[('product_id', '=', item_product_id)]"
61
 
                                                                attrs="{'readonly': [('hidden_asset_mandatory', '=', False)]}" />
62
 
                                                        <field name="item_lot"
63
 
                                                                on_change="on_lot_change(item_product_id, item_lot, context)" 
64
 
                                                                attrs="{'readonly': [('hidden_batch_management_mandatory', '=', False)]}" />
65
 
                                                        <field name="item_exp" attrs="{'readonly': [('hidden_perishable_mandatory', '=', False)]}" />
66
 
                                                        <field name="hidden_asset_mandatory" invisible="True" />
67
 
                                                        <field name="hidden_batch_management_mandatory" />
68
 
                                    <field name="hidden_perishable_mandatory" />
69
 
                                    <field name="inactive_product" invisible="1" />
70
 
                                    <field name="inactive_error" readonly="1" />
71
 
                                                </tree>
72
 
                                </field>
73
 
                        </page>
74
 
                        <page string="Notes">
75
 
                                <field name="composition_description" nolabel="True" />
76
 
                        </page>
77
 
                    </notebook>
78
 
                    <group col="5" colspan="2">
79
 
                        <field name="state" colspan="3" />
80
 
                    </group>
81
 
                    <group col="7" colspan="2">
82
 
                        <button name="action_cancel" string="Cancel" type="object" icon="gtk-cancel" attrs="{'invisible': [('state', 'not in', ['draft'])]}" />
83
 
                        <button name="mark_as_inactive" string="Mark as Inactive" type="object" icon="gtk-missing-image" attrs="{'invisible': ['|', ('composition_type', '!=', 'theoretical'), ('active', '=', False)]}" />
84
 
                        <button name="mark_as_active" string="Mark as Active" type="object" icon="gtk-redo" attrs="{'invisible': ['|', ('composition_type', '!=', 'theoretical'), ('active', '=', True)]}" />
85
 
                        <button name="mark_as_completed" string="Mark as Completed" type="object" icon="gtk-go-forward" attrs="{'invisible': ['|', ('state', '!=', 'draft'), ('active', '=', False)]}" />
86
 
                        <button name="substitute_items" type="object" string="Substitute Items" icon="terp-stock_effects-object-colorize" attrs="{'invisible': ['|', ('composition_type', '!=', 'real'), ('state', '!=', 'completed')]}" />
87
 
                        <button name="de_kitting" string="De-Kitting" type="object" icon="gtk-dnd-multiple" attrs="{'invisible': ['|', ('composition_type', '!=', 'real'), ('state', '!=', 'completed')]}" />
88
 
                        <button name="close_kit" string="Close" type="object" icon="gtk-close" attrs="{'invisible': ['|', ('composition_type', '!=', 'real'), ('state', '!=', 'completed')]}" />
89
 
                    </group>
90
 
                </form>
91
 
            </field>
92
 
                </record>
93
 
                
94
 
                <record id="view_composition_kit_tree" model="ir.ui.view">
95
 
            <field name="name">composition.kit.tree</field>
96
 
            <field name="model">composition.kit</field>
97
 
            <field name="type">tree</field>
98
 
            <field name="arch" type="xml">
99
 
                <tree string="Kit Composition">
100
 
                        <field name="composition_type" invisible="True" />
101
 
                        <field name="composition_product_id" />
102
 
                        <field name="composition_version" />
103
 
                        <field name="composition_creation_date" />
104
 
                        <field name="composition_reference" invisible="True" />
105
 
                        <field name="composition_combined_ref_lot" />
106
 
                        <field name="composition_lot_id" invisible="True" />
107
 
                        <field name="composition_exp" />
108
 
                        <field name="state" />
109
 
                </tree>
110
 
            </field>
111
 
                </record>
112
 
                
113
 
                <record id="view_composition_kit_theoretical_filter" model="ir.ui.view">
114
 
            <field name="name">composition.kit.theoretical.filter</field>
115
 
            <field name="model">composition.kit</field>
116
 
            <field name="priority">1</field>
117
 
            <field name="type">search</field>
118
 
            <field name="arch" type="xml">
119
 
                <search string="Search Theoretical Kit Composition">
120
 
                    <filter icon="terp-document-new" name="draft" string="Draft" domain="[('state','=','draft')]" separator="1" />
121
 
                    <filter icon="terp-camera_test" name="completed" string="Completed" domain="[('state','=', 'completed')]" separator="1" />
122
 
                    <filter icon="terp-dialog-close" name="done" string="Closed" domain="[('state','=','done')]" />
123
 
                    <filter icon="gtk-cancel" name="cancel" string="Canceled" domain="[('state','=', 'cancel')]" separator="1" />
124
 
                    <separator orientation="vertical" />
125
 
                    <filter icon="gtk-missing-image" name="inactive" string="Show Inactive" domain="[('active', '=', False)]" separator="1" />
126
 
                    <separator orientation="vertical" />
127
 
                    <field name="composition_product_id" domain="[('type', '=', 'product'), ('subtype', '=', 'kit')]" select="1" />
128
 
                    <field name="composition_version_txt" select="1" />
129
 
                    <newline />
130
 
                                        <group expand="1" string="Nomenclature Filters...">
131
 
                                                <field name="nomen_manda_0_s"
132
 
                                                        domain="[('parent_id', '=', -1)]"
133
 
                                                         widget="selection"
134
 
                                                        on_change="onChangeSearchNomenclature(0, 'mandatory', nomen_manda_0_s, nomen_manda_1_s, nomen_manda_2_s, nomen_manda_3_s, True, context)" />
135
 
                                                <field name="nomen_manda_1_s"
136
 
                                                        domain="[('parent_id', '=', -1)]"
137
 
                                                         widget="selection"
138
 
                                                        on_change="onChangeSearchNomenclature(1, 'mandatory', nomen_manda_0_s, nomen_manda_1_s, nomen_manda_2_s, nomen_manda_3_s, True, context)" />
139
 
                                                <field name="nomen_manda_2_s"
140
 
                                                        domain="[('parent_id', '=', -1)]"
141
 
                                                         widget="selection"
142
 
                                                        on_change="onChangeSearchNomenclature(2, 'mandatory', nomen_manda_0_s, nomen_manda_1_s, nomen_manda_2_s, nomen_manda_3_s, True, context)" />
143
 
                                                <field name="nomen_manda_3_s"
144
 
                                                        domain="[('parent_id', '=', -1)]"
145
 
                                                         widget="selection"
146
 
                                                        on_change="onChangeSearchNomenclature(3, 'mandatory', nomen_manda_0_s, nomen_manda_1_s, nomen_manda_2_s, nomen_manda_3_s, True, context)" />
147
 
                                        </group>
148
 
                                        <newline />
149
 
                        <group expand="0" string="Group By..." colspan="4" col="10" >
150
 
                            <filter string="Product" icon="terp-product" domain="[]" context="{'group_by':'composition_product_id'}" />
151
 
                            <filter string="Version" icon="gtk-select-font" domain="[]" context="{'group_by':'composition_version'}" />
152
 
                            <filter string="State" icon="gtk-execute" domain="[]" context="{'group_by':'state'}"/>
153
 
                            <separator orientation="vertical"/>
154
 
                            <filter string="Creation Date" icon="terp-go-month" domain="[]" context="{'group_by':'composition_creation_date'}"/>
155
 
                        </group>
156
 
                </search>
157
 
            </field>
158
 
        </record>
159
 
        
160
 
        <record id="view_composition_kit_real_filter" model="ir.ui.view">
161
 
            <field name="name">composition.kit.real.filter</field>
162
 
            <field name="model">composition.kit</field>
163
 
            <field name="type">search</field>
164
 
            <field name="priority">2</field>
165
 
            <field name="arch" type="xml">
166
 
                <search string="Search Real Kit Composition">
167
 
                    <filter icon="terp-document-new" name="draft" string="Draft" domain="[('state','=','draft')]" separator="1" />
168
 
                    <filter icon="gtk-execute" name="in_production" string="In Production" domain="[('state','=', 'in_production')]" separator="1" />
169
 
                    <filter icon="terp-camera_test" name="completed" string="Completed" domain="[('state','=', 'completed')]" separator="1" />
170
 
                    <filter icon="terp-dialog-close" name="done" string="Closed" domain="[('state','=','done')]" />
171
 
                    <filter icon="gtk-cancel" name="cancel" string="Canceled" domain="[('state','=', 'cancel')]" separator="1" />
172
 
                    <separator orientation="vertical" />
173
 
                    <field name="composition_product_id" domain="[('type', '=', 'product'), ('subtype', '=', 'kit')]" select="1" />
174
 
                    <field name="composition_version_id"
175
 
                        select="1"
176
 
                        context="{'wizard_composition_type': 'theoretical', 'composition_type': 'theoretical'}"
177
 
                        domain="[('composition_type', '=', 'theoretical'), ('state', '=', 'completed')]" />
178
 
                    <field name="composition_combined_ref_lot" select="1" />
179
 
                    <field name="composition_exp" select="1" />
180
 
                    <newline />
181
 
                                        <group expand="1" string="Nomenclature Filters...">
182
 
                                                <field name="nomen_manda_0_s"
183
 
                                                        domain="[('parent_id', '=', -1)]"
184
 
                                                         widget="selection"
185
 
                                                        on_change="onChangeSearchNomenclature(0, 'mandatory', nomen_manda_0_s, nomen_manda_1_s, nomen_manda_2_s, nomen_manda_3_s, True, context)" />
186
 
                                                <field name="nomen_manda_1_s"
187
 
                                                        domain="[('parent_id', '=', -1)]"
188
 
                                                         widget="selection"
189
 
                                                        on_change="onChangeSearchNomenclature(1, 'mandatory', nomen_manda_0_s, nomen_manda_1_s, nomen_manda_2_s, nomen_manda_3_s, True, context)" />
190
 
                                                <field name="nomen_manda_2_s"
191
 
                                                        domain="[('parent_id', '=', -1)]"
192
 
                                                         widget="selection"
193
 
                                                        on_change="onChangeSearchNomenclature(2, 'mandatory', nomen_manda_0_s, nomen_manda_1_s, nomen_manda_2_s, nomen_manda_3_s, True, context)" />
194
 
                                                <field name="nomen_manda_3_s"
195
 
                                                        domain="[('parent_id', '=', -1)]"
196
 
                                                         widget="selection"
197
 
                                                        on_change="onChangeSearchNomenclature(3, 'mandatory', nomen_manda_0_s, nomen_manda_1_s, nomen_manda_2_s, nomen_manda_3_s, True, context)" />
198
 
                                        </group>
199
 
                                        <newline />
200
 
                        <group expand="0" string="Group By..." colspan="4" col="10">
201
 
                            <filter string="Product" icon="terp-product" domain="[]" context="{'group_by':'composition_product_id'}" />
202
 
                            <filter string="Version" icon="gtk-select-font" domain="[]" context="{'group_by':'composition_version'}" />
203
 
                            <filter string="State" icon="gtk-execute" domain="[]" context="{'group_by':'state'}"/>
204
 
                            <separator orientation="vertical"/>
205
 
                            <filter string="Creation Date" icon="terp-go-month" domain="[]" context="{'group_by':'composition_creation_date'}"/>
206
 
                            <separator orientation="vertical"/>
207
 
                            <filter string="Batch Nb" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'composition_combined_ref_lot'}"/>
208
 
                            <filter string="Expiry Date" icon="terp-go-today" domain="[]" context="{'group_by':'composition_exp'}"/>
209
 
                        </group>
210
 
                </search>
211
 
            </field>
212
 
        </record>
213
 
                
214
 
                <record id="view_composition_kit_item_form" model="ir.ui.view">
215
 
            <field name="name">composition.kit.item.form</field>
216
 
            <field name="model">composition.item</field>
217
 
            <field name="type">form</field>
218
 
            <field name="arch" type="xml">
219
 
                <form string="Kit Item" hide_new_button="True" hide_delete_button="True" hide_duplicate_button="True">
220
 
                    <group col="6" colspan="4">
221
 
                                <notebook colspan="4">
222
 
                                        <page string="Composition Item">
223
 
                                                <field name="item_kit_type" invisible="True" />
224
 
                                                        <field name="item_module" readonly="True" />
225
 
                                                        <field name="item_product_id" readonly="True" />
226
 
                                        <field name="item_qty" readonly="True" />
227
 
                                        <field name="item_uom_id" readonly="True" />
228
 
                                        <field name="item_asset_id" attrs="{'invisible': [('item_kit_type', '!=', 'real')]}" readonly="True" />
229
 
                                        <field name="item_lot" attrs="{'invisible': [('item_kit_type', '!=', 'real')]}" readonly="True" />
230
 
                                                <field name="item_exp" attrs="{'invisible': [('item_kit_type', '!=', 'real')]}" readonly="True" />
231
 
                                </page>
232
 
                                <page string="Notes">
233
 
                                        <field name="item_description" nolabel="True" />
234
 
                                </page>
235
 
                                </notebook>
236
 
                    </group>
237
 
                    <field name="state" invisible="True" />
238
 
                </form>
239
 
            </field>
240
 
                </record>
241
 
                
242
 
                <record id="view_composition_kit_item_tree" model="ir.ui.view">
243
 
            <field name="name">composition.kit.item.tree</field>
244
 
            <field name="model">composition.item</field>
245
 
            <field name="type">tree</field>
246
 
            <field name="arch" type="xml">
247
 
                <tree string="Kit Item" editable="top" hide_new_button="True" hide_delete_button="True">
248
 
                        <field name="item_kit_id" />
249
 
                        <field name="item_module" readonly="True" />
250
 
                        <field name="item_product_id" on_change="on_product_change(item_product_id)" readonly="True" />
251
 
                        <field name="item_qty" readonly="True" on_change="onchange_uom_qty(item_uom_id, item_qty)" />
252
 
                        <field name="item_uom_id" readonly="True" on_change="onchange_uom_qty(item_uom_id, item_qty)" />
253
 
                        <field name="item_asset_id" readonly="True" />
254
 
                        <field name="item_lot" readonly="True" />
255
 
                        <field name="item_exp" readonly="True" />
256
 
                        <field name="hidden_batch_management_mandatory" />
257
 
                        <field name="hidden_perishable_mandatory" />
258
 
                        <field name="state" invisible="True" />
259
 
                </tree>
260
 
            </field>
261
 
                </record>
262
 
                
263
 
                <record id="view_composition_kit_theoretical_item_filter" model="ir.ui.view">
264
 
            <field name="name">composition.kit.theoretical.item.filter</field>
265
 
            <field name="model">composition.item</field>
266
 
            <field name="type">search</field>
267
 
            <field name="priority">2</field><!-- because of links from product.product -->
268
 
            <field name="arch" type="xml">
269
 
                <search string="Search Theoretical Kit Composition Item">
270
 
                    <field name="item_kit_id" domain="[('composition_type', '=', 'theoretical')]" select="1" />
271
 
                    <field name="item_module" select="1" />
272
 
                    <field name="item_product_id" select="1" />
273
 
                                        <newline />
274
 
                        <group expand="0" string="Group By..." colspan="4" col="10">
275
 
                                <filter string="Kit" icon="gtk-dnd-multiple" domain="[]" context="{'group_by':'item_kit_id'}" />
276
 
                                <separator orientation="vertical"/>
277
 
                                <filter string="Module" icon="gtk-directory" domain="[]" context="{'group_by':'item_module'}" />
278
 
                            <filter string="Product" icon="terp-product" domain="[]" context="{'group_by':'item_product_id'}" />
279
 
                        </group>
280
 
                </search>
281
 
            </field>
282
 
        </record>
283
 
                
284
 
                <record id="view_composition_kit_real_item_filter" model="ir.ui.view">
285
 
            <field name="name">composition.kit.real.item.filter</field>
286
 
            <field name="model">composition.item</field>
287
 
            <field name="type">search</field>
288
 
            <field name="priority">1</field><!-- because of links from product.product -->
289
 
            <field name="arch" type="xml">
290
 
                <search string="Search Real Kit Composition Item">
291
 
                    <field name="item_kit_id" domain="[('composition_type', '=', 'real')]" select="1" />
292
 
                    <field name="item_module" select="1" />
293
 
                    <field name="item_product_id" select="1" />
294
 
                    <field name="item_lot" select="1" />
295
 
                    <field name="item_exp" select="1" />
296
 
                                        <newline />
297
 
                        <group expand="0" string="Group By..." colspan="4" col="10">
298
 
                                <filter string="Kit" icon="gtk-dnd-multiple" domain="[]" context="{'group_by':'item_kit_id'}" />
299
 
                                <separator orientation="vertical"/>
300
 
                                <filter string="Module" icon="gtk-directory" domain="[]" context="{'group_by':'item_module'}" />
301
 
                            <filter string="Product" icon="terp-product" domain="[]" context="{'group_by':'item_product_id'}" />
302
 
                            <separator orientation="vertical"/>
303
 
                            <filter string="Batch Nb" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'item_lot'}" />
304
 
                            <filter string="Expiry Date" icon="terp-go-today" domain="[]" context="{'group_by':'item_exp'}" />
305
 
                        </group>
306
 
                </search>
307
 
            </field>
308
 
        </record>
309
 
                
310
 
                <record id="kit_composition_theoretical_action" model="ir.actions.act_window">
311
 
                        <field name="name">Theoretical Kit Composition</field>
312
 
                        <field name="res_model">composition.kit</field>
313
 
                        <field name="view_type">form</field>
314
 
                        <field name="view_mode">tree,form</field>
315
 
                        <field name="domain">[('composition_type', '=', 'theoretical')]</field>
316
 
                        <field name="context">{'search_default_completed': True, 'composition_type':'theoretical'}</field>
317
 
                        <field name="search_view_id" ref="view_composition_kit_theoretical_filter" />
318
 
                </record>
319
 
                
320
 
                <record id="kit_composition_theoretical_item_action" model="ir.actions.act_window">
321
 
                        <field name="name">Theoretical Kit Item</field>
322
 
                        <field name="res_model">composition.item</field>
323
 
                        <field name="view_type">form</field>
324
 
                        <field name="view_mode">tree,form</field>
325
 
                        <field name="domain">[('item_kit_type', '=', 'theoretical')]</field>
326
 
                        <field name="context">{'composition_type':'theoretical'}</field>
327
 
                        <field name="search_view_id" ref="view_composition_kit_theoretical_item_filter" />
328
 
                </record>
329
 
                
330
 
                <record id="kit_composition_real_action" model="ir.actions.act_window">
331
 
                        <field name="name">Kit Composition List</field>
332
 
                        <field name="res_model">composition.kit</field>
333
 
                        <field name="view_type">form</field>
334
 
                        <field name="view_mode">tree,form</field>
335
 
                        <field name="domain">[('composition_type', '=', 'real')]</field>
336
 
                        <field name="context">{'search_default_completed': True, 'composition_type':'real'}</field>
337
 
                        <field name="search_view_id" ref="view_composition_kit_real_filter" />
338
 
                </record>
339
 
                
340
 
                <record id="kit_composition_real_item_action" model="ir.actions.act_window">
341
 
                        <field name="name">Kit Composition Item</field>
342
 
                        <field name="res_model">composition.item</field>
343
 
                        <field name="view_type">form</field>
344
 
                        <field name="view_mode">tree,form</field>
345
 
                        <field name="domain">[('item_kit_type', '=', 'real')]</field>
346
 
                        <field name="context">{'composition_type':'real'}</field>
347
 
                        <field name="search_view_id" ref="view_composition_kit_real_item_filter" />
348
 
                </record>
349
 
                
350
 
                <record id="kit_composition_real_action2" model="ir.actions.act_window">
351
 
                        <field name="name">Kit Composition List</field>
352
 
                        <field name="res_model">composition.kit</field>
353
 
                        <field name="view_type">form</field>
354
 
                        <field name="view_mode">tree,form</field>
355
 
                        <field name="domain">[('composition_type', '=', 'real'),('composition_product_id', '=', active_id)]</field>
356
 
                        <field name="context">{'composition_type':'real'}</field>
357
 
                        <field name="search_view_id" ref="view_composition_kit_real_filter" />
358
 
                </record>
359
 
                
360
 
                <record id="ir_open_composition_list_view" model="ir.values">
361
 
                    <field name="key2">client_action_relate</field>
362
 
                    <field name="model">product.product</field>
363
 
                    <field name="name">Composition Lists</field>
364
 
                    <field eval="'ir.actions.act_window,%d'%ref('kit_composition_real_action2')" name="value"/>
365
 
                    <field name="key">action</field>
366
 
                    <field eval="True" name="object"/>
367
 
                </record>
368
 
                
369
 
                <menuitem id="kit_management" name="Kit Management" parent="product_attributes.menu_main_product" sequence="10" />
370
 
                <menuitem id="kit_theoretical" name="Theoretical Kit" parent="kit_management" sequence="1" />
371
 
                <menuitem action="kit_composition_theoretical_action" id="kit_composition_theoretical_menu" parent="kit_theoretical" sequence="1" />
372
 
                <menuitem action="kit_composition_theoretical_item_action" id="kit_composition_theoretical_item_menu" parent="kit_theoretical" sequence="10" />
373
 
                <menuitem id="kit_real" name="Composition List" parent="kit_management" sequence="10" />
374
 
                <menuitem action="kit_composition_real_action" id="kit_composition_real_menu" parent="kit_real" sequence="1" />
375
 
                <menuitem action="kit_composition_real_item_action" id="kit_composition_real_item_menu" parent="kit_real" sequence="10" />
376
 
                
377
 
                <record id="purchase_order_form" model="ir.ui.view">
378
 
            <field name="name">purchase.order.form</field>
379
 
            <field name="model">purchase.order</field>
380
 
                        <field name="type">form</field>
381
 
                        <field name="inherit_id" ref="purchase.purchase_order_form" />
382
 
            <field name="priority">1</field>
383
 
                        <field name="arch" type="xml">
384
 
                                <data>
385
 
                                        <field name="price_subtotal" position="after">
386
 
                                                <field name="kit_pol_check" invisible="True" />
387
 
                                                <field name="po_state_stored" invisible="True" />
388
 
                                                <button name="de_kitting" context="{'product_id': product_id}" string="Replace with kit components..." type="object" icon="gtk-dnd-multiple" attrs="{'invisible':['|', ('kit_pol_check', '=', False), ('po_state_stored', '!=', 'confirmed')]}" />
389
 
                                        </field>
390
 
                                </data>
391
 
                        </field>
392
 
                </record>
393
 
                
394
 
        <record id="view_order_form_inherit" model="ir.ui.view">
395
 
            <field name="name">sale.order.form.inherit</field>
396
 
            <field name="model">sale.order</field>
397
 
            <field name="type">form</field>
398
 
            <field name="inherit_id" ref="sale.view_order_form"/>
399
 
            <field name="priority" eval="4"/>
400
 
            <field name="arch" type="xml">
401
 
                <data>
402
 
                    <xpath expr="/form/notebook/page[@string='Sales Order']/field[@name='order_line']/tree/field[@name='price_subtotal']" position="after">
403
 
                        <field name="kit_pol_check_sale_order_line" invisible="True" />
404
 
                        <field name="so_state_stored" invisible="True" />
405
 
                        <button name="de_kitting" context="{'product_id': product_id}" string="Replace with kit components..." type="object" icon="gtk-dnd-multiple" attrs="{'invisible':['|', ('kit_pol_check_sale_order_line', '=', False), ('so_state_stored', 'not in', ['draft', 'validated'])]}" />
406
 
                    </xpath>
407
 
                </data>
408
 
            </field>
409
 
        </record>
410
 
                
411
 
                <record id="purchase_order_line_form_view" model="ir.ui.view">
412
 
            <field name="name">purchase.order.line.form.view</field>
413
 
            <field name="model">purchase.order.line</field>
414
 
            <field name="type">form</field>
415
 
            <field name="inherit_id" ref="purchase.purchase_order_line_form" />
416
 
            <field name="priority">1</field>
417
 
            <field name="arch" type="xml">
418
 
                <data>
419
 
                        <field name="company_id" position="after">
420
 
                                                <button name="de_kitting" string="De-Kitting" type="object" icon="gtk-dnd-multiple" colspan="2" invisible="True" />
421
 
                                        </field>
422
 
                </data>
423
 
            </field>
424
 
        </record>
425
 
        
426
 
    </data>
427
 
</openerp>