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

« back to all changes in this revision

Viewing changes to product_asset/product_asset_view.xml

  • Committer: chloups208
  • Date: 2011-05-03 13:42:32 UTC
  • mto: (140.1.1 unifield-wm)
  • mto: This revision was merged to the branch mainline in revision 142.
  • Revision ID: chloups208@chloups208-laptop-20110503134232-omqmqbkrr8f3detr
[UF-33] correction of asset which is now linked to stock.move in a wizard when processing the stock.picking

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
                -->
16
16
 
17
17
                <!-- internal moves -->
 
18
                <!--
 
19
                        always visible due to openerp bug, attrs does not respond to
 
20
                        modification from on_change function attrs="{'invisible':
 
21
                        [('subtype', '!=', 'asset')]}" />
 
22
                -->
18
23
                <record id="view_picking_form" model="ir.ui.view">
19
24
                        <field name="name">stock.picking.form</field>
20
25
                        <field name="model">stock.picking</field>
22
27
                        <field name="inherit_id" ref="stock.view_picking_form" />
23
28
                        <field name="arch" type="xml">
24
29
                                <data>
25
 
 
26
 
                                        <xpath expr="//form[@string='Stock Moves']//field[@name='product_id']"
 
30
                                        <xpath expr="//tree[@string='Stock Moves']/field[@name='product_id']"
27
31
                                                position="after">
28
 
                                                <field name="asset_id" domain="[('product_id', '=', product_id)]" />
29
 
                                                <!--
30
 
                                                        always visible due to openerp bug, attrs does not respond to
31
 
                                                        modification from on_change function attrs="{'invisible':
32
 
                                                        [('subtype', '!=', 'asset')]}" />
33
 
                                                -->
34
 
                                                <field name="subtype" invisible="True" />
 
32
                                                <field name="asset_id" />
35
33
                                        </xpath>
36
 
 
37
34
                                </data>
38
35
                        </field>
39
36
                </record>
40
37
 
41
38
 
42
39
                <!-- incoming shipments -->
 
40
                <!--
 
41
                        always visible due to openerp bug, attrs does not respond to
 
42
                        modification from on_change function attrs="{'invisible':
 
43
                        [('subtype', '!=', 'asset')]}" />
 
44
                -->
43
45
                <record id="view_picking_in_form" model="ir.ui.view">
44
46
                        <field name="name">stock.picking.in.form</field>
45
47
                        <field name="model">stock.picking</field>
47
49
                        <field name="inherit_id" ref="stock.view_picking_in_form" />
48
50
                        <field name="arch" type="xml">
49
51
                                <data>
50
 
 
51
 
                                        <xpath expr="//form[@string='Stock Moves']//field[@name='product_id']"
 
52
                                        <xpath expr="//tree[@string='Stock Moves']/field[@name='product_id']"
52
53
                                                position="after">
53
 
                                                <field name="asset_id" domain="[('product_id', '=', product_id)]" />
54
 
                                                <!--
55
 
                                                        always visible due to openerp bug, attrs does not respond to
56
 
                                                        modification from on_change function attrs="{'invisible':
57
 
                                                        [('subtype', '!=', 'asset')]}" />
58
 
                                                -->
59
 
                                                <field name="subtype" invisible="True" />
 
54
                                                <field name="asset_id" />
60
55
                                        </xpath>
61
 
 
62
56
                                </data>
63
57
                        </field>
64
58
                </record>
65
59
 
66
60
 
 
61
                <!--
 
62
                        always visible due to openerp bug, attrs does not respond to
 
63
                        modification from on_change function attrs="{'invisible':
 
64
                        [('subtype', '!=', 'asset')]}" />
 
65
                -->
67
66
                <record id="view_picking_out_form" model="ir.ui.view">
68
67
                        <field name="name">stock.picking.out.form</field>
69
68
                        <field name="model">stock.picking</field>
71
70
                        <field name="inherit_id" ref="stock.view_picking_out_form" />
72
71
                        <field name="arch" type="xml">
73
72
                                <data>
