<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/crm/tests, branch 14.0</title>
<subtitle>The current checkout of upstream Odoo</subtitle>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/'/>
<entry>
<title>[FIX] crm: fix query counters: 2 tests sometimes at +3 on runbot</title>
<updated>2021-05-12T14:09:34+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2021-05-12T14:09:34+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=863a2e65c8cffce7a50253439cbf9f913f6a38bc'/>
<id>863a2e65c8cffce7a50253439cbf9f913f6a38bc</id>
<content type='text'>
/shrug

closes odoo/odoo#70753

Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
/shrug

closes odoo/odoo#70753

Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] phone_validation: add country trigger on sanitize phone computation</title>
<updated>2021-05-11T14:35:14+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2021-05-11T14:35:12+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=f593cdab18c4700af5d4e04a0aa7c6b367488f70'/>
<id>f593cdab18c4700af5d4e04a0aa7c6b367488f70</id>
<content type='text'>
If country is updated on a record inheriting from mail.thread.phone
its sanitized number should be computed again. Indeed without this
trigger it is not computed and may lead to inconsistencies between
phone numbers and sanitized number.

Task ID-2528169

closes odoo/odoo#70684

Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If country is updated on a record inheriting from mail.thread.phone
its sanitized number should be computed again. Indeed without this
trigger it is not computed and may lead to inconsistencies between
phone numbers and sanitized number.

Task ID-2528169

closes odoo/odoo#70684

Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] crm: correctly compute phone_sanitized without having crm_sms installed</title>
<updated>2021-05-11T14:27:50+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2021-05-11T14:14:00+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=4b0c551194e8ef66df9136629afe71566ffe212e'/>
<id>4b0c551194e8ef66df9136629afe71566ffe212e</id>
<content type='text'>
Currently phone_sanitized computation on lead model works only if crm_sms
is installed. Indeed an override of ``_phone_get_number_fields`` is missing.
However ``_sms_get_number_fields`` coming with ``crm_sms`` and its ``sms``
dependency hides the issue as those modules are auto-install. However if
``crm_sms`` is uninstalled phone_sanitized is not correctly computed anymore.

Task ID-2528169
Oversight of odoo/odoo#45315</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently phone_sanitized computation on lead model works only if crm_sms
is installed. Indeed an override of ``_phone_get_number_fields`` is missing.
However ``_sms_get_number_fields`` coming with ``crm_sms`` and its ``sms``
dependency hides the issue as those modules are auto-install. However if
``crm_sms`` is uninstalled phone_sanitized is not correctly computed anymore.

Task ID-2528169
Oversight of odoo/odoo#45315</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] various: update query counters according to latest runbot run</title>
<updated>2021-05-06T15:29:12+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2021-05-06T13:36:52+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=879647265bf804e63bd8e89ec3ca58b51ffb29ea'/>
<id>879647265bf804e63bd8e89ec3ca58b51ffb29ea</id>
<content type='text'>
Base: seems related fields take only 1 extra query instead of 3

Crm: assignment seems to have been slightly improved. Some randomness still
happens.

Hr Holidays: seems it was further improved beyond space frontier

Test mail: those tests were a bit random, seems random is gone (hopefully)

Test mail full: updated local counters

Test mass mailing: seems we gained one query, updated local counters

closes odoo/odoo#70486

Related: odoo/enterprise#18180
Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Base: seems related fields take only 1 extra query instead of 3

Crm: assignment seems to have been slightly improved. Some randomness still
happens.

Hr Holidays: seems it was further improved beyond space frontier

Test mail: those tests were a bit random, seems random is gone (hopefully)

Test mail full: updated local counters

Test mass mailing: seems we gained one query, updated local counters

closes odoo/odoo#70486

Related: odoo/enterprise#18180
Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] crm: do not reset action name in convert wizard each time an option changes</title>
<updated>2021-05-03T08:31:41+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2021-05-03T08:29:15+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=d75905f7acb1e7584d01792b4880fa76e6920d56'/>
<id>d75905f7acb1e7584d01792b4880fa76e6920d56</id>
<content type='text'>
Currently ``name`` field that holds the action type is recomputed each time
duplicated leads are updated. However duplicated leads are often updated
notably each time customer action (create / link / do nothing) and chosen
customer are updated.

