Parent tax value is wrongly overwritten when _unit_compute is calculated this happens in invoices v7

Bug #1223461 reported by Andrea Garcia
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Invalid
Undecided
Unassigned

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.

Revision history for this message
Andrea Garcia (andrea-garcia) wrote :
Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Andrea,

I have seen your images correctly, Would you please provide the complete configuration of taxes?

Because there are some things need to know that you have used the Tax included in base price? or etc.
Also need to know you applied the 2 taxes on invoice and one have child taxes correct?

Please give me complete configuration, So I can test the same.

Thank you!

Revision history for this message
Amit Parik (amit-parik) wrote :

Also would you please check lp:1211171. Is this the same problem you faced?

Thank you!

Changed in openobject-addons:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for OpenERP Addons because there has been no activity for 60 days.]

Changed in openobject-addons:
status: Incomplete → Expired
Changed in openobject-addons:
status: Expired → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.