From f4ce2c7c2aab7fa1d53c424cd997cceec245affe Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Thu, 11 May 2017 11:27:21 +0200 Subject: [PATCH] [FIX] point_of_sale: restore removed method Was removed at 173b76c7bb34 but was used in pos_blackbox_be (and maybe other custom modules) Restore the previous method that will call a read on the computed fields --- addons/point_of_sale/point_of_sale.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index 49c6c08fba3..5b3e15d1645 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -930,6 +930,10 @@ class pos_order(osv.osv): amount_untaxed = currency.round(sum(line.price_subtotal for line in order.lines)) order.amount_total = order.amount_tax + amount_untaxed + # DEPRECATED, REMOVE ME IN v10 + def _amount_all(self, cr, uid, ids, name, args, context=None): + res = self.read(cr, uid, ids, name, context=context) + return dict((l['id'], l) for l in res) def _default_session(self, cr, uid, context=None): so = self.pool.get('pos.session') @@ -1601,6 +1605,10 @@ class pos_order_line(osv.osv): line.price_subtotal = currency.round(line.price_subtotal) line.price_subtotal_incl = currency.round(line.price_subtotal_incl) + # DEPRECATED, REMOVE ME IN v10 + def _amount_line_all(self, cr, uid, ids, field_names, arg, context=None): + res = self.read(cr, uid, ids, field_names, context=context) + return dict((l['id'], l) for l in res) _defaults = { 'qty': lambda *a: 1,