odoo/tutorials#881

Created by Ark Patel (arkp)

Blocked

label
odoo-dev:18.0-discount-update-arkp
head
d5a583eaf1e6169119d7eabb8505aaa188c0301f
odoo/tutorials
18.0 #881 missing statuses missing r+
master

[ADD] sale: Auto-recalculate global discount on order line changes

Before:
- Global discount remained unchanged even after modifying, deleting, or adding sale order lines.
- Discount lines were not automatically removed when no product lines existed.
-This could result in incorrect order totals or stale discount values, requiring manual updates.

After:
- Global discount is now automatically recalculated whenever sale order lines are changed.
- Discount line is removed if all product lines are deleted.
-
Impact:
-Ensures consistent and accurate pricing aligned with the current order state.
-Ensures accurate and reliable order totals.

task-4962389