Discount resetting after sale header modification

Hello,

The title is pretty self-explanatory, when I click on modify header, the discount (from module sale_discount) is set to 0.

Maybe I’m doing something wrong but it looks like unintended behavior to me

When you change the sale header, the unit price of each lines are recomputed because the header may have an impact on the price computation through price list or tax rules.
So if you have modified manually the unit price of a line, this modification will be lost when running the wizard.
This is the expected behavior.

It is also expected that unit prices are not modified manually but computed via price list or promotions even for discount.