When I set fixed discount the first time on a invoice line, everything goes well other than the fact that the fixed discount field gets set back to 0.
|
self.discount_fixed = 0.0 |
It seems the initial intent is to "disable" the fixed discount field if discount% field is used by setting it to 0 but that leads inconsistency in data since the 2 discount fields will not tally. Would it be better to just reverse compute the field as such?
self.discount_fixed = self.price_unit * (self.discount / 100.0)
When I set fixed discount the first time on a invoice line, everything goes well other than the fact that the fixed discount field gets set back to 0.
account-invoicing/account_invoice_fixed_discount/models/account_move_line.py
Line 77 in f6fd6b0
It seems the initial intent is to "disable" the fixed discount field if discount% field is used by setting it to 0 but that leads inconsistency in data since the 2 discount fields will not tally. Would it be better to just reverse compute the field as such?
self.discount_fixed = self.price_unit * (self.discount / 100.0)