diff options
| author | Julien Legros <jle@odoo.com> | 2015-06-01 14:04:54 +0200 |
|---|---|---|
| committer | Julien Legros <jle@odoo.com> | 2015-06-01 14:04:54 +0200 |
| commit | 3c18b92d8d386cbe3544073aceae6a85c4512a92 (patch) | |
| tree | d2310868efc582dc15c4fa5079b0d2b74accf0ca /addons | |
| parent | e4bb1ebd820a38a5138a0313996a98a643c5874d (diff) | |
[FIX] point_of_sale: don't use deprecated globals
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/point_of_sale/static/src/js/screens.js | 2 | ||||
| -rw-r--r-- | addons/point_of_sale/static/src/js/widget_base.js | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index 5ab69194a25..88fc705b820 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -1480,7 +1480,7 @@ var PaymentScreenWidget = ScreenWidget.extend({ this.inputbuffer = ""; this.firstinput = true; - this.decimal_point = instance.web._t.database.parameters.decimal_point; + this.decimal_point = _t.database.parameters.decimal_point; // This is a keydown handler that prevents backspace from // doing a back navigation diff --git a/addons/point_of_sale/static/src/js/widget_base.js b/addons/point_of_sale/static/src/js/widget_base.js index f051695df96..7cdac2a5c83 100644 --- a/addons/point_of_sale/static/src/js/widget_base.js +++ b/addons/point_of_sale/static/src/js/widget_base.js @@ -1,6 +1,7 @@ odoo.define('point_of_sale.BaseWidget', function (require) { "use strict"; +var formats = require('web.formats'); var utils = require('web.utils'); var Widget = require('web.Widget'); @@ -50,7 +51,7 @@ var PosBaseWidget = Widget.extend({ if (typeof amount === 'number') { amount = round_di(amount,decimals).toFixed(decimals); - amount = openerp.instances[this.session.name].web.format_value(parseFloat(amount), { type : 'float' }); + amount = formats.format_value(parseFloat(amount), { type : 'float' }); } return amount; |
