Skip to content

Commit

Permalink
[FIX] point_of_sale: don't use deprecated globals
Browse files Browse the repository at this point in the history
  • Loading branch information
julienlegros committed Jun 1, 2015
1 parent e4bb1eb commit 3c18b92
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion addons/point_of_sale/static/src/js/screens.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion addons/point_of_sale/static/src/js/widget_base.js
Original file line number Diff line number Diff line change
@@ -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');

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 3c18b92

Please sign in to comment.