odoo/tutorials#882

Created by Niyati Patel (niyp)

Blocked

label
odoo-dev:18.0-discount-update-niyp
head
90802e1062c6715f77953d3f29bcdb7efebaf8bd
odoo/tutorials
18.0 #882 missing r+
master

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

The global discount on a Sales Order must always reflect the actual value of product lines to prevent discrepancies in final pricing. Previously, changes to order lines (such as additions, edits, or deletions) could leave the global discount outdated or inconsistent. This posed a risk of incorrect totals and manual corrections.

By ensuring the discount dynamically adjusts to the current state of the order lines, we improve reliability in pricing, reduce manual errors, and maintain alignment with business expectations for automated discount handling.