[MERGE] [FIX] point_of_sale: replace search_read call by search + read (search_read not present in 7.0)
bzr revid: mat@openerp.com-20140326123101-50ln79wag3g52pe6
This commit is contained in:
@@ -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 = []
|
||||
|
||||
Reference in New Issue
Block a user