[FIX,REF]: stock: Code refactoring
lp bug: https://launchpad.net/bugs/666781 fixed bzr revid: rpa@tinyerp.com-20101104121148-g4cqx1bocnmxsued
This commit is contained in:
parent
4805ba8743
commit
37ffc45883
|
@ -149,10 +149,9 @@ class stock_return_picking(osv.osv_memory):
|
|||
new_picking = None
|
||||
date_cur = time.strftime('%Y-%m-%d %H:%M:%S')
|
||||
|
||||
move_ids = [m.id for m in [line for line in pick.move_lines]]
|
||||
set_invoice_state_to_none = True
|
||||
returned_lines = 0
|
||||
for move in move_obj.browse(cr, uid, move_ids):
|
||||
for move in pick.move_lines:
|
||||
if not new_picking:
|
||||
if pick.type=='out':
|
||||
new_type = 'in'
|
||||
|
|
|
@ -104,8 +104,7 @@ class stock_split_move_line(osv.osv_memory):
|
|||
pick_obj = self.pool.get('stock.picking')
|
||||
pick = pick_obj.browse(cr, uid, record_id, context=context)
|
||||
data = self.read(cr, uid, ids[0])
|
||||
move_ids = [m.id for m in [line for line in pick.move_lines]]
|
||||
for move in move_obj.browse(cr, uid, move_ids, context=context):
|
||||
for move in pick.move_lines:
|
||||
quantity = data['move%s' % move.id]
|
||||
if 0 < quantity < move.product_qty:
|
||||
new_qty = move.product_qty - quantity
|
||||
|
|
Loading…
Reference in New Issue