Parent tax value is wrongly overwritten when _unit_compute is calculated this happens in invoices v7
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.
Changed in openobject-addons: | |
status: | Expired → Invalid |
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!