[MERGE] merged the rpa branch containing a fix related to the read() on osv_memory that returns now a tuple instead of id for m2o

bzr revid: qdp-launchpad@openerp.com-20110324115302-srzuucz9gzrpz49p
This commit is contained in:
Quentin (OpenERP)
2011-03-24 12:53:02 +01:00
+4 -4
View File
@@ -163,11 +163,11 @@ class stock_return_picking(osv.osv_memory):
val_id = data['product_return_moves']
for v in val_id:
data_get = data_obj.read(cr, uid, v)
mov_id = data_get['move_id']
new_qty = data_get['quantity']
data_get = data_obj.browse(cr, uid, v, context=context)
mov_id = data_get.move_id.id
new_qty = data_get.quantity
move = move_obj.browse(cr, uid, mov_id, context=context)
new_location=move.location_dest_id.id
new_location = move.location_dest_id.id
returned_qty = move.product_qty
for rec in move.move_history_ids2:
returned_qty -= rec.product_qty