[FIX] point_of_sale: avoid tip price modification

When a tip is added, the price of the product is changed, and so we
don't want to recompute the unit price if quantity is changed.
This commit is contained in:
Pierre Masereel
2019-09-18 14:17:01 +00:00
parent ebbc9accae
commit ae2c10ec99
+7 -1
View File
@@ -2560,10 +2560,16 @@ exports.Order = Backbone.Model.extend({
if (lines[i].get_product() === tip_product) {
lines[i].set_unit_price(tip);
lines[i].set_lst_price(tip);
lines[i].price_manually_set = true;
return;
}
}
this.add_product(tip_product, {quantity: 1, price: tip, lst_price: tip });
this.add_product(tip_product, {
quantity: 1,
price: tip,
lst_price: tip,
extras: {price_manually_set: true},
});
}
},
set_pricelist: function (pricelist) {