[DEL] functionality moved to l10n_it_partially_deductible_vat
authoreLBati <lorenzo.battistini@agilebg.com>
Sun, 6 Nov 2011 17:47:44 +0000 (18:47 +0100)
committereLBati <lorenzo.battistini@agilebg.com>
Sun, 6 Nov 2011 17:47:44 +0000 (18:47 +0100)
bzr revid: lorenzo.battistini@agilebg.com-20111106174744-tl0efmjn2hfsa9rp

addons/l10n_it/__init__.py
addons/l10n_it/account.py [deleted file]

index f9126cd..491d2cc 100644 (file)
@@ -25,5 +25,3 @@
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 ##############################################################################
-
-import account
diff --git a/addons/l10n_it/account.py b/addons/l10n_it/account.py
deleted file mode 100644 (file)
index 98e4d5a..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-# -*- encoding: utf-8 -*-
-##############################################################################
-#
-#    OpenERP, Open Source Management Solution
-#    Copyright (C) 2011
-#    Associazione OpenERP Italia (<http://www.openerp-italia.org>)
-#
-#    This program is free software: you can redistribute it and/or modify
-#    it under the terms of the GNU Affero General Public License as
-#    published by the Free Software Foundation, either version 3 of the
-#    License, or (at your option) any later version.
-#
-#    This program is distributed in the hope that it will be useful,
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#    GNU Affero General Public License for more details.
-#
-#    You should have received a copy of the GNU Affero General Public License
-#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-##############################################################################
-
-from osv import fields, osv
-import decimal_precision as dp
-from decimal import *
-
-class account_tax(osv.osv):
-
-    _inherit = 'account.tax'
-
-    def compute_all(self, cr, uid, taxes, price_unit, quantity, address_id=None, product=None, partner=None):
-        res = super(account_tax, self).compute_all(cr, uid, taxes, price_unit, quantity, address_id, product, partner)
-        
-        precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')
-        tax_list = res['taxes']
-        totalex = res['total']
-        if len(tax_list) == 2:
-            for tax in tax_list:
-                if tax.get('balance',False): # Calcolo di imponibili e imposte per l'IVA parzialmente detraibile
-                    deductible_base = totalex
-                    ind_tax = tax_list[abs(tax_list.index(tax)-1)]
-                    ind_tax_obj = self.browse(cr, uid, ind_tax['id'])
-                    ded_tax_obj = self.browse(cr, uid, tax['id'])
-                    base_ind = float(Decimal(str(totalex * ind_tax_obj.amount)).quantize(Decimal('1.'+precision*'0'), rounding=ROUND_HALF_UP))
-                    base_ded = float(Decimal(str(totalex - base_ind)).quantize(Decimal('1.'+precision*'0'), rounding=ROUND_HALF_UP))
-                    tax_total = float(Decimal(str(tax['balance'])).quantize(Decimal('1.'+precision*'0'), rounding=ROUND_HALF_UP))
-                    tax_ind = float(Decimal(str(tax_total * ind_tax_obj.amount)).quantize(Decimal('1.'+precision*'0'), rounding=ROUND_HALF_UP))
-                    tax_ded = tax_total - tax_ind
-                    ind_tax['price_unit']  = base_ind
-                    tax['price_unit'] = base_ded
-                    ind_tax['amount']  = tax_ind
-                    tax['amount'] = tax_ded
-
-        return res
-
-account_tax()