8000 [FIX] account: compute price unit when updating taxes after fpos change by m-gad1 · Pull Request #208780 · odoo/odoo · GitHub
[go: up one dir, main page]

Skip to content

[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

Conversation

m-gad1
Copy link
Contributor
@m-gad1 m-gad1 commented May 7, 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 (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

@robodoo
Copy link
Contributor
robodoo commented May 7, 2025

Pull request status dashboard

@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label May 7, 2025
@m-gad1 m-gad1 marked this pull request as ready for review May 7, 2025 13:25
@C3POdoo C3POdoo requested review from a team and alialfie and removed request for a team May 7, 2025 13:51
Copy link
Contributor
@alialfie alialfie left a 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
@m-gad1 m-gad1 force-pushed the 17.0-fix-action_update_fpos_values-price-included-tax-myah branch from 67592eb to 458ae5c Compare May 16, 2025 13:17
@alialfie
Copy link
Contributor

Thanks!
robodoo r+

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>
@robodoo robodoo closed this May 16, 2025
@fw-bot fw-bot deleted the 17.0-fix-action_update_fpos_values-price-included-tax-myah branch May 23, 2025 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OE the report is linked to a support ticket (opw-...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0