~credativ/openobject-addons/elico-7.0-fixes

« back to all changes in this revision

Viewing changes to mrp_move_direct/mrp_view.xml

  • Committer:
  • Date: 2013-08-23 03:28:08 UTC
  • mfrom: (3.1.4 elico-7.0)
  • Revision ID: elicoidal@hotmail.com-20130823032808-ikvuppdmwbasz6zy
[ADD] account_invoice_line, mrp_move_direct, purchase_price_list_item, purchase_po_price, purchase_control_supplier

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
        <!-- Production Order -->
 
5
        
 
6
        <record id="view_mo_add_product_form" model="ir.ui.view">
 
7
            <field name="name">Mo Add Product form</field>
 
8
            <field name="model">stock.move.add</field>
 
9
            <field name="arch" type="xml">
 
10
            <form string="Stock Moves" version="7.0">
 
11
                <group>
 
12
                    <group>
 
13
                        <field name="product_id" on_change="onchange_product_id(product_id)"/>
 
14
                        <label for="product_qty"/>
 
15
                        <div>
 
16
                            <field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" class="oe_inline"/>
 
17
                            <field name="product_uom" string="Unit Of Measure" groups="product.group_uom" class="oe_inline"/>
 
18
                        </div>
 
19
                            <label for="product_uos_qty" groups="product.group_uos"/>
 
20
                            <div groups="product.group_uos">
 
21
                                <field name="product_uos_qty" on_change="onchange_uos_quantity(product_id, product_uos_qty, product_uos, product_uom)" class="oe_inline"/>
 
22
                                <field name="product_uos" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" class="oe_inline"/>
 
23
                            </div>
 
24
                    </group>
 
25
                    <group>                                
 
26
                        <field name="date_expected"/>
 
27
 
 
28
                        <field name="location_id" domain="[('usage','=','internal')]"/>
 
29
                        <field name="location_dest_id" domain="[('usage','=','production')]" groups="stock.group_locations"/>
 
30
                        
 
31
                        <label for="prodlot_id"/>
 
32
                        <div>
 
33
                                <field name="prodlot_id" groups="stock.group_production_lot"
 
34
                                context="{'location_id':location_id, 'product_id':product_id}"
 
35
                                domain="[('product_id','=?',product_id)]"
 
36
                                on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id, product_uom)" class="oe_inline"/>
 
37
                        </div>
 
38
                    </group>
 
39
                </group>
 
40
                <footer>
 
41
                    <button name="add_mo_product" string="Add Products" type="object" class="oe_highlight"/>
 
42
                         or
 
43
                        <button string="Cancel" class="oe_link" special="cancel" />
 
44
                </footer>
 
45
            </form>
 
46
            </field>
 
47
        </record>
 
48
        
 
49
        <record id="action_mo_add_product" model="ir.actions.act_window">
 
50
            <field name="name">Add  Products</field>
 
51
            <field name="res_model">stock.move.add</field>
 
52
            <field name="type">ir.actions.act_window</field>
 
53
            <field name="view_type">form</field>
 
54
            <field name="view_mode">form</field>
 
55
            <field name="domain">[]</field>
 
56
            <field name="target">new</field>
 
57
            <field name="view_id" ref="view_mo_add_product_form"/>
 
58
            <field name="context">{}</field>
 
59
        </record>
 
60
 
 
61
        <record id="ir_mo_add_product" model="ir.values">
 
62
            <field name="key2">tree_but_action</field>
 
63
            <field name="model">stock.move.add</field>
 
64
            <field name="name">Add Products</field>
 
65
            <field eval="'ir.actions.act_window,'+str(action_mo_add_product)" name="value"/>
 
66
        </record>
 
67
 
 
68
        <!-- Production Order -->
 
69
        <record id="mrp_move_direct_production_form_view" model="ir.ui.view">
 
70
            <field name="name">mrp.production.form</field>
 
71
            <field name="model">mrp.production</field>
 
72
            <field name="type">form</field>
 
73
            <field name="inherit_id" ref="mrp.mrp_production_form_view"/>
 
74
            <field name="arch" type="xml">
 
75
                <xpath expr="//field[@name='move_lines']/tree/button[@string='Scrap Products']" position="after">
 
76
                                <button name="action_consume_cancel"
 
77
                                        string="Cancel Move" type="object"
 
78
                                        icon="gtk-stop" states="draft,waiting,confirmed,assigned"/>
 
79
                    </xpath>
 
80
                    <xpath expr="//field[@name='move_lines']" position="after">
 
81
                                <button name="%(mrp_move_direct.action_mo_add_product)d"
 
82
                            string="Add Products" type="action" icon="gtk-justify-fill" states="ready,in_production,confirmed" 
 
83
                            context="{'mo_id': active_id, 'location_id': location_src_id}" colspan="2"/>
 
84
                    </xpath>
 
85
            </field>
 
86
            </record>
 
87
 
 
88
        <!-- record id="view_move_form_mrp_direct" model="ir.ui.view">
 
89
            <field name="name">stock.move.form.mrp.direct</field>
 
90
            <field name="model">stock.move</field>
 
91
            <field name="inherit_id" ref="stock.view_move_form"/>
 
92
            <field name="arch" type="xml">
 
93
                <xpath expr="//group[@name='destination_grp']" position="after">
 
94
                        <group name="cancel_4mrp" string="Special" groups="mrp.group_mrp_manager">
 
95
                                <button name="action_cancel" states="draft,waiting,assigned,confirmed" string="_Cancel" type="object"/>
 
96
                    </group>
 
97
                    </xpath>
 
98
            </field>
 
99
            </record -->            
 
100
                
 
101
            
 
102
       <record id="view_scrap_move_wizard" model="ir.ui.view">
 
103
            <field name="name">Move Scrap Directly</field>
 
104
            <field name="model">move.scrap.directly</field>
 
105
            <field name="arch" type="xml">
 
106
                <form string="Move Scrap Directly" version="7.0">
 
107
                    <separator string="Move Scrap Directly"/>
 
108
                    <group>
 
109
                        <field name="product_id"  readonly="1"/>
 
110
                        <label for="product_qty"/>
 
111
                        <div>
 
112
                            <field name="product_qty" class="oe_inline" readonly="1"/>
 
113
                            <field name="product_uom" class="oe_inline" readonly="1" groups="product.group_uom"/>
 
114
                        </div>
 
115
                        <field name="location_id" string="Scrap Location" widget="selection"
 
116
                            domain="[('usage','!=','view'),('scrap_location','=',True)]" groups="stock.group_locations"/>
 
117
                    </group>
 
118
                    <footer>
 
119
                        <button name="move_scrap_dir" string="Ok" type="object" class="oe_highlight"  />
 
120
                        or
 
121
                        <button string="Cancel" class="oe_link" special="cancel" />
 
122
                    </footer>
 
123
                </form>
 
124
            </field>
 
125
        </record>
 
126
 
 
127
        <record id="move_scrap_dir" model="ir.actions.act_window">
 
128
            <field name="name">Move Scrap Directly</field>
 
129
            <field name="type">ir.actions.act_window</field>
 
130
            <field name="res_model">move.scrap.directly</field>
 
131
            <field name="view_type">form</field>
 
132
            <field name="view_mode">form</field>
 
133
            <field name="target">new</field>
 
134
        </record>
 
135
        
 
136
        <record id="view_move_form_dirscrap" model="ir.ui.view">
 
137
            <field name="name">stock.move.form.dirscrap</field>
 
138
            <field name="model">stock.move</field>
 
139
            <field name="inherit_id" ref="stock.view_move_form"/>
 
140
            <field name="arch" type="xml">
 
141
                <xpath expr="/form/sheet//button[@string='Scrap']" position="after">
 
142
                    <button name="%(mrp_move_direct.move_scrap_dir)d"
 
143
                        string="Scrap Directly" type="action"
 
144
                        icon="terp-gtk-jump-to-ltr" context="{'scrap': True}"
 
145
                        states="draft,waiting,confirmed,assigned"/>
 
146
                </xpath>
 
147
            </field>
 
148
        </record>
 
149
        
 
150
        <!--record id="view_move_picking_form_dirscrap" model="ir.ui.view">
 
151
            <field name="name">stock.move.picking.form.discrap</field>
 
152
            <field name="model">stock.move</field>
 
153
            <field name="inherit_id" ref="stock.view_move_picking_form"/>
 
154
            <field name="arch" type="xml">
 
155
                <xpath expr="//button[@string='Scrap']" position="replace">
 
156
                        <button name="%(mrp_move_direct.move_scrap_dir)d"
 
157
                        string="Scrap Directly" type="action"
 
158
                        icon="terp-gtk-jump-to-ltr" context="{'scrap': True}"
 
159
                        states="draft,waiting,confirmed,assigned" />
 
160
                </xpath>
 
161
            </field>
 
162
        </record-->
 
163
 
 
164
        <record id="view_move_tree_dirscrap" model="ir.ui.view">
 
165
            <field name="name">stock.move.tree.discrap</field>
 
166
            <field name="model">stock.move</field>
 
167
            <field name="inherit_id" ref="stock.view_move_tree"/>
 
168
            <field name="arch" type="xml">
 
169
                <xpath expr="//field[@name='tracking_id']" position="before">
 
170
                    <button name="%(mrp_move_direct.move_scrap_dir)d"
 
171
                        string="Scrap Directly" type="action"
 
172
                        icon="terp-gtk-jump-to-ltr" context="{'scrap': True}"
 
173
                        states="draft,waiting,confirmed,assigned"/>
 
174
                </xpath>
 
175
            </field>
 
176
        </record>
 
177
 
 
178
        <record id="view_move_tree_reception_picking_dirscrap" model="ir.ui.view">
 
179
            <field name="name">stock.move.tree.reception.discrap</field>
 
180
            <field name="model">stock.move</field>
 
181
            <field name="inherit_id" ref="stock.view_move_tree_reception_picking"/>
 
182
            <field name="arch" type="xml">
 
183
                <xpath expr="//field[@name='tracking_id']" position="before">
 
184
                    <button name="%(mrp_move_direct.move_scrap_dir)d"
 
185
                        string="Scrap Directly" type="action"
 
186
                        icon="terp-gtk-jump-to-ltr" context="{'scrap': True}"
 
187
                        states="draft,waiting,confirmed,assigned"/>
 
188
                </xpath>
 
189
            </field>
 
190
        </record>
 
191
        
 
192
                        
 
193
            
 
194
       <record id="view_scrap_return_move_wizard" model="ir.ui.view">
 
195
            <field name="name">Scrap Return Move Directly</field>
 
196
            <field name="model">return.scrap.directly</field>
 
197
            <field name="arch" type="xml">
 
198
                <form string="Move Return Scrap Directly" version="7.0">
 
199
                    <separator string="If you click Ok button, return Moves will be Scraped directly."/>                    
 
200
                    <group>
 
201
                        <field name="return_comment" readonly="1"/>
 
202
                        <field name="not_comment" readonly="1"/>
 
203
                        <field name="location_id" string="Scrap Location" widget="selection"
 
204
                            domain="[('usage','!=','view'),('scrap_location','=',True)]" groups="stock.group_locations"/>
 
205
                    </group>
 
206
                    <separator string="Are you sure scrap these return moves? "/>
 
207
                    <footer>
 
208
                        <button name="move_scrap_dir" string="Ok" type="object" class="oe_highlight"  />
 
209
                        or
 
210
                        <button string="Cancel" class="oe_link" special="cancel" />
 
211
                    </footer>
 
212
                </form>
 
213
            </field>
 
214
        </record>
 
215
 
 
216
        <act_window name="Return Move Scrap Directly"
 
217
            res_model="return.scrap.directly"
 
218
            src_model="stock.move"
 
219
            key2="client_action_multi"
 
220
            multi="True"
 
221
            view_mode="form"
 
222
            view_type="form"
 
223
            target="new"
 
224
            id="return_move_scrap_dir"/>
 
225
 
 
226
    </data>
 
227
</openerp>