summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_renderer.js
diff options
context:
space:
mode:
authorGoffin Simon <sig@odoo.com>2019-03-27 09:19:04 +0100
committerChristophe Simonis <chs@odoo.com>2019-04-10 18:59:59 +0200
commit36d4c9982810642c12d371b4420e9a9bee5c5eed (patch)
treef00b89557dbac0ab501bba1aec98c0f11457b820 /addons/web/static/src/js/views/basic/basic_renderer.js
parent3a3f7fd58635b7b98766ce600cf4dce3d72d3802 (diff)
[FIX] sale_coupon: Promotion code removed when adding in shopping cart
Steps to reproduce: - Create a sale.coupon.program with a discount of 10% and generate coupons for it - Go on the shop and add a product of 100€ in the cart - Go in your shopping cart and add a promotion code - A new line has been created in your cart with a discount of 10€ - Click on "Process to checkout" Bug: The discount had been removed from the cart Technically: When clicking on button "Process to checkout", the function "recompute_coupon_lines" is called several times. The second time, in function "_remove_invalid_reward_lines", the valid applied coupon program couldn't be retrieved due to the sale price of the discount_line_product_id = -1000000 €. The function _filter_on_mimimum_amount filtered the targted program because the untaxed_amount of the order was equal to -999900€. So the program._compute_program_amount was all the time greater than untaxed_amount or untaxed_amount + tax_amount It s not consistant to set a default value to -1000000 to prevent pricelist strikethrough because in some currencies,-1000000 is not enough. Now the reward lines are not strikethrough. X-port/cherry-pick of odoo/enterprise@2748249c0b0674d659a363bae4acbc7b4c230dc7 opw:1957671
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_renderer.js')
0 files changed, 0 insertions, 0 deletions