[FIX] point_of_sale: fix forward port related issues
Fix697739d,682e660,da9275aand697739dwhich where forward-ported in8b4f052a38.
This commit is contained in:
@@ -8,6 +8,7 @@ odoo.define('point_of_sale.gui', function (require) {
|
||||
|
||||
var core = require('web.core');
|
||||
var Model = require('web.DataModel');
|
||||
var formats = require('web.formats');
|
||||
|
||||
var _t = core._t;
|
||||
|
||||
@@ -411,8 +412,8 @@ var Gui = core.Class.extend({
|
||||
numpad_input: function(buffer, input, options) {
|
||||
var newbuf = buffer.slice(0);
|
||||
options = options || {};
|
||||
var newbuf_float = instance.web.parse_value(newbuf, {type: "float"}, 0);
|
||||
var decimal_point = instance.web._t.database.parameters.decimal_point;
|
||||
var newbuf_float = formats.parse_value(newbuf, {type: "float"}, 0);
|
||||
var decimal_point = _t.database.parameters.decimal_point;
|
||||
|
||||
if (input === decimal_point) {
|
||||
if (options.firstinput) {
|
||||
|
||||
@@ -205,7 +205,7 @@ var NumberPopupWidget = PopupWidget.extend({
|
||||
this._super(options);
|
||||
|
||||
this.inputbuffer = '' + (options.value || '');
|
||||
this.decimal_separator = instance.web._t.database.parameters.decimal_point;
|
||||
this.decimal_separator = _t.database.parameters.decimal_point;
|
||||
this.renderElement();
|
||||
this.firstinput = true;
|
||||
},
|
||||
|
||||
@@ -1706,7 +1706,7 @@ var PaymentScreenWidget = ScreenWidget.extend({
|
||||
'title': tip ? _t('Change Tip') : _t('Add Tip'),
|
||||
'value': self.format_currency_no_symbol(value),
|
||||
'confirm': function(value) {
|
||||
order.set_tip(instance.web.parse_value(value, {type: "float"}, 0));
|
||||
order.set_tip(formats.parse_value(value, {type: "float"}, 0));
|
||||
self.order_changes();
|
||||
self.render_paymentlines();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user