From 59a9f469dac55fa9ce9febc72f4f1632875e815e Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Thu, 10 Nov 2011 12:17:23 +0530 Subject: [PATCH] [IMP] Improved PEP standard bzr revid: ron@tinyerp.com-20111110064723-phv553e5si9meyfb --- addons/stock/stock.py | 8 ++++---- addons/stock/wizard/stock_partial_move.py | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 0f1e47ec17a..e049fb5a84f 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1168,7 +1168,7 @@ class stock_picking(osv.osv): for pick in self.browse(cr, uid, ids, context=context): new_picking = None complete, too_few = [], [] - move_product_qty, prodlot_ids, product_avail, partial_qty, product_uoms = {},{}, {},{},{} + move_product_qty, prodlot_ids, product_avail, partial_qty, product_uoms = {}, {}, {}, {}, {} for move in pick.move_lines: if move.state in ('done', 'cancel'): continue @@ -1237,7 +1237,7 @@ class stock_picking(osv.osv): 'state': 'assigned', 'move_dest_id': False, 'price_unit': move.price_unit, - 'product_uom':product_uoms[move.id] + 'product_uom': product_uoms[move.id] } prodlot_id = prodlot_ids[move.id] if prodlot_id: @@ -1246,13 +1246,13 @@ class stock_picking(osv.osv): move_obj.write(cr, uid, [move.id], { 'product_qty' : move.product_qty - partial_qty[move.id], - 'product_uos_qty':move.product_qty - partial_qty[move.id], #TODO: put correct uos_qty + 'product_uos_qty': move.product_qty - partial_qty[move.id], #TODO: put correct uos_qty }) if new_picking: move_obj.write(cr, uid, [c.id for c in complete], {'picking_id': new_picking}) for move in complete: - defaults = {'product_uom': product_uoms[move.id],'product_qty': move_product_qty[move.id]} + defaults = {'product_uom': product_uoms[move.id], 'product_qty': move_product_qty[move.id]} if prodlot_ids.get(move.id): defaults.update({'prodlot_id': prodlot_ids[move.id]}) move_obj.write(cr, uid, [move.id], defaults) diff --git a/addons/stock/wizard/stock_partial_move.py b/addons/stock/wizard/stock_partial_move.py index 453964a4895..ec348656ce0 100644 --- a/addons/stock/wizard/stock_partial_move.py +++ b/addons/stock/wizard/stock_partial_move.py @@ -23,7 +23,6 @@ from osv import fields, osv from tools.misc import DEFAULT_SERVER_DATETIME_FORMAT import time - class stock_partial_move_line(osv.osv_memory): _inherit = "stock.partial.picking.line" _name = "stock.partial.move.line"