Hello, This problem has arisen for a few - and I wonder why only a few. Perhaps most people use bank rec.
I think the problem lies in the res_currency.py of 4.2.0, but I figured I would post my thoughts here for comment to see if I missing how it is supposed to work. Here is the code: def round(self, cr, uid, currency, amount): return round(amount / currency.rounding) * currency.rounding def is_zero(self, cr, uid, currency, amount): return abs(self.round(cr, uid, currency, amount)) < currency.rounding "is_zero" is the call made by account_move_line when processing an invoice payment. So the currency and the amount are passed to "is_zero", which then passes them both to round(). All round does is divide and multiply the invoice amount by the currency.rounding number, which strips any extraenous decimal places. This is passed back to is_zero which is then checked to see if the number is less than currency.rounding. Now it seems unlikely that any invoice amount after rounding should be less than the currency rounding figure. Perhaps the code should be: def is_zero(self, cr, uid, currency, amount): return (amount - abs(self.round(cr, uid, currency, amount))) < currency.rounding In other words, subtract the rounded number from the actual number then confirm the result is less than the rounding tolerance. I haven't fully thought through what this is trying to accomplish, as it is late here. Any comments? Paul ------------------------ ServWise Advanced Web Hosting - Better, Faster, Smarter (http://www.servwise.com) _______________________________________________ Tinyerp-users mailing list http://tiny.be/mailman/listinfo/tinyerp-users
