-
- Downloads
[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
Please register or sign in to comment