odoo/odoo#195071
Created by fw-bot
Merged
at 69e090b756e326482da91bb719c662c9c3fc9160
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/template: Contact runbot team on discord for help.
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- label
- odoo-dev:18.0-16.0-OPW-4416931-project_purchase_account_negative_entry_not_reflecting_in_aal-kdeb-l9h4-fw
- head
- bf9896c553ffcf3b3704ac9e4976c46d1aa784ac
- merged
- 8 months ago by Bugfix, Kawtar Drissi El Bouzaidi (kdeb)
odoo/odoo | |
---|---|
16.0 | #194300 |
17.0 | #194837 |
saas-17.2 | #194960 |
saas-17.4 | #195049 |
18.0 | #195071 |
saas-18.1 | #195546 |
saas-18.2 | |
saas-18.3 | |
saas-18.4 | |
19.0 | |
master | #195562 |
[FW][FIX] project_purchase: include negative bills in project profitability
Issue:
- The negative values in Vendor Bills are not being reflected in the Analytic Account linked to a project.
- the negative value does not reduce the project’s total cost in the Analytic Report cost calculations.
Steps to reproduce:
1- Create a project and set an analytic account or use the "Renovations" project.
2- Create a vendor bill.
3- On the VB add two lines one with a positive Price and the other with a negative Price.
4- on Analytic
of each line set the project to Renovations
or the project you created.
5- Validate the vendor bill.
6- Go to the project app and click on the 3 dots of the project you choose and click on Project Updates
.
7- Notice the total cost of the project is not reflecting the negative value of the vendor bill.
Solution:
- The issue is caused by the condition ('price_subtotal', '>', 0) in the query for account.move.line.
- Removing this condition ensures both positive and negative price_subtotal values are included.
opw-4416931
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr