diff options
| author | Joren Van Onder <jov@odoo.com> | 2015-09-23 09:49:59 +0200 |
|---|---|---|
| committer | Joren Van Onder <jov@odoo.com> | 2015-09-23 10:21:27 +0200 |
| commit | 166289230baff0a908da7ddf3e1fa8a219e52e8c (patch) | |
| tree | d7dd3734bc312e7b83fe8c5329211c1b00c4746b /addons | |
| parent | f8877c16ab47feae014926d02fe27ac71d205ed4 (diff) | |
[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.
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/point_of_sale/point_of_sale.py | 3 |
1 files changed, 1 insertions, 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): |
