odoo/tutorials#1335

Created by Pranjali Sangavekar (prsan)

Blocked

label
odoo-dev:19.0-imp-sales-orderlines-discount-update-prsan
head
b8ef1d2101172f8a514bba85132fc346319b8a25
odoo/tutorials
19.0 #1335 missing statuses missing r+
master

[IMP] sale: add global discount with automatic recalculation on order…

Problem: When a global discount is applied to a Sale Order, the discount amount is generated based on the current subtotal. However, when order lines are subsequently added, updated, or removed, the discount amount is not recalculated and becomes inconsistent with the current order subtotal.

Additionally, multiple discount lines can be created when applying a new global discount, and discount lines may remain even when all product lines have been removed.

Solution: Implemented automatic synchronization of the global discount with Sale Order lines.

Changes