Problem
In erp5-trade, when sale invoice is made by delivery builder, discount line in sale order is appended to sale invoice as tax line.
Reason
Discount line belong to tax_movement group. So delivery builder collects discount lines by tax rule, then deliver into sale invoice as tax line.
Solution proposal
Delete relation of discount line to tax_movement group and relate new discount_movement, then make new delivery builder as sale_invoice_discount_builder for to deliver discount line to sale invoice, and also make discount rule.
But I think this proposal needs discussion. Because currently tax system in sale order is designed to calculate by tax_movement group, that contains tax line and discount line. They are just too similar, so I am not sure about to more duplicate logic for there.