[FIX]mrp:bom_id,product_id,routing,stock field readonly when MO confirmed

lp bug: https://launchpad.net/bugs/773128 fixed

bzr revid: ron@tinyerp.com-20110506103639-1ruiwjm00gps3alj
This commit is contained in:
ron@tinyerp.com 2011-05-06 16:06:39 +05:30
parent c79040b08e
commit 0f08592973
1 changed files with 5 additions and 5 deletions

View File

@ -446,16 +446,16 @@ class mrp_production(osv.osv):
'origin': fields.char('Source Document', size=64, help="Reference of the document that generated this production order request."),
'priority': fields.selection([('0','Not urgent'),('1','Normal'),('2','Urgent'),('3','Very Urgent')], 'Priority'),
'product_id': fields.many2one('product.product', 'Product', required=True, ),
'product_id': fields.many2one('product.product', 'Product', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'product_qty': fields.float('Product Qty', required=True, states={'draft':[('readonly',False)]}, readonly=True),
'product_uom': fields.many2one('product.uom', 'Product UOM', required=True, states={'draft':[('readonly',False)]}, readonly=True),
'product_uos_qty': fields.float('Product UoS Qty', states={'draft':[('readonly',False)]}, readonly=True),
'product_uos': fields.many2one('product.uom', 'Product UoS', states={'draft':[('readonly',False)]}, readonly=True),
'location_src_id': fields.many2one('stock.location', 'Raw Materials Location', required=True,
help="Location where the system will look for components."),
readonly=True, states={'draft':[('readonly',False)]}, help="Location where the system will look for components."),
'location_dest_id': fields.many2one('stock.location', 'Finished Products Location', required=True,
help="Location where the system will stock the finished products."),
readonly=True, states={'draft':[('readonly',False)]}, help="Location where the system will stock the finished products."),
'date_planned_end': fields.function(_production_date_end, method=True, type='date', string='Scheduled End Date'),
'date_planned_date': fields.function(_production_date, method=True, type='date', string='Scheduled Date'),
@ -463,8 +463,8 @@ class mrp_production(osv.osv):
'date_start': fields.datetime('Start Date', select=True),
'date_finished': fields.datetime('End Date', select=True),
'bom_id': fields.many2one('mrp.bom', 'Bill of Material', domain=[('bom_id','=',False)]),
'routing_id': fields.many2one('mrp.routing', string='Routing', on_delete='set null', help="The list of operations (list of work centers) to produce the finished product. The routing is mainly used to compute work center costs during operations and to plan future loads on work centers based on production plannification."),
'bom_id': fields.many2one('mrp.bom', 'Bill of Material', domain=[('bom_id','=',False)], readonly=True, states={'draft':[('readonly',False)]}),
'routing_id': fields.many2one('mrp.routing', string='Routing', on_delete='set null', readonly=True, states={'draft':[('readonly',False)]}, help="The list of operations (list of work centers) to produce the finished product. The routing is mainly used to compute work center costs during operations and to plan future loads on work centers based on production plannification."),
'picking_id': fields.many2one('stock.picking', 'Picking list', readonly=True, ondelete="restrict",
help="This is the internal picking list that brings the finished product to the production plan"),