[FW][FIX] account: compute price unit when updating taxes after fpos change #210504
+1
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
The action to update Taxes and Accounts when changing the fiscal pos on invoice isn't considering the change in price_unit for lines with price included taxes.
Steps to Reproduce:
1- Create a 21% tax and another 6% tax, both are included in price
2- Create a fiscal position that will map the 21% tax by the 6% tax
3- Create a product with Price = 121€, and Tax = 21%
4- Create an invoice with this product.
5- On the (Other info) tab, set the Fiscal Position to the one created (from 21 to 6).
6- Click on update taxes and accounts:
The price will still be 121 while the taxes will change to 6%, and total = 121.
7- Then if you added a new line with the product now after setting the fiscal pos , you will get
price= 106, tax=6%, total = 106. which are the right values.
Cause:
The action created for updating taxes and accounts didn't consider price changes for price included taxes.
Fix:
Add call to _compute_price_unit()
opw-4672466
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: #208780