From 3c18b92d8d386cbe3544073aceae6a85c4512a92 Mon Sep 17 00:00:00 2001 From: Julien Legros <jle@odoo.com> Date: Mon, 1 Jun 2015 14:04:54 +0200 Subject: [PATCH] [FIX] point_of_sale: don't use deprecated globals --- addons/point_of_sale/static/src/js/screens.js | 2 +- 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 5ab69194a259..88fc705b820b 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 f051695df96f..7cdac2a5c835 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; -- GitLab