74
 
 
75
 
                                        <xpath expr="//form[@string='Stock Moves']//field[@name='product_id']"
 
73
                                        <xpath expr="//tree[@string='Stock Moves']/field[@name='product_id']"
76
74
                                                position="after">
77
 
                                                <field name="asset_id" domain="[('product_id', '=', product_id)]" />
78
 
                                                <!--
79
 
                                                        always visible due to openerp bug, attrs does not respond to
80
 
                                                        modification from on_change function attrs="{'invisible':
81
 
                                                        [('subtype', '!=', 'asset')]}" />
82
 
                                                -->
83
 
                                                <field name="subtype" invisible="True" />
 
75
                                                <field name="asset_id" />
84
76
                                        </xpath>
85
 
 
86
77
                                </data>
87
78
                        </field>
88
79
                </record>
103
94
                                                <field name="subtype" attrs="{'invisible':[('type','!=','product')]}" />
104
95
                                                <field name="asset_type_id" widget="selection"
105
96
                                                        attrs="{'invisible':[('subtype','!=','asset')], 'required':[('subtype','=','asset')]}" />
106
 
 
107
 
 
108
97
                                        </field>
109
98
 
110
 
                                        <!--
111
 
                                                <page string="Information" position="after"> <page string="Assets"
112
 
                                                attrs="{'invisible':[('subtype','!=','asset')]}"> <field
113
 
                                                colspan="4" name="asset_ids" nolabel="True" mode="tree,form"
114
 
                                                widget="one2many_list"
115
 
                                                default_get="{'prod_int_code':parent.default_code,
116
 
                                                'prod_int_name': parent.name, 'asset_type_id':
117
 
                                                parent.asset_type_id.id}"> <form string="Asset"> <group
118
 
                                                colspan="4" col="6"> <group colspan="4" col="2"> <separator
119
 
                                                string="Product" colspan="2" /> <field name="prod_int_name" />
120
 
                                                <field name="prod_int_code" /> <field name="name" /> </group>
121
 
                                                <group colspan="2" col="2"> <separator string="Codes" colspan="2"
122
 
                                                /> <field name="asset_code" /> <field name="prod_nomenc_code" />
123
 
                                                </group> <group colspan="4" col="2"> <separator
124
 
                                                string="Characteristics" colspan="2" /> <field
125
 
                                                name="asset_type_id" /> </group> </group> <group colspan="2"
126
 
                                                col="2"> <separator string="HQ Reference" colspan="2" /> <field
127
 
                                                name="hq_local_ref" /> <field name="hq_asset_name" /> <field
128
 
                                                name="hq_serial_nb" /> <field name="hq_brand" /> <field
129
 
                                                name="hq_type" /> <field name="hq_model" /> </group> <group
130
 
                                                colspan="2" col="2"> <separator string="Traceability" colspan="2"
131
 
                                                /> <field name="trac_orig_req_ref" /> <field
132
 
                                                name="trac_orig_mission_code" /> <field name="trac_sourc_ref" />
133
 
                                                <newline /> <field name="trac_arriv_date" /> <field
134
 
                                                name="trac_receipt_place" /> </group> <group colspan="2" col="2">
135
 
                                                <separator string="Invoice" colspan="2" /> <field name="invo_num"
136
 
                                                /> <field name="invo_date" /> <field name="invo_val_curr" />
137
 
                                                <field name="invo_supplier" /> <field name="invo_donator_code" />
138
 
                                                </group> </form> </field> </page> </page>
139
 
                                        -->
140
 
 
141
 
 
142
99
                                </data>
143
100
                        </field>
144
101
                </record>
149
106
                        src_model="product.product" />
150
107
 
151
108
                <act_window id="product_2_events_normal_link" context="{}"
152
 
                        domain="[('product_id', '=', active_id)]" name="Follow Up Events" res_model="product.asset.event"
153
 
                        src_model="product.product" />
 
109
                        domain="[('product_id', '=', active_id)]" name="Follow Up Events"
 
110
                        res_model="product.asset.event" src_model="product.product" />
154
111
 
155
112
                <!--
156
113
                        Main asset form