diff --git a/product_multi_uom_pos/__manifest__.py b/product_multi_uom_pos/__manifest__.py index c2fd8875b..45864ae3a 100644 --- a/product_multi_uom_pos/__manifest__.py +++ b/product_multi_uom_pos/__manifest__.py @@ -21,7 +21,7 @@ ############################################################################## { 'name': 'POS Product Multiple UOM', - 'version': '15.0.1.0.0', + 'version': '15.0.1.0.1', 'category': 'Point of Sale', 'sequence': -100, 'summary': 'Multiple UOM for Products', @@ -33,7 +33,6 @@ 'data': [ 'views/pos_view_extended.xml', ], - # 'qweb': ['static/src/xml/pos.xml'], 'images': ['static/description/banner.png', 'static/description/icon.png'], 'assets': { diff --git a/product_multi_uom_pos/static/src/js/models.js b/product_multi_uom_pos/static/src/js/models.js index 5b91ac0d8..26a9f014a 100644 --- a/product_multi_uom_pos/static/src/js/models.js +++ b/product_multi_uom_pos/static/src/js/models.js @@ -21,7 +21,6 @@ models.Orderline = models.Orderline.extend({ }, export_as_JSON: function() { var result = OrderlineSuper.prototype.export_as_JSON.call(this); - console.log("result",result); result.uom_id = this.uom_id; return result; }, @@ -47,10 +46,14 @@ models.Orderline = models.Orderline.extend({ OrderlineSuper.prototype.set_quantity.call(this, quantity, keep_price); this.order.assert_editable(); if(quantity === 'remove'){ + if (this.refunded_orderline_id in this.pos.toRefundLines) { + delete this.pos.toRefundLines[this.refunded_orderline_id]; + } this.order.remove_orderline(this); - return; + return true; }else{ - var quant = parseFloat(quantity) || 0; + var quant = typeof(quantity) === 'number' ? quantity : (field_utils.parse.float('' + quantity) || 0); +// var quant = parseFloat(quantity) || 0; var unit = this.get_unit(); if(unit){ if (unit.rounding) { @@ -97,6 +100,7 @@ models.Orderline = models.Orderline.extend({ } } this.trigger('change', this); + return true; }, }); diff --git a/product_multi_uom_pos/static/src/js/multi_uom_widget.js b/product_multi_uom_pos/static/src/js/multi_uom_widget.js index 408cd2435..4de3bad10 100644 --- a/product_multi_uom_pos/static/src/js/multi_uom_widget.js +++ b/product_multi_uom_pos/static/src/js/multi_uom_widget.js @@ -74,20 +74,12 @@ var QWeb = core.qweb; } if(ref_unit){ if(uom.uom_type == 'bigger'){ - console.log("bigggg"); - console.log("ref_price * uom.factor_inv",ref_price * uom.factor_inv); - return (ref_price * uom.factor_inv); } else if(uom.uom_type == 'smaller'){ - console.log("smalll"); - console.log("small",(ref_price / uom.factor_inv)); - return (ref_price / uom.factor); } else if(uom.uom_type == 'reference'){ - console.log("refernce"); - console.log("ref_price",ref_price); return ref_price; } }