Skip to content
Snippets Groups Projects
Commit 8f0e3be2 authored by jvm-odoo's avatar jvm-odoo Committed by fw-bot
Browse files

[FIX] sale: fix sales team goal not updated in CRM pipelines


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: 578dacc3
Signed-off-by: default avatarJason Van Malder <jasonvanmalder@users.noreply.github.com>
parent 1270eaad
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment