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
|
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<!-- Production Order -->
<record id="view_mo_add_product_form" model="ir.ui.view">
<field name="name">Mo Add Product form</field>
<field name="model">stock.move.add</field>
<field name="arch" type="xml">
<form string="Stock Moves" version="7.0">
<group>
<group>
<field name="product_id" on_change="onchange_product_id(product_id)"/>
<label for="product_qty"/>
<div>
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" class="oe_inline"/>
<field name="product_uom" string="Unit Of Measure" groups="product.group_uom" class="oe_inline"/>
</div>
<label for="product_uos_qty" groups="product.group_uos"/>
<div groups="product.group_uos">
<field name="product_uos_qty" on_change="onchange_uos_quantity(product_id, product_uos_qty, product_uos, product_uom)" class="oe_inline"/>
<field name="product_uos" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" class="oe_inline"/>
</div>
</group>
<group>
<field name="date_expected"/>
<field name="location_id" domain="[('usage','=','internal')]"/>
<field name="location_dest_id" domain="[('usage','=','production')]" groups="stock.group_locations"/>
<label for="prodlot_id"/>
<div>
<field name="prodlot_id" groups="stock.group_production_lot"
context="{'location_id':location_id, 'product_id':product_id}"
domain="[('product_id','=?',product_id)]"
on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id, product_uom)" class="oe_inline"/>
</div>
</group>
</group>
<footer>
<button name="add_mo_product" string="Add Products" type="object" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel" />
</footer>
</form>
</field>
</record>
<record id="action_mo_add_product" model="ir.actions.act_window">
<field name="name">Add Products</field>
<field name="res_model">stock.move.add</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="domain">[]</field>
<field name="target">new</field>
<field name="view_id" ref="view_mo_add_product_form"/>
<field name="context">{}</field>
</record>
<record id="ir_mo_add_product" model="ir.values">
<field name="key2">tree_but_action</field>
<field name="model">stock.move.add</field>
<field name="name">Add Products</field>
<field eval="'ir.actions.act_window,'+str(action_mo_add_product)" name="value"/>
</record>
<!-- Production Order -->
<record id="mrp_change_rm_production_form_view" model="ir.ui.view">
<field name="name">mrp.production.form</field>
<field name="model">mrp.production</field>
<field name="type">form</field>
<field name="inherit_id" ref="mrp.mrp_production_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='move_lines']/tree/button[@string='Scrap Products']" position="after">
<button name="action_consume_cancel"
string="Cancel Move" type="object"
icon="gtk-stop" states="draft,waiting,confirmed,assigned"/>
</xpath>
<xpath expr="//field[@name='move_lines']" position="after">
<button name="%(mrp_change_rm.action_mo_add_product)d"
string="Add Products" type="action" icon="gtk-justify-fill" states="ready,in_production,confirmed"
context="{'mo_id': active_id, 'location_id': location_src_id}" colspan="2"/>
</xpath>
</field>
</record>
</data>
</openerp>
|