Comment 1 for bug 407332

Revision history for this message
Numérigraphe (numerigraphe) wrote :

I addition to this bug, the same problem seems to show up in the class account_payment_term terms too, with the same ill effect of making the invoice unbalanced.
I worked it around it by changing rount(..., 2) to rount(..., 5) but this is not a clean soultion.
Lionel.

    def compute(self, cr, uid, id, value, date_ref=False, context={}):
#...
     if line.value == 'fixed':
                amt = round(line.value_amount, 2)
            elif line.value == 'procent':
                amt = round(value * line.value_amount, 2)
            elif line.value == 'balance':
                amt = round(amount, 2)
#...t