Skip to content
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

[FW][FIX] crm: make pls test independant of demo data #165938

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented May 17, 2024

As all won / lost leads will have an impact on the PLS frequency table, demo data will have one
on the probabilities of leads without team_id set, as their probability is based on all leads, regardless on their team. Therefore, make sure we unlink all leads that are not the ones created in the test. We rebuild the table below, which is needed to ensure we only consider test leads.

Follow up of ecac497

Task-3700966

Forward-Port-Of: #165842
Forward-Port-Of: #162414

As all won / lost leads will have an impact on
the PLS frequency table, demo data will have one
on the probabilities of leads without team_id set,
as their probability is based on all leads, regardless
on their team. The demo data also creates entries in
the frequency table as some leads are lost / won.

Therefore, make sure we unlink all leads and frequencies
in the setUpClass, to avoid any interference with
demo data. One should create leads directly in their test.
The models are flushed too to account for the deletion.

Follow up of ecac497

Task-3700966

X-original-commit: c87da27
@robodoo
Copy link
Contributor

robodoo commented May 17, 2024

@fw-bot
Copy link
Contributor Author

fw-bot commented May 17, 2024

This PR targets saas-16.4 and is part of the forward-port chain. Further PRs will be created up to master.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@robodoo robodoo added the forwardport This PR was created by @fw-bot label May 17, 2024
@C3POdoo C3POdoo added the RD research & development, internal work label May 17, 2024
robodoo pushed a commit that referenced this pull request May 21, 2024
As all won / lost leads will have an impact on
the PLS frequency table, demo data will have one
on the probabilities of leads without team_id set,
as their probability is based on all leads, regardless
on their team. The demo data also creates entries in
the frequency table as some leads are lost / won.

Therefore, make sure we unlink all leads and frequencies
in the setUpClass, to avoid any interference with
demo data. One should create leads directly in their test.
The models are flushed too to account for the deletion.

Follow up of ecac497

Task-3700966

closes #165938

X-original-commit: c87da27
Signed-off-by: Noé Antoine (nan) <nan@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
@robodoo robodoo closed this May 21, 2024
@fw-bot fw-bot deleted the saas-16.4-15.0-crm-fix_pls_test_demo_independant-nan-lcag-fw branch June 4, 2024 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forwardport This PR was created by @fw-bot RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants