Skip to content

Commit 3c18b92

Browse files
committed
[FIX] point_of_sale: don't use deprecated globals
1 parent e4bb1eb commit 3c18b92

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

addons/point_of_sale/static/src/js/screens.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1480,7 +1480,7 @@ var PaymentScreenWidget = ScreenWidget.extend({
14801480

14811481
this.inputbuffer = "";
14821482
this.firstinput = true;
1483-
this.decimal_point = instance.web._t.database.parameters.decimal_point;
1483+
this.decimal_point = _t.database.parameters.decimal_point;
14841484

14851485
// This is a keydown handler that prevents backspace from
14861486
// doing a back navigation

addons/point_of_sale/static/src/js/widget_base.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
odoo.define('point_of_sale.BaseWidget', function (require) {
22
"use strict";
33

4+
var formats = require('web.formats');
45
var utils = require('web.utils');
56
var Widget = require('web.Widget');
67

@@ -50,7 +51,7 @@ var PosBaseWidget = Widget.extend({
5051

5152
if (typeof amount === 'number') {
5253
amount = round_di(amount,decimals).toFixed(decimals);
53-
amount = openerp.instances[this.session.name].web.format_value(parseFloat(amount), { type : 'float' });
54+
amount = formats.format_value(parseFloat(amount), { type : 'float' });
5455
}
5556

5657
return amount;

0 commit comments

Comments
 (0)