-
Notifications
You must be signed in to change notification settings - Fork 28.8k
[FIX] account: compute price unit when updating taxes after fpos change #208780
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
m-gad1
wants to merge
1
commit into
odoo:17.0
from
odoo-dev:17.0-fix-action_update_fpos_values-price-included-tax-myah
Closed
[FIX] account: compute price unit when updating taxes after fpos change #208780
m-gad1
wants to merge
1
commit into
odoo:17.0
from
odoo-dev:17.0-fix-action_update_fpos_values-price-included-tax-myah
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alialfie
requested changes
May 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR!
A few things:
- The commit title has the model name, it should be the module name instead.
- Please limit the commit message line length to 72 characters.
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. 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. opw-4672466
67592eb
to
458ae5c
Compare
Thanks! |
alialfie
approved these changes
May 16, 2025
robodoo
pushed a commit
that referenced
this pull request
May 16, 2025
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. 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. opw-4672466 closes #208780 Signed-off-by: Ali Alfie (alal) <alal@odoo.com>
robodoo
pushed a commit
that referenced
this pull request
May 16, 2025
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. 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. opw-4672466 closes #208780 Signed-off-by: Ali Alfie (alal) <alal@odoo.com>
This was referenced May 16, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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