As ``name`` compute method is mainly present to replace a default value
its compute method is updated so that it nows compute only when not having
a value. Once having a value user choice is kept.

Task ID-2452777
COM PR odoo/odoo#68618

Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently ``name`` field that holds the action type is recomputed each time
duplicated leads are updated. However duplicated leads are often updated
notably each time customer action (create / link / do nothing) and chosen
customer are updated.

As ``name`` compute method is mainly present to replace a default value
its compute method is updated so that it nows compute only when not having
a value. Once having a value user choice is kept.

Task ID-2452777
COM PR odoo/odoo#68618

Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] crm: display right partner and action when converting lead</title>
<updated>2021-05-03T08:31:41+00:00</updated>
<author>
<name>Nasreddin (bon)</name>
<email>bon@odoo.com</email>
</author>
<published>2021-03-31T17:34:25+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=6915d17f5f10737c03c820b69eded3a7c0151907'/>
<id>6915d17f5f10737c03c820b69eded3a7c0151907</id>
<content type='text'>
Issue
	- Create a partner with email 'aaa@test.com'
	- In CRM settings, activate 'Leads' feature
	- Go to CRM -&gt; Leads and create a Lead:
	- Set email field to 'aaa@test.com'
	- Click on 'Convert to opportunity'

	Neither the action or partner_id field is set to the right value.

Cause

	Due to missing 'lead_id' field in template, the partner_id field
	is not recomputed since action is not recomputed.

Solution

	Add 'lead_id' field as invisible in form.

opw-2439722
Task ID-2452777
COM PR odoo/odoo#68618</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Issue
	- Create a partner with email 'aaa@test.com'
	- In CRM settings, activate 'Leads' feature
	- Go to CRM -&gt; Leads and create a Lead:
	- Set email field to 'aaa@test.com'
	- Click on 'Convert to opportunity'

	Neither the action or partner_id field is set to the right value.

Cause

	Due to missing 'lead_id' field in template, the partner_id field
	is not recomputed since action is not recomputed.

Solution

	Add 'lead_id' field as invisible in form.

opw-2439722
Task ID-2452777
COM PR odoo/odoo#68618</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] crm: fix incorrect prefix removal from phone filter</title>
<updated>2021-04-23T13:18:58+00:00</updated>
<author>
<name>Julien Banken</name>
<email>jbn@odoo.com</email>
</author>
<published>2021-04-23T13:18:58+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=b08ea4414f4e2eefcc9e71ca7e876d2cd44c7565'/>
<id>b08ea4414f4e2eefcc9e71ca7e876d2cd44c7565</id>
<content type='text'>
When the user searches a phone number, the search function will generate
a pattern by removing the "+" sign as well as well as the prefix "00" from
the input string.

Problem:

If the input string starts with "+", it means that the phone number will
be prefixed by something different than "00". As the function will
systematically remove the first occurrence of "00" from the input string,
the function can remove part of the input string that does not correspond
to a prefix. The search results can hence be incorrect.

Example:

If the user types "+32485001122", the function will remove the "+" sign
and the first occurrence of "00" from the input string. In the provided
example, the function will search phone numbers matching with the pattern
"324851122" which is incorrect.

Solution:

The function should remove the first occurrence of "00" iff the phone
starts with "00".

Task id: 2479277
COM PR: odoo/odoo#69729

Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the user searches a phone number, the search function will generate
a pattern by removing the "+" sign as well as well as the prefix "00" from
the input string.

Problem:

If the input string starts with "+", it means that the phone number will
be prefixed by something different than "00". As the function will
systematically remove the first occurrence of "00" from the input string,
the function can remove part of the input string that does not correspond
to a prefix. The search results can hence be incorrect.

Example:

If the user types "+32485001122", the function will remove the "+" sign
and the first occurrence of "00" from the input string. In the provided
example, the function will search phone numbers matching with the pattern
"324851122" which is incorrect.

Solution:

The function should remove the first occurrence of "00" iff the phone
starts with "00".

