1
<?xml version="1.0" encoding="UTF-8"?>
4
<!-- Production Order -->
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">
13
<field name="product_id" on_change="onchange_product_id(product_id)"/>
14
<label for="product_qty"/>
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"/>
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"/>
26
<field name="date_expected"/>
28
<field name="location_id" domain="[('usage','=','internal')]"/>
29
<field name="location_dest_id" domain="[('usage','=','production')]" groups="stock.group_locations"/>
31
<label for="prodlot_id"/>
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"/>
41
<button name="add_mo_product" string="Add Products" type="object" class="oe_highlight"/>
43
<button string="Cancel" class="oe_link" special="cancel" />
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>
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"/>
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"/>
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"/>
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"/>
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"/>
109
<field name="product_id" readonly="1"/>
110
<label for="product_qty"/>
112
<field name="product_qty" class="oe_inline" readonly="1"/>
113
<field name="product_uom" class="oe_inline" readonly="1" groups="product.group_uom"/>
115
<field name="location_id" string="Scrap Location" widget="selection"
116
domain="[('usage','!=','view'),('scrap_location','=',True)]" groups="stock.group_locations"/>
119
<button name="move_scrap_dir" string="Ok" type="object" class="oe_highlight" />
121
<button string="Cancel" class="oe_link" special="cancel" />
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>
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"/>
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" />
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"/>
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"/>
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."/>
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"/>
206
<separator string="Are you sure scrap these return moves? "/>
208
<button name="move_scrap_dir" string="Ok" type="object" class="oe_highlight" />
210
<button string="Cancel" class="oe_link" special="cancel" />
216
<act_window name="Return Move Scrap Directly"
217
res_model="return.scrap.directly"
218
src_model="stock.move"
219
key2="client_action_multi"
224
id="return_move_scrap_dir"/>