Thursday, August 27, 2026
1 change · saas-19.2
Resolved issues and error corrections
Refunds for POS orders with a fixed global discount now correctly mirror the original discounted total. This prevents inflated refund amounts that could block POS session accounting closure and leave sessions without accounting entries.
Original PR description
BACKPORT OF https://github.com/odoo/odoo/pull/278180 When refunding an order that had a fixed-amount global discount, the refunded total was inflated: e.g. a 65.00 order (80.00 - 15.00 fixed…
BACKPORT OF https://github.com/odoo/odoo/pull/278180 When refunding an order that had a fixed-amount global discount, the refunded total was inflated: e.g. a 65.00 order (80.00 - 15.00 fixed discount) was refunded as 95.00 instead of 65.00. On the refund order amount_paid then differed from amount_total, so the POS session's closing entry could not balance; _validate_session rolled back and no account.move was created, leaving the session closed with no accounting. When a refund is created, the product lines are negated and the discount line is excluded, then pos_discount re-applies the global discount to the refund order through applyDiscount. For a fixed amount, reduce_base_lines_to_target_amount targets an absolute value and does not follow the sign of the (now negative) base, so the discount keeps the sale sign. Percentages scale with the base and are not affected. Negate the fixed discount amount when the destination order is a refund so it mirrors the negative base. The stored discount_value is left unchanged so the auto-resync of the discount stays idempotent. opw-6458124 Forward-Port-Of: odoo/odoo#281958