[IMP]auction: improve buyer id for both case tuple and list
authorMayur Maheshwari (OpenERP) <mma@tinyerp.com>
Thu, 10 Nov 2011 07:19:51 +0000 (12:49 +0530)
committerMayur Maheshwari (OpenERP) <mma@tinyerp.com>
Thu, 10 Nov 2011 07:19:51 +0000 (12:49 +0530)
bzr revid: mma@tinyerp.com-20111110071951-o7wnkopqfmzyyo40

addons/auction/wizard/auction_pay_buy.py

index db7d3bf..f73552a 100644 (file)
@@ -82,7 +82,7 @@ class auction_pay_buy(osv.osv_memory):
             lots = lot_obj.browse(cr, uid, context.get('active_ids', []), context=context)
             for lot in lots:
                 if datas['buyer_id']:
-                    if isinstance(datas['buyer_id'], tuple):
+                    if isinstance(datas['buyer_id'], (tuple, list)):
                         datas['buyer_id'] = datas['buyer_id'][0]
                     lot_obj.write(cr, uid, [lot.id], {'ach_uid': datas['buyer_id']})
                 if not lot.auction_id: