[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
This commit is contained in:
Mayur Maheshwari (OpenERP)
2011-10-17 14:46:20 +05:30
parent d8c4008be3
commit b26abaeb97
+4 -1
View File
@@ -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,