bzr revid: fp@tinyerp.com-20080926092448-t80o0ypcylehwrk7
This commit is contained in:
Fabien Pinckaers 2008-09-26 11:24:48 +02:00
parent 99f379dd11
commit f824dd3910
2 changed files with 5 additions and 5 deletions

View File

@ -515,7 +515,8 @@ class sale_order(osv.osv):
'location_dest_id': output_id,
'sale_line_id': line.id,
'tracking_id': False,
'state': 'waiting',
'state': 'draft',
#'state': 'waiting',
'note': line.notes,
})
proc_id = self.pool.get('mrp.procurement').create(cr, uid, {

View File

@ -102,7 +102,8 @@ class stock_location(osv.osv):
'child_ids': fields.one2many('stock.location', 'location_id', 'Contains'),
'chained_location_id': fields.many2one('stock.location', 'Chained Location If Fixed'),
'chained_location_type': fields.selection([('','None'),('customer', 'Customer'),('fixed','Fixed Location')], 'Chained Location Type'),
'chained_location_type': fields.selection([('','None'),('customer', 'Customer'),('fixed','Fixed Location')],
'Chained Location Type', required=True),
'chained_auto_packing': fields.selection(
[('auto','Automatic Move'), ('manual','Manual Operation'),('transparent','Automatic No Step Added')],
'Automatic Move',
@ -422,7 +423,7 @@ class stock_picking(osv.osv):
todo.append(r)
todo = self.action_explode(cr, uid, todo, context)
if len(todo):
self.pool.get('stock.move').action_confirm(cr,uid, todo, context)
self.pool.get('stock.move').action_confirm(cr, uid, todo, context)
return True
def test_auto_picking(self, cr, uid, ids):
@ -909,14 +910,12 @@ class stock_move(osv.osv):
cursor.commit()
def onchange_lot_id(self, cr, uid, context, prodlot_id=False,product_qty=False, loc_id=False):
print uid, prodlot_id, product_qty, loc_id
if not prodlot_id or not loc_id:
return {}
prodlot = self.pool.get('stock.production.lot').browse(cr, uid, prodlot_id)
location=self.pool.get('stock.location').browse(cr,uid,loc_id)
warning={}
if (location.usage == 'internal') and (product_qty > (prodlot.stock_available or 0.0)):
print 'Warning'
warning={
'title':'Bad Lot Assignation !',
'message':'You are moving %.2f products but only %.2f available in this lot.' % (product_qty,prodlot.stock_available or 0.0)