From 166289230baff0a908da7ddf3e1fa8a219e52e8c Mon Sep 17 00:00:00 2001 From: Joren Van Onder Date: Wed, 23 Sep 2015 09:49:59 +0200 Subject: [PATCH] [FIX] point_of_sale: properly unlink bank statements Deleting of pos sessions wasn't possible before because statement.unlink(context=context) doesn't work anymore. --- addons/point_of_sale/point_of_sale.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index ab2cb895254..220366fe250 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -542,8 +542,7 @@ class pos_session(osv.osv): def unlink(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids, context=context): - for statement in obj.statement_ids: - statement.unlink(context=context) + self.pool.get('account.bank.statement').unlink(cr, uid, obj.statement_ids.ids, context=context) return super(pos_session, self).unlink(cr, uid, ids, context=context) def login(self, cr, uid, ids, context=None):