Files
odoo_source/addons/delivery/models
Eteil Djoumatchoua (etdj) 171aa0ec25 [FIX] delivery_carrier,sale_giftcard: get the right shipping price even with gift card
Step:
- Create a product with sale price 120 USD
- Create a giftcard with balance 40 uSD
- Create a free Shipping cost of 40 USD fixed price and freeing above 100 USD
- Go to website->shop, select the product and checkout the cart(the shipping is free because price exceeds 100)
- Add the gift card to payment

Issue:
The shipping price gets from free to 40

Cause:
When computing the cost of the shipping the fact of the presence of a giftcard is not considered.

Solution:
Create a method to returns the amount of giftcard from a sale order and add to total price to check if the shipping is free

opw-3107284

closes odoo/odoo#120174

X-original-commit: c57184fd1c3d2846df4f618dee0027364eb62596
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Djoumatchoua Eteil Junior (etdj) <etdj@odoo.com>
2023-05-16 13:36:59 +02:00
..