[FIX] point_of_sale: fix forward port related issues

Fix 697739d, 682e660, da9275a and 697739d which where forward-ported in
8b4f052a38.
This commit is contained in:
Joren Van Onder
2016-01-06 16:55:59 +01:00
parent 70e43b18e0
commit 17bb5fd374
3 changed files with 5 additions and 4 deletions
+3 -2
View File
@@ -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) {
+1 -1
View File
@@ -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();
}