Skip to content
Snippets Groups Projects
Commit 53edff79 authored by alt-odoo's avatar alt-odoo
Browse files

[FIX] crm: prevent division by zero in lead probability computation

If for some reason we cannot compute lead probability, we should simply
continue to the next value without causing a division by zero.

For example, this can happen if all stages are team specific, as there is
a current limitation regarding the first stage (used to know how many lost
and won there is) that requires to have no team assigned to it. This is a
side effect of the commit https://github.com/odoo/odoo/commit/cd291b79eb2d2df80899867263ec71438ab8fe87

 introduced in V14, and we should add
a test to ensure we do not crash in that case.

closes odoo/odoo#76110

Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
parent c5de1231
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