openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #25251
[Bug 1223461] [NEW] Parent tax value is wrongly overwritten when _unit_compute is calculated this happens in invoices v7
Public bug reported:
Problem:
The problem happens when I create a purchase invoice and the product has several taxes, and some of them have taxes children. When making the calculation (click on update) it generates a wrong calculation of certain taxes.
Analisys:
Analyzing the problem I found that when a tax have a son tax and want to
consider the son's tax. At the time it reaches the function /account /
account.py / class account_tax / def _unit_compute/ the taxes are
calculated normally but when the function reaches to the parent taxes,
this do an extra process and call again this function for calculated
son's tax, well this process finish and later charge the amounts
calculated, but in 'data' array have the amount son's tax then when
this function have to charge the values for every taxes calculated put
the value of 'data' array and this is wrong.
Solution:
Modify file account / account.py, class account_tax, method _unit_compute as follows:
Comment this line
r['amount'] = data['amount'],
I test and I do not have problems anymore.
** Affects: openobject-addons
Importance: Undecided
Status: New
** Attachment added: "Shows the Error and solution"
https://bugs.launchpad.net/bugs/1223461/+attachment/3813580/+files/tax-images.tar.gz
--
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/1223461
Title:
Parent tax value is wrongly overwritten when _unit_compute is
calculated this happens in invoices v7
Status in OpenERP Addons (modules):
New
Bug description:
Problem:
The problem happens when I create a purchase invoice and the product has several taxes, and some of them have taxes children. When making the calculation (click on update) it generates a wrong calculation of certain taxes.
Analisys:
Analyzing the problem I found that when a tax have a son tax and want
to consider the son's tax. At the time it reaches the function
/account / account.py / class account_tax / def _unit_compute/ the
taxes are calculated normally but when the function reaches to the
parent taxes, this do an extra process and call again this function
for calculated son's tax, well this process finish and later charge
the amounts calculated, but in 'data' array have the amount son's tax
then when this function have to charge the values for every taxes
calculated put the value of 'data' array and this is wrong.
Solution:
Modify file account / account.py, class account_tax, method _unit_compute as follows:
Comment this line
r['amount'] = data['amount'],
I test and I do not have problems anymore.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1223461/+subscriptions
Follow ups
References