From b26abaeb973c1d7a16264df6dc2c619ab8672a86 Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Mon, 17 Oct 2011 14:46:20 +0530 Subject: [PATCH] [FIX]auction:pay button is working in pay objects of the buyer wizard lp bug: https://launchpad.net/bugs/876223 fixed bzr revid: mma@tinyerp.com-20111017091620-dh4wu83clw4n8d3o --- addons/auction/wizard/auction_pay_buy.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/auction/wizard/auction_pay_buy.py b/addons/auction/wizard/auction_pay_buy.py index b914dd1c643..db7d3bf0e29 100644 --- a/addons/auction/wizard/auction_pay_buy.py +++ b/addons/auction/wizard/auction_pay_buy.py @@ -82,12 +82,15 @@ 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): + datas['buyer_id'] = datas['buyer_id'][0] lot_obj.write(cr, uid, [lot.id], {'ach_uid': datas['buyer_id']}) if not lot.auction_id: raise osv.except_osv(_('Error!'), _('No auction date for "%s": Please set one.') % (lot.name)) lot_obj.write(cr, uid, [lot.id], {'is_ok':True}) - for st, stamount in [('statement_id1', 'amount'), ('statement_id2', 'amount2'), ('statement_id3', 'amount3')]: + if isinstance(datas[st], tuple): + datas[st] = datas[st][0] if datas[st]: new_id = bank_statement_line_obj.create(cr, uid, { 'name':'Buyer:'+ str(lot.ach_login or '')+', auction:'+ lots[0].auction_id.name,