[FIX]Warehouse:-shouldnt be able to change the company after have validated an inventory
lp bug: https://launchpad.net/bugs/690228 fixed bzr revid: ron@tinyerp.com-20101215062629-dl40cw2g1kyacgpw
This commit is contained in:
@@ -1671,7 +1671,7 @@ class stock_move(osv.osv):
|
||||
result['product_qty'] = product_uos_qty
|
||||
|
||||
return {'value': result}
|
||||
|
||||
|
||||
def onchange_product_id(self, cr, uid, ids, prod_id=False, loc_id=False,
|
||||
loc_dest_id=False, address_id=False):
|
||||
""" On change of product id, if finds UoM, UoS, quantity and UoS quantity.
|
||||
@@ -2440,7 +2440,8 @@ class stock_inventory(osv.osv):
|
||||
'inventory_line_id': fields.one2many('stock.inventory.line', 'inventory_id', 'Inventories', states={'done': [('readonly', True)]}),
|
||||
'move_ids': fields.many2many('stock.move', 'stock_inventory_move_rel', 'inventory_id', 'move_id', 'Created Moves'),
|
||||
'state': fields.selection( (('draft', 'Draft'), ('done', 'Done'), ('confirm','Confirmed'),('cancel','Cancelled')), 'State', readonly=True, select=True),
|
||||
'company_id': fields.many2one('res.company','Company',required=True,select=True),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True, select=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
|
||||
}
|
||||
_defaults = {
|
||||
'date': time.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
|
||||
Reference in New Issue
Block a user