From d7ed28f534b42c198e2595b1cde400d83d23596a Mon Sep 17 00:00:00 2001 From: "Jay (OpenERP)" Date: Fri, 24 Sep 2010 15:43:44 +0530 Subject: [PATCH] [FIX] POS : Correction in wizard,NEVER ever return None,it can break xmlrpc request. bzr revid: jvo@tinyerp.com-20100924101344-7eu0pcp6y8cql8hw --- addons/point_of_sale/wizard/pos_payment.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/addons/point_of_sale/wizard/pos_payment.py b/addons/point_of_sale/wizard/pos_payment.py index 27c04a6dfba..5b6c5f167fb 100644 --- a/addons/point_of_sale/wizard/pos_payment.py +++ b/addons/point_of_sale/wizard/pos_payment.py @@ -43,7 +43,6 @@ class pos_make_payment(osv.osv_memory): @return: A dictionary which of fields with values. """ res = super(pos_make_payment, self).default_get(cr, uid, fields, context=context) - active_id = context and context.get('active_id',False) if active_id: j_obj = self.pool.get('account.journal') @@ -51,10 +50,7 @@ class pos_make_payment(osv.osv_memory): j_ids = map(lambda x1: x1[0], cr.fetchall()) journal = j_obj.search(cr, uid, [('type', '=', 'cash'), ('id', 'in', j_ids)]) - if journal: - journal = journal[0] - else: - journal = None + journal = journal and journal[0] or False wf_service = netsvc.LocalService("workflow") order_obj=self.pool.get('pos.order')