8f0e3be257c8bfd2ffee05103d10b15160fbee96
Reproduce this issue
- Install CRM & Sales
- Create 2 sales team in CRM settings
- Create some invoices and register payments for the 2 teams
- Go in CRM > Sales > Team pipelines
The invoicing amount is still 0 for both teams.
Cause
- The `_compute_invoiced` method in `CrmTeam` models use a SQL
query to retrieve the invoices lines but it returns an empty
recordset because the dates are not right ordered.
- The line balance are negatives values, doing a SUM() will always
returns 0
This commit re-order the dates and invert the sign of line.balance.
OPW-2119819
closes odoo/odoo#40115
X-original-commit: 578dacc3af04996754d1ec67108106379a9c3c38
Signed-off-by: Jason Van Malder <jasonvanmalder@users.noreply.github.com>
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
Then follow the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%