openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #22664
[Bug 1108801] Re: taxes on invoice depend on the order of the line items
what chart of accounts is that?
here is a diff that fixes the problem by the tax name rather than the id. The problem happens when you have two taxes with the same base code and same tax code but different amounts on them. We have this in the UK chart of accounts - your one is probably set up differently.
=== modified file 'account/account_invoice.py'
--- account/account_invoice.py 2013-01-05 23:29:19 +0000
+++ account/account_invoice.py 2013-01-31 09:27:02 +0000
@@ -786,7 +786,7 @@
for tax in inv.tax_line:
if tax.manual:
continue
- key = (tax.tax_code_id.id, tax.base_code_id.id, tax.account_id.id, tax.account_analytic_id.id)
+ key = (tax.tax_code_id.id, tax.base_code_id.id, tax.account_id.id, tax.account_analytic_id.id,tax.name)
tax_key.append(key)
if not key in compute_taxes:
raise osv.except_osv(_('Warning!'), _('Global taxes defined, but they are not in invoice lines !'))
@@ -1692,7 +1692,7 @@
val['account_id'] = tax['account_paid_id'] or line.account_id.id
val['account_analytic_id'] = tax['account_analytic_paid_id']
- key = (val['tax_code_id'], val['base_code_id'], val['account_id'], val['account_analytic_id'])
+ key = (val['tax_code_id'], val['base_code_id'], val['account_id'], val['account_analytic_id'], val['name'])
if not key in tax_grouped:
tax_grouped[key] = val
else:
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1108801
Title:
taxes on invoice depend on the order of the line items
Status in OpenERP Addons (modules):
Incomplete
Bug description:
I created an invoice with two line items, first zero rated and second
standard rated. Compute taxes added a single tax line coded as zero
rated with the tax amount of the second vatable item. If I swap the
lines around then it gets coded as standard rate, including the base
amount of the zero rated item. I would expect two tax lines coded
differently so that they go in the right boxes on the VAT report
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1108801/+subscriptions
References