From c1ce6158914a3b429d596f0671d6a7b3b7039a34 Mon Sep 17 00:00:00 2001 From: "Ravi Gohil (OpenERP)" Date: Wed, 26 Mar 2014 16:59:22 +0530 Subject: [PATCH] [FIX] point_of_sale: Replaced the call to undefined search_read(...) with search(...) and read(...) calls. (Maintenance Case: 605684) bzr revid: rgo@tinyerp.com-20140326112922-x6ac9j157han28kb --- addons/point_of_sale/point_of_sale.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index f79b8b3d61c..76c48d24f80 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -491,7 +491,8 @@ class pos_order(osv.osv): def create_from_ui(self, cr, uid, orders, context=None): # Keep only new orders submitted_references = [o['data']['name'] for o in orders] - existing_orders = self.search_read(cr, uid, domain=[('pos_reference', 'in', submitted_references)], fields=['pos_reference'], context=context) + existing_order_ids = self.search(cr, uid, [('pos_reference', 'in', submitted_references)], context=context) + existing_orders = self.read(cr, uid, existing_order_ids, ['pos_reference'], context=context) existing_references = set([o['pos_reference'] for o in existing_orders]) orders_to_save = [o for o in orders if o['data']['name'] not in existing_references] order_ids = []