[WIP] Remove picking except state on mrp order
bzr revid: jco@openerp.com-20140423094807-za7855wkx2vlr0di
This commit is contained in:
parent
40ddf95867
commit
af0468c418
|
@ -493,7 +493,7 @@ class mrp_production(osv.osv):
|
||||||
'workcenter_lines': fields.one2many('mrp.production.workcenter.line', 'production_id', 'Work Centers Utilisation',
|
'workcenter_lines': fields.one2many('mrp.production.workcenter.line', 'production_id', 'Work Centers Utilisation',
|
||||||
readonly=True, states={'draft': [('readonly', False)]}),
|
readonly=True, states={'draft': [('readonly', False)]}),
|
||||||
'state': fields.selection(
|
'state': fields.selection(
|
||||||
[('draft', 'New'), ('cancel', 'Cancelled'), ('picking_except', 'Picking Exception'), ('confirmed', 'Awaiting Raw Materials'),
|
[('draft', 'New'), ('cancel', 'Cancelled'), ('confirmed', 'Awaiting Raw Materials'),
|
||||||
('ready', 'Ready to Produce'), ('in_production', 'Production Started'), ('done', 'Done')],
|
('ready', 'Ready to Produce'), ('in_production', 'Production Started'), ('done', 'Done')],
|
||||||
string='Status', readonly=True,
|
string='Status', readonly=True,
|
||||||
track_visibility='onchange',
|
track_visibility='onchange',
|
||||||
|
@ -614,12 +614,6 @@ class mrp_production(osv.osv):
|
||||||
}
|
}
|
||||||
return {'value': result}
|
return {'value': result}
|
||||||
|
|
||||||
def action_picking_except(self, cr, uid, ids):
|
|
||||||
""" Changes the state to Exception.
|
|
||||||
@return: True
|
|
||||||
"""
|
|
||||||
self.write(cr, uid, ids, {'state': 'picking_except'})
|
|
||||||
return True
|
|
||||||
|
|
||||||
def _action_compute_lines(self, cr, uid, ids, properties=None, context=None):
|
def _action_compute_lines(self, cr, uid, ids, properties=None, context=None):
|
||||||
""" Compute product_lines and workcenter_lines from BoM structure
|
""" Compute product_lines and workcenter_lines from BoM structure
|
||||||
|
|
|
@ -674,12 +674,10 @@
|
||||||
<button name="button_confirm" states="draft" string="Confirm Production" class="oe_highlight"/>
|
<button name="button_confirm" states="draft" string="Confirm Production" class="oe_highlight"/>
|
||||||
<button name="%(act_mrp_product_produce)d" states="ready,in_production" string="Produce" type="action" class="oe_highlight"/>
|
<button name="%(act_mrp_product_produce)d" states="ready,in_production" string="Produce" type="action" class="oe_highlight"/>
|
||||||
<button name="force_production" states="confirmed" string="Force Reservation" type="object"/>
|
<button name="force_production" states="confirmed" string="Force Reservation" type="object"/>
|
||||||
<button name="force_production" states="picking_except" string="Force Reservation" type="object"/>
|
|
||||||
<button name="button_produce" states="ready" string="Mark as Started"/>
|
<button name="button_produce" states="ready" string="Mark as Started"/>
|
||||||
<button name="button_recreate" states="picking_except" string="Recreate Picking"/>
|
<button name="button_cancel" states="draft,ready,in_production" string="Cancel Production"/>
|
||||||
<button name="button_cancel" states="draft,ready,in_production,picking_except" string="Cancel Production"/>
|
|
||||||
<button name="action_cancel" type="object" states="confirmed" string="Cancel Production"/>
|
<button name="action_cancel" type="object" states="confirmed" string="Cancel Production"/>
|
||||||
<field name="state" widget="statusbar" statusbar_visible="draft,ready,in_production,done" statusbar_colors='{"picking_except":"red","confirmed":"blue"}'/>
|
<field name="state" widget="statusbar" statusbar_visible="draft,ready,in_production,done" statusbar_colors='{"confirmed":"blue"}'/>
|
||||||
</header>
|
</header>
|
||||||
<sheet>
|
<sheet>
|
||||||
<div class="oe_title">
|
<div class="oe_title">
|
||||||
|
@ -720,7 +718,7 @@
|
||||||
<group>
|
<group>
|
||||||
<group string="Products to Consume">
|
<group string="Products to Consume">
|
||||||
<field name="move_lines" nolabel="1" options="{'reload_on_button': true}">
|
<field name="move_lines" nolabel="1" options="{'reload_on_button': true}">
|
||||||
<tree colors="blue:state == 'draft';black:state in ('ready','assigned','in_production');gray:state in ('cancel','done');red:state in ('confirmed','picking_except','waiting')" string="Products to Consume">
|
<tree colors="blue:state == 'draft';black:state in ('ready','assigned','in_production');gray:state in ('cancel','done');red:state in ('confirmed','waiting')" string="Products to Consume">
|
||||||
<field name="product_id"/>
|
<field name="product_id"/>
|
||||||
<field name="product_qty" string="Quantity"/>
|
<field name="product_qty" string="Quantity"/>
|
||||||
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
|
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
|
||||||
|
@ -739,7 +737,7 @@
|
||||||
</group>
|
</group>
|
||||||
<group string="Consumed Products">
|
<group string="Consumed Products">
|
||||||
<field name="move_lines2" nolabel="1" options="{'reload_on_button': true}">
|
<field name="move_lines2" nolabel="1" options="{'reload_on_button': true}">
|
||||||
<tree colors="red:scrapped==True;blue:state == 'draft';black:state in('picking_except','confirmed','ready','in_production');gray:state == 'cancel' " string="Consumed Products" editable="bottom">
|
<tree colors="red:scrapped==True;blue:state == 'draft';black:state in ('confirmed','ready','in_production');gray:state == 'cancel' " string="Consumed Products" editable="bottom">
|
||||||
<field name="product_id" readonly="1"/>
|
<field name="product_id" readonly="1"/>
|
||||||
<field name="restrict_lot_id" context="{'product_id': product_id}" groups="stock.group_tracking_lot"/>
|
<field name="restrict_lot_id" context="{'product_id': product_id}" groups="stock.group_tracking_lot"/>
|
||||||
<field name="product_qty" readonly="1"/>
|
<field name="product_qty" readonly="1"/>
|
||||||
|
@ -766,7 +764,7 @@
|
||||||
</group>
|
</group>
|
||||||
<group string="Produced Products">
|
<group string="Produced Products">
|
||||||
<field name="move_created_ids2" nolabel="1" options="{'reload_on_button': true}">
|
<field name="move_created_ids2" nolabel="1" options="{'reload_on_button': true}">
|
||||||
<tree colors="red:scrapped==True;blue:state == 'draft';black:state in('picking_except','confirmed','ready','in_production');gray:state in('cancel','done') " string="Finished Products">
|
<tree colors="red:scrapped==True;blue:state == 'draft';black:state in('confirmed','ready','in_production');gray:state in('cancel','done') " string="Finished Products">
|
||||||
<field name="product_id" readonly="1"/>
|
<field name="product_id" readonly="1"/>
|
||||||
<field name="product_qty" readonly="1"/>
|
<field name="product_qty" readonly="1"/>
|
||||||
<field name="restrict_lot_id" groups="stock.group_tracking_lot"/>
|
<field name="restrict_lot_id" groups="stock.group_tracking_lot"/>
|
||||||
|
|
|
@ -97,7 +97,7 @@ class mrp_production_workcenter_line(osv.osv):
|
||||||
'delay': fields.float('Working Hours',help="The elapsed time between operation start and stop in this Work Center",readonly=True),
|
'delay': fields.float('Working Hours',help="The elapsed time between operation start and stop in this Work Center",readonly=True),
|
||||||
'production_state':fields.related('production_id','state',
|
'production_state':fields.related('production_id','state',
|
||||||
type='selection',
|
type='selection',
|
||||||
selection=[('draft','Draft'),('picking_except', 'Picking Exception'),('confirmed','Waiting Goods'),('ready','Ready to Produce'),('in_production','In Production'),('cancel','Canceled'),('done','Done')],
|
selection=[('draft','Draft'),('confirmed','Waiting Goods'),('ready','Ready to Produce'),('in_production','In Production'),('cancel','Canceled'),('done','Done')],
|
||||||
string='Production Status', readonly=True),
|
string='Production Status', readonly=True),
|
||||||
'product':fields.related('production_id','product_id',type='many2one',relation='product.product',string='Product',
|
'product':fields.related('production_id','product_id',type='many2one',relation='product.product',string='Product',
|
||||||
readonly=True),
|
readonly=True),
|
||||||
|
|
Loading…
Reference in New Issue