diff options
| author | Martin Trigaux <mat@odoo.com> | 2017-05-11 11:27:21 +0200 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2017-05-18 14:34:52 +0200 |
| commit | f4ce2c7c2aab7fa1d53c424cd997cceec245affe (patch) | |
| tree | 8186981976520a2996e724c4dedcc863fd279ca0 | |
| parent | c5555a439e2011c121a266b1bb301b120a28e995 (diff) | |
[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
| -rw-r--r-- | addons/point_of_sale/point_of_sale.py | 8 |
1 files changed, 8 insertions, 0 deletions
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, |