Task id: 2479277
COM PR: odoo/odoo#69729

Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] crm: prevent email_from propagation if only formatting differs</title>
<updated>2021-03-15T11:38:37+00:00</updated>
<author>
<name>Munaf Khan</name>
<email>mub@odoo.com</email>
</author>
<published>2021-02-26T04:46:57+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=b0023e2afa9a08b0d60e54b335f31d07018abecd'/>
<id>b0023e2afa9a08b0d60e54b335f31d07018abecd</id>
<content type='text'>
Before this commit when we update the email_from field on lead with only
formatting differing from partner a warning ribbon was displayed. It
considered email had changed and had to be propagated. Moreover unnecessary
update on partner was done to propagate the new email onto the customer.

In this commit we propagate email only if normalized versions are different.
It means that if lead email_from is "Hermes Conrad &lt;email@example.com&gt;" and
partner email is "Jonathan Conrad &lt;email@example.com"&gt; no update from lead
to partner is performed. Indeed normalized versions are the same.

Task ID-2461308
PR odoo/odoo#66890

Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before this commit when we update the email_from field on lead with only
formatting differing from partner a warning ribbon was displayed. It
considered email had changed and had to be propagated. Moreover unnecessary
update on partner was done to propagate the new email onto the customer.

In this commit we propagate email only if normalized versions are different.
It means that if lead email_from is "Hermes Conrad &lt;email@example.com&gt;" and
partner email is "Jonathan Conrad &lt;email@example.com"&gt; no update from lead
to partner is performed. Indeed normalized versions are the same.

Task ID-2461308
PR odoo/odoo#66890

Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] crm: improve phone / email tests for lead / partner sync</title>
<updated>2021-03-15T11:34:03+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2021-03-15T09:43:55+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=9733c22d0645459a0e5f280f59242dd31070d9b2'/>
<id>9733c22d0645459a0e5f280f59242dd31070d9b2</id>
<content type='text'>
Purpose of this commit is to improve phone, email and mobile synchronization
tests for lead / partner. Notably

  * mobile is not synchronized: only a void mobile is set to partner's mobile
    when changing partner. It is not synchronized back onto partner;
  * email / phone are correctly synchronized;
  * phone_sanitized is computed on both lead and partner based first on mobile
    then on phone. It means records having the same phone numbers could have
    different phone_sanitized values if mobile numbers differ;

Task ID-2461308
PR odoo/odoo#66890</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Purpose of this commit is to improve phone, email and mobile synchronization
tests for lead / partner. Notably

  * mobile is not synchronized: only a void mobile is set to partner's mobile
    when changing partner. It is not synchronized back onto partner;
  * email / phone are correctly synchronized;
  * phone_sanitized is computed on both lead and partner based first on mobile
    then on phone. It means records having the same phone numbers could have
    different phone_sanitized values if mobile numbers differ;

Task ID-2461308
PR odoo/odoo#66890</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] crm: prevent crash due to invalid system parameter</title>
<updated>2021-02-12T04:59:25+00:00</updated>
<author>
<name>Munaf Khan</name>
<email>mub@odoo.com</email>
</author>
<published>2021-01-27T09:47:08+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=fe177e76f92c38216afb7c977d91dece856e6bf1'/>
<id>fe177e76f92c38216afb7c977d91dece856e6bf1</id>
<content type='text'>
Right now, if someone changes the `crm.pls_start_date` system parameter
to something that is not valid, opening a settings gives you traceback.

This commit improves the behavior by making sure that the compute field on
settings page `predictive_lead_scoring_start_date` always contains a valid
date. For doing so, if the system parameter is not a valid date(or not set
or deleted), we set the above field to the date 8 days prior to current
date, and thus, when saving the settings, the system parameter is again
set with a valid date.

closes odoo/odoo#65985

Taskid: 2448248
X-original-commit: ead10c7e0a22ce65a88558cdfaa99198ac27e524
Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Right now, if someone changes the `crm.pls_start_date` system parameter
to something that is not valid, opening a settings gives you traceback.

This commit improves the behavior by making sure that the compute field on
settings page `predictive_lead_scoring_start_date` always contains a valid
date. For doing so, if the system parameter is not a valid date(or not set
or deleted), we set the above field to the date 8 days prior to current
date, and thus, when saving the settings, the system parameter is again
set with a valid date.

closes odoo/odoo#65985

Taskid: 2448248
X-original-commit: ead10c7e0a22ce65a88558cdfaa99198ac27e524
Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
