On 14/09/07 09:00 +0200, [EMAIL PROTECTED] wrote:
> 
> I had this problem some time ago and I thought I was fumbling around long 
> enough that it was working. Checking again I see that it's not true. See also 
> http://tinyerp.org/forum/viewtopic.php?t=2949
> 
> However, here is something that might explain why you need the writt off 
> entry in any case: Try to do your order without applying any taxes. For me 
> that is working. It might be like this that the calculation accuracy is 
> better than 2 digits. You might not see any difference between the invoiced 
> amount (calculated) and the amount you pay (2 digits) but there is one.
> 
> It's just a guess, please try it paying an invoice without taxes and let me 
> know.
> 


I find a bug in the version 4.0 on the reconciliation test.
Here is the patch that I have apply and it will be in a futur version:


commit 8c5c7b638b3850128ae70fb90bbee67f08a51e62
Author: Cédric Krier <[EMAIL PROTECTED]>
Date:   Fri Sep 14 09:26:01 2007 +0200

    Fix reconcile for rounding

diff --git a/server/bin/addons/account/account.py 
b/server/bin/addons/account/account.py
index a0cbadc..e82eb24 100644
--- a/server/bin/addons/account/account.py
+++ b/server/bin/addons/account/account.py
@@ -1155,7 +1155,7 @@ class account_move_line(osv.osv):
                        raise 'Entries are not of the same account !'
                if r[0][1] != None:
                        raise 'Some entries are already reconciled !'
-               if writeoff != 0:
+               if writeoff >= 0.01:
                        if not writeoff_acc_id:
                                raise osv.except_osv('Warning', 'You have to 
provide an account for the write off entry !')
                        if writeoff > 0:
diff --git a/server/bin/addons/account/wizard/wizard_pay_invoice.py 
b/server/bin/addons/account/wizard/wizard_pay_invoice.py
index 2c93edb..6259837 100644
--- a/server/bin/addons/account/wizard/wizard_pay_invoice.py
+++ b/server/bin/addons/account/wizard/wizard_pay_invoice.py
@@ -68,7 +68,7 @@ def _wo_check(self, cr, uid, data, context):
                amount = round(pool.get('res.currency').compute(cr, uid, 
invoice.currency_id.id, company_currency, invoice.amount_total), 2)
        else:
                amount = invoice.amount_total
-       if data['form']['amount'] == amount:
+       if abs(data['form']['amount'] - amount) >= 0.01:
                return 'reconcile'
        return 'addendum'
 

-- 
Cédric Krier

Tiny sprl
Chaussée de Namur, 40
B-1367 Gérompont
Belgique
Tel: +32 81 81 37 00
Fax: +32 81 73 35 01
Web: http://www.tiny.be

Attachment: pgptqeljXN2xz.pgp
Description: PGP signature

_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman/listinfo/tinyerp-users

Reply via email to