[FIX]:UnboundLocalError for Tax case:(16655)
authorAmit Dodiya (OpenERP) <ado@tinyerp.com>
Mon, 8 Aug 2011 06:58:38 +0000 (12:28 +0530)
committerAmit Dodiya (OpenERP) <ado@tinyerp.com>
Mon, 8 Aug 2011 06:58:38 +0000 (12:28 +0530)
bzr revid: ado@tinyerp.com-20110808065838-srygsjm65ypdz94t

addons/account/account.py

index 6e428ae..bdb82a0 100644 (file)
@@ -2003,6 +2003,7 @@ class account_tax(osv.osv):
                 cur_price_unit -= tax.amount
 
         for tax in taxes:
+            amount = 0.0
             if tax.type=='percent':
                 if tax.include_base_amount:
                     amount = cur_price_unit - (cur_price_unit / (1 + tax.amount))