openobject-italia-core-devs team mailing list archive
-
openobject-italia-core-devs team
-
Mailing list archive
-
Message #01011
[Merge] lp:~dr.dran/openobject-italia/fix_for_account_move_template into lp:openobject-italia/6.1
Franco Tampieri - Agile BG - Domsense has proposed merging lp:~dr.dran/openobject-italia/fix_for_account_move_template into lp:openobject-italia/6.1.
Requested reviews:
OpenERP Italia core devs (openobject-italia-core-devs)
For more details, see:
https://code.launchpad.net/~dr.dran/openobject-italia/fix_for_account_move_template/+merge/129119
[Fix] Aggiunta patch per risolvere il problema sul metoo compute_all()
--
https://code.launchpad.net/~dr.dran/openobject-italia/fix_for_account_move_template/+merge/129119
Your team OpenERP Italia core devs is requested to review the proposed merge of lp:~dr.dran/openobject-italia/fix_for_account_move_template into lp:openobject-italia/6.1.
=== modified file 'l10n_it_partially_deductible_vat/AUTHORS.txt'
--- l10n_it_partially_deductible_vat/AUTHORS.txt 2011-11-06 11:25:21 +0000
+++ l10n_it_partially_deductible_vat/AUTHORS.txt 2012-10-11 08:54:57 +0000
@@ -1,1 +1,2 @@
Lorenzo Battistini <lorenzo.battistini@xxxxxxxxxxx>
+Franco Tampieri <franco.tampieri@xxxxxxxxxxx>
=== modified file 'l10n_it_partially_deductible_vat/account.py'
--- l10n_it_partially_deductible_vat/account.py 2012-07-17 06:49:33 +0000
+++ l10n_it_partially_deductible_vat/account.py 2012-10-11 08:54:57 +0000
@@ -31,7 +31,7 @@
class account_tax(osv.osv):
_inherit = 'account.tax'
-
+
def _have_same_rate(self, account_taxes):
rate = None
for account_tax in account_taxes:
@@ -46,7 +46,7 @@
return tax
else:
return self.get_main_tax(tax.parent_id)
-
+
def get_account_tax_by_tax_code(self, tax_code):
if tax_code.tax_ids:
if not self._have_same_rate(tax_code.tax_ids):
@@ -60,7 +60,7 @@
return tax_code.ref_tax_ids[0]
raise osv.except_osv(_('Error'),
_('No taxes associated to tax code %s') % str(tax_code.name))
-
+
def get_account_tax_by_base_code(self, tax_code):
if tax_code.base_tax_ids:
if not self._have_same_rate(tax_code.base_tax_ids):
@@ -75,9 +75,9 @@
raise osv.except_osv(_('Error'),
_('No taxes associated to tax code %s') % str(tax_code.name))
- def compute_all(self, cr, uid, taxes, price_unit, quantity, address_id=None, product=None, partner=None):
+ def compute_all(self, cr, uid, taxes, price_unit, quantity, address_id=None, product=None, partner=None, force_excluded=False):
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']
@@ -101,10 +101,10 @@
class account_invoice_tax(osv.osv):
_inherit = "account.invoice.tax"
-
+
'''
tax_grouped:
-
+
{(False, 21, 132): {'account_id': 132,
'amount': 12.36,
'base': 61.79,
@@ -139,7 +139,7 @@
'tax_amount': 24.71,
'tax_code_id': 26}}
'''
-
+
def tax_difference(self, cr, uid, cur, tax_grouped):
real_total = 0
invoice_total = 0
@@ -215,12 +215,12 @@
inv_tax['tax_amount'] = cur_obj.round(cr, uid, cur, inv_tax['tax_amount'])
inv_tax_2['amount'] = cur_obj.round(cr, uid, cur, inv_tax_2['amount'])
return tax_grouped
-
+
class account_tax_code(osv.osv):
_inherit = 'account.tax.code'
-
+
_columns = {
'base_tax_ids': fields.one2many('account.tax', 'base_code_id', 'Base Taxes'),
'tax_ids': fields.one2many('account.tax', 'tax_code_id', 'Taxes'),
Follow ups