summaryrefslogtreecommitdiff
path: root/addons/pos_discount
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-06-27 20:45:52 +0200
committerChristophe Simonis <chs@odoo.com>2019-06-27 20:45:52 +0200
commit5e81b18e24a358b3f4145168f88614a9be37ac14 (patch)
tree198950ff1118ddd91ad296a8d27b861bf6c21d76 /addons/pos_discount
parentc3a609eae4ff5396c1814228d3fc75623ab21b49 (diff)
parent0247d2f35fdeebdb48e8eafc2ae69d1675158303 (diff)
[MERGE] forward port branch saas-12.3 up to 0247d2f35fd
Diffstat (limited to 'addons/pos_discount')
-rw-r--r--addons/pos_discount/static/src/js/discount.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/addons/pos_discount/static/src/js/discount.js b/addons/pos_discount/static/src/js/discount.js
index 87b97f88e16..fc41e55bc05 100644
--- a/addons/pos_discount/static/src/js/discount.js
+++ b/addons/pos_discount/static/src/js/discount.js
@@ -42,10 +42,16 @@ var DiscountButton = screens.ActionButtonWidget.extend({
}
// Add discount
+ // We add the price as manually set to avoid recomputation when changing customer.
var discount = - pc / 100.0 * order.get_total_with_tax();
if( discount < 0 ){
- order.add_product(product, { price: discount });
+ order.add_product(product, {
+ price: discount,
+ extras: {
+ price_manually_set: true,
+ },
+ });
}
},
});