From f824dd39107d6ec6c624d6d9bb4934a1639b8aa8 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Fri, 26 Sep 2008 11:24:48 +0200 Subject: [PATCH] bugfixes bzr revid: fp@tinyerp.com-20080926092448-t80o0ypcylehwrk7 --- addons/sale/sale.py | 3 ++- addons/stock/stock.py | 7 +++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 9d6a9e113fc..d7b3d53c88b 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -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, { diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 7d5f9c3dd0a..ed0ad6bd442 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -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)