Steps to reproduce issue:
1. Open CRM and select a list/tree view (opportunities or leads)
2. Select multiple records and try merging them (gear menu)
3. Click on salesperson field
4. Field dropdown contains portal users, should not be the case
Explanation:
`user_id` (salesperson field) in `crm.merge.opportunity` is a many2one related to res.users. Since it is not restricted, every existing user is listed in the selection.
Suggested fix:
In `crm.lead`, its homologous field possesses the domain formula `('share', '=', False)`.
https://github.com/odoo/odoo/blob/f987dd26e928bd0394cd0b835cc1d0fdd72e9234/addons/crm/models/crm_lead.py#L105-L108
Copying it into `crm.merge.opportunity` correctly restricts the users selection.
opw-3696148
closesodoo/odoo#153230
X-original-commit: e43d13d8aae2b46107237102e9f45a4c8e8e39df
Signed-off-by: Stroobant Paul (stpa) <stpa@odoo.com>
Steps to reproduce:
- Install Contacts and Sales.
- Activate debug mode and go to contacts.
- Create new contact and get the mobile view inside the contact form.
- Go under Sales & Purchases and look for sales team.
- Try to change it in mobile.
The issue is that we were missing the template view for these specific
fields when on mobile, specifically we didn't had the proper kanban view
set for these fields.
opw-3323976
closesodoo/odoo#147365
X-original-commit: 52992f9cbd94aaea6d1500f20862bf2d6fa811ab
Signed-off-by: Jérémy Hennecart (jeh) <jeh@odoo.com>
This commit makes hotkey uses more coherent throughout the entire
codebase by setting alt+q as main shortcurt for confirm and default
actions and alt+x for cancel actions.
task-3370463
closesodoo/odoo#127469
Related: odoo/enterprise#43694
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
To set the lost reason you currently need to toggle a field
in the wizard if you are marking a lead as lost.
As the loss reason isn't technically necessary, we can just let users
choose whether to input anything or not without having to click anything
We also introduce groups so field strings are displayed.
As the first field cannot easily be implied
to be the loss reason anymore.
task-3356095
X-original-commit: b5181ea609f798e09e2032fe182e01fd07d1c10e
Part-of: odoo/odoo#124437
This cancels the changes added to f91782279a
for minor version 16.3 as the server action is completely removed
instead of being fixed in this.
The action is not removed in the upgrade as it is still technically
working. Though it should be considered deprecated.
------------------------------------
We remove the action that was used to conditionally call a window action
The action was not called consistently and added confusing indirection.
To maintain the current behaviour of only suggesting adding a loss
reason for opportunities.
We make the reason fields toggleable in the wizard, and hide them by
default for leads.
This leaves the user with the option to add a reason anyway, and serves
as a confirmation wizard if they don't want to.
-------------------
task-3272955
closesodoo/odoo#118494
Related: odoo/upgrade#4640
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Prior to this we used the context active_ids directly to determine
which leads to mark as lost in the lost reason wizard.
We now use a m2m field to store that value to make the behavior more
obvious and predictable, and to ease debugging.
task-3272955
Part-of: odoo/odoo#118494
*: sale,sales_team
Improve UI of the CRM app:
- Add placeholders and underline m2o fields in the CRM quick create
- In the lead generation form, underline the industries field, add
the avatar widget on the user_id field, add the color attributes on
the tag field, add a placeholder for the states field and set a
longer selection field to avoid the caret from overlapping the content.
- In the opportunity form, align the expected revenue and probability
headers, set a longer width for the expected revenue field,
change the recurring plan placeholder.
- In the contact opportunities page, change the "Open Opportunities"
filter to exclude lost opportunities.
- In the Sales team page, add a groupby on the company_id.
- In the Sales team form, change the assigned lead count to be
a muted text, the pipeline checkbox should be visible only when leads
has been activated, the quotations/pipeline/leads options should be
aligned.
- In the lost lead modal, change the title from "Lost Reason"
to "Lost Lead" and the validate button from "Submit" to
"Mark as lost".
- In the Sales team member form, align the fields on the left and hide
the Create Employee field as it should not be displayed there because
this is not an hr module.
- In the lead analysis tree view, add the lost reason field with optional
hide.
- Align the enrichment company not found message to the left of the chatter.
- Update the crm iap lead role "Search More" list to display human
readable names instead of the technical names.
Task-3204763
Part-of: odoo/odoo#115326
When converting a lead to an opportunity and merging with existing
opportunities, the list view showing opportunities is very tiny.
This is caused by the field not having the correct colspan, as its label is
hidden with the "nolabel" attribute.
This commit fixes it by assigning a colpan of 2.
Task-3179173
closesodoo/odoo#119790
X-original-commit: 6a003a12c92d215f8123538473eeb23a36e9ec7e
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Enforce strict types for returned values for
* create
* write
* unlink
* default_get
to make those methods more consistent and reliable.
Also make sure they can be called with empty self/values,
i.e. that they follow the same behavior as the base methods
defined in the main orm Model.
closesodoo/odoo#116809
Related: odoo/enterprise#38880
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Steps to reproduce:
- Install Sales.
- Go to any quotation and toggle mobile device mode in the browser.
- Go to Other Info > click in Sales Team field.
Issue:
We stop supporting the 'kanban_view_ref' in newer versions of odoo. So
we won't be able to get proper view.
Solution:
Changed the way we ref the kanban view to use context to get the
referenced kanban view.
Related to #39499
opw-3152174
closesodoo/odoo#116031
Related: odoo/enterprise#39499
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
When using message_post, the body format must be explicitly specified.
If html is expected, a Markup object should be used.
If text is given, the content will be escaped.
Before this PR:
message_post was unaware if the content of a message was HTML or
text. This lead to multiple situation where the content was
incorrectly considered as HTML and led to display errors.
In
self.message_post(body="Hello %s!" % self.name)
if the name contained HTML, it would be evaluated.
In
self.message_post(body="Contact Raoul <raoul@caramail.be>")
the email would not be displayed as considered as unknown HTML and
discarded by the sanitizer
Now each call must explict the type of content.
Use the escape() helper to properly combine Markup and translations.
It would also be acceptable to use Markup() to wrap a static
translation but escape is better as one can not guarantee the content
of a translation.
closesodoo/odoo#111850
Related: odoo/documentation#3612
Related: odoo/enterprise#36728
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
According to Wiktionary, French spacing is "the archaic practice (though
still current in French) of inserting a space around colons, semicolons,
question marks, and exclamation marks". This is not standard practice in
English and most languages of the world.
The purpose of this commit is to start purging the code from this typo,
as it may reflect poorly on the software for some people.
closesodoo/odoo#114533
Related: odoo/enterprise#37853
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Make the date field always underlined in the PLS modal in
the settings, to indicate that it is editable and not a
technical constraint.
Also rename confirm button to "update".
Task-3193113
closesodoo/odoo#114223
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
The type fields of actions already defaults to
the model name in the base model definition.
Therefore, specifying `ir.actions.server`, `ir.actions.act_window`
& so on as type is useless (and adds noise since it's the same as
the action model).
closesodoo/odoo#114539
Related: odoo/enterprise#37855
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
With this commit, the size of the following wizards will be reduced to medium:
\1 Schedule mailing (Email Marketing)
\2 Test mailing (Email Marketing)
\3 Lost reason (CRM)
taskID- 2701035
closesodoo/odoo#96500
Related: odoo/enterprise#29746
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit aims at removing unuseful help message to:
1/ reduce translators work, to focus on more useful translations
2/ not sending unuseful information in load_views
3/ reduce help message to useful messages, so that we can mark
fields having a tooltip in the future UI.
4/ some cleanup of existing messages too
The main use cases:
- REMOVED: help redundant with the field name, providing no extra info
- MOVED TO COMMENT: technical help messages, that should not be in UX
closesodoo/odoo#97279
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
Use case
--------
A sale user convert a lead to an opportunity, this lead has duplicates.
The wizard will convert and merge the lead. At the end of the process
the duplicated lead are delete.
Issue
-----
Before this commit the user get an access error because he cannot delete
leads
Since they can merge lead using the action "Merge" it's not consistent
and sales user should be able to merge lead during the conversion
as well
closesodoo/odoo#94699
X-original-commit: 3b79867460d9a407fba094fe1cd719d8d52011ef
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Thibault Francois <tfr@odoo.com>
Three supported types:
- btree (default for index=True)
- btree not null (when >90% of the data are null)
- gin trigram search (for char fields)
Review of indexes on all objects.
closesodoo/odoo#83015
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
Currently when converting leads we may end up with False being compared to
a void partner recordset. Due to the use of != this leads to unnecessary
update of leads when no partner is involved in lead convert.
By comparing recordsets everytime we save queries and performance each
time a convert on a lead without customer is done. This leads to about
saving 150 queries in heavy duty tests.
Task-2722512 (Lead: performance in convert without customer)
Task-2722513 (Lead: performance master task)
closesodoo/odoo#81028
Related: odoo/enterprise#23094
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
Concatenate feedback message and tracking when marking a lead as lost. This
currently generates 2 consecutive message about the same change, having a
single one is better from an UI point of view.
SPECIFICATIONS
Allow to link a body to a value change tracking. Tracking is currently done
by accumulating changes in a structure (see ``env.cr.precommit.data`` usage
with ``mail.tracking.<name>`` key). In the end those values are used to
generate a message with tracking value and a subtype.
In this commit we allow to manually set a body used as a message for the
tracking message, adding a new ``mail.tracking.message.<name>`` key. It is
used when posting or logging the tracking message, simply propagated as body
to ``message_post`` or ``message_log``.
In crm we use this when losting a lead through the dedicated wizard. A bit
of custom html allows to have a nice display.
Task-2671709
Part-of: odoo/odoo#78648
As this is a many2one, it should end with an ``_id`` suffix. Otherwise we
may think this is a char field, which was probably the case at one point.
Task-2671709
Part-of: odoo/odoo#78648
PURPOSE
Allow sales reps to add a closing note to their lead while it is being marked
as lost. This is currently already done by a lot of sales reps but manually
with the "Log a Note" button.
SPECIFICATIONS
In ``Lost Reason`` model: add a new html field allowing to log a note on the
lost leads. Below the m2o, add an Extra Comment field where users can add a
"closing note". When the wizard is submitted, log this message as a note on
selected records.
Add tests, allowing to test both the wizard and this new feature.
Task-2671709
Part-of: odoo/odoo#78648
Revert "[FIX] crm: allow regular salesman to convert and merge opportunities"
This reverts commit 24db93c0e6b88f89fdf03d63afee05fc858ed977.
Indeed adding a sudo at the end of merge process is a strange way to fix
an unexplained issue about "similar emails". CRM code has been cleaned
since v14+ and flows should not gain random sudo trying to solve an
undefined problem.
closesodoo/odoo#75385
X-original-commit: b4fa19376eb50bf07b5753b4664fcad4d637bcec
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
If an internal user does not belong to Sales / Administrator group, and wants
to convert a lead into an opportunity, he will face an access rights error if
another lead exists with the same email because we are trying to merge them.
We should allow him to convert and merge them without error.
closesodoo/odoo#75283
X-original-commit: 24db93c0e6b88f89fdf03d63afee05fc858ed977
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
Define `data-hotkey` on most used action buttons.
For the modals, the following keys are dedicated for "special"
actions:
- Alt+G: add
- Alt+V: save
- Alt+Z: cancel
closesodoo/odoo#73275
Taskid: 2588233
Related: odoo/enterprise#19464
Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit fixes the UserError message by properly displaying the
number of maximum leads that can be merged.
Apart from that, this commit also hides 'email_from' and 'phone' fields
on merge wizard to avoid scroll and to make sure that the 'x' icon is
always visible, which previously was far right and user had to scroll
a bit for removing the lines with that button.
TaskID-2542260
closesodoo/odoo#71523
X-original-commit: abbf3419767c149f338a4a48f15c2af7dfbed2bc
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Currently, across Odoo, there are around 40+ many2one fields defined with a
'selection' widget. Since the many2one widget has options to limit record
creation and opening, there is no reason to define a many2one field with a
selection widget. The selection widget does not allow for searching, and is
limited to 100 records.
PURPOSE
to update the definition of any many2one on which we applied a 'selection'
widget, and instead use the standard many2one widget with disabled
opening/creation instead.
after this commit,
for each many2one field defined with widget="selection", widget="selection" is
replaced with options="{'no_open': True, 'no_create': True}"
Task : 2476488
closesodoo/odoo#68387
Related: odoo/enterprise#17316
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
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#68618closesodoo/odoo#70254
X-original-commit: d75905f7acb1e7584d01792b4880fa76e6920d56
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Issue
- Create a partner with email 'aaa@test.com'
- In CRM settings, activate 'Leads' feature
- Go to CRM -> 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
X-original-commit: 6915d17f5f10737c03c820b69eded3a7c0151907
Right now there is a button in the CRM settings called 'Update Probabilities'.
When clicking on it probabilities of leads created after certain date
are updated. Problem with this flow is that user can click on the button by
mistake and there is no going back.
Moreover this does not trigger a save on settings and changes done by user
are not saved. This is standard behavior of config settings.
This commit improves the behavior by opening a wizard on click of the button
instead of directmy updating the probabilities. It allows users to change
fields used in PLS, change start date, or even cancel the update process.
Task ID-2355562
closesodoo/odoo#60733
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
GLOBAl PURPOSE
Ability to have salesmen belonging to several sales team is a core requirement
of CRM. It is therefore moved from website_crm_score to crm along with cleaning
and behavior improvement. Automatic lead assignment is also moved and cleaned.
SPECIFICATIONS
Compute default team id for sales related documents. Note that this method is
not called by default_get as it takes some additional parameters and is meant
to be called by other default methods. Heuristic (when multiple match: take
first sequence ordered)
1- any of my teams (member OR responsible) matching domain
2- any of my teams (member OR responsible)
3- default from context
4- any team matching my company and domain
5- any team matching my company
Note: ResPartner.team_id field is explicitly not taken into account. We think
this field causes a lot of noises compared to its added value. Think notably:
team not in responsible teams, team company not matching responsible or lead
company, asked domain not matching, ...
We also improve various places where sale team is computed on sales documents.
Purpose is to try to use same heuristic as much as possible in various
team_id fields.
LINKS
Task ID-2086889 (main task)
Task ID-2357969 (scoring migration task)
Community PR odoo/odoo#48422
Enterprise PR odoo/enterprise#499
Upgrade PR odoo/upgrade#996
PURPOSE
Prepare sales team membership and lead assignment improvements by
reorganizing and cleaning some code bits.
SPECIFICATIONS
Tools methods should be private by default to indicate those are not part of
official convert or merge API for leads. In this commit we make convert and
merge tool methods private, keeping only main API methods public.
LINKS
Task ID-2428882
Prepares Task ID-2086889
COM PR odoo/odoo#64196
ENT PT odoo/enterprise#15610
Purpose of the task, is to prevent users from inadvertently
creation/opening countries from country_id fields.
Countries should be managed from their dedicated menu item.
so in this commit, we have set both no_open and no_create to True
so user should not update and create a country from the many2X fields.
closesodoo/odoo#63773
Taskid: 2241677
Related: odoo/enterprise#15464
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Purpose of this commit is to avoid the use of sets in convert wizard. This set
is used to compute ids of leads to merge and to convert. Using a set make order
impossible to predict. Using lists allows to have reproducible tests notably.
Spotted when working on task ID-2086889
Problem
-------
Sales people can have restriction on partner they can see
Private addresses, multi company, ....
When they convert a lead to opportunity, it's currently possible
that the wizard will find and link a partner that the current user
cannot see.
Solution
--------
Field that are now computed store field, that were previously
normal field with onchange, should not be computed as sudo
to respect the record rule
closesodoo/odoo#59957
X-original-commit: 182fa38d7f28a92e7171c4ee3a42c8f73217b765
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Now, compute's methods are executed on default, which leads to a crash
when these methods try to use the actual records but there isn't one
yet (e.g. at the creation of a record).
- Fix the traceback raised when creating a lead because of the
visitor_page_count method when self.ids is empty on default compute.
- Since the default_get() and the first_onchange() are also now combined,
we need to adapt the syntax of the default get for the field opportunity_ids,
replacing the array of ids by the command syntax '[(6, 0, ids)]'.
task-2325629
X-original-commit: acbc97bfe290ef3c7b8f7a1160266e49485099ae
PURPOSE
Avoid automatic partner finding and update on lead to erase too much data.
RATIONALE
On crm.lead, the address fields, email_from and phone, are computed field
since saas-13.3 based on the partner_id. Previously they were synchronized
with an onchange on partner_id which was never triggered during automatic
flows on the lead.
Now computed field are triggered each time the partner_id is written.
Problems
- If someone uses the mass conversion with the action "Use existing partner
or create", the partner is found for each lead with the method
_find_matching_partner. This method can find any partner with a name that
contains the lead name, the lead contact_name or partner name. It can find
wrong partner. Previously, only the partner was changed and the contact
information remained on the lead. Now, all the information are erased with
the wrong partner information.
- If at creation all the address information are set and the partner_id
as well, the address field from the partner won't be synchronized.
The lead will end up with the address information we forced.
During the conversion to opportunity, the partner_id defined on the
lead, will be written again. It will trigger the synchronization
of the address field on the lead. Those info can be incomplete or wrong
You will end up with a data loss.
SPECIFICATIONS
Tell _find_matching_partner to match partner only based on exact email address
in the case of mass convert. Avoid fuzzy matching based on name likeliness.
During opportunity conversion, don't write the partner_id if the partner is
already the one set on the lead.
LINKS
Task ID-2316828
PR #55825
X-original-commit eed0a31e1e2c428c94dae4703c9575534a49ec1d
X-original-PR #55194closesodoo/odoo#55838
X-original-commit: e82b5a92f44709592b25fa66d9555d64abef1ec9
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Leave the generic management of fields default to the orm as much as
possible.
* Default method is not called unless necessary.
* Default values are correctly post-processed by the orm when necessary.
Purpose of this commit is to make use of toggle_active to implement business
behavior linked to active field being changed. In CRM notably
* when archiving: it is considered as lost, and therefore probability is
set to 0;
* when reactivating: void the lost reason and update probabilities for PLS;
In this commit we also update tracking subtype to more clearly track
lost / restored subtypes
* lost: writing a lost reason (resetting it is not lost), archiving
it if no other subtype;
* restored: activating it again;
Task ID 2170708
Community PR odoo/odoo#46563
activity_type_id is a related field on the first activity to do and should
probably not be reset / forced to a value. It is probably some code coming
from previous implementations of activities that were linked to crm only.
Coming notably from 87e457158e and 42226de46e .
Community PR odoo/odoo#48946closesodoo/odoo#48960
X-original-commit: de2e682824a636062fbb2c47b1bf5d7c7cef18db
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Currently there is two ways in view to have a phone number displayed in
LTR in a RTL language:
- have `widget="phone"` on a field
- have a class o_force_ltr on the field
But this is currently done very rarely and fail in list view because the
direction of data cells is used, eg.:
```
<div style="direction:rtl">
<table><tr><td style="direction:ltr">
<span>+1 2 3</span>
</td></tr><tr><td>
<span style="direction:ltr">+4 5 6</span>
</td>/tr></table>
</div>
```
will be displayed as:
+1 2 3
6 5 4+
In this commit, we use unicode-bidi* to optionally add an additional
level of embedding so direction is taken into account by the
bidirectional algorithm.
This commit also adds o_force_ltr class or phone widget on phone fields
where it is not already defined.
*: https://drafts.csswg.org/css-writing-modes-3/#propdef-unicode-bidi
opw-2224828
closes#48425closesodoo/odoo#48588
X-original-commit: ab067218e069f0a92610c3f0d4137e563e47755c
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
With this commit, Selection fields with `required=True` which are
extended via `selection_add` are given proper ondelete policies to
ensure the cleanup of records containing these extended options during
uninstall of the extending module.
This commit also cleans up leftover uninstall hooks that were being used
to handle the same set of problems prior to the ondelete mechanism being
implemented for Selection fields.
closesodoo/odoo#46325
Related: odoo/enterprise#9117
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
PURPOSE
Try to move from onchange / default_get to stored editable computed fields.
Behavior should be the same (computed or set by user), with support of
create / write / onchange field update without additional code.
SPECIFICATIONS
Update classic fields updated in some cases by onchange and/or default methods
by fields with store=True, readonly=False. It means their value comes either
from manual user input, either from trigger based computation.
Remove onchange and default_get when possible, leading to an unique computation
method and clearing fields definition.
Also clean some fields definition inconsistencies, notably required fields
that should instead be correctly computed or default that have no real meaning.
SPECIFIATIONS: CONSTRAINT USER_ID / TEAM_ID
In this commit we also remove all the better implementations of "not really a
constraint" constraint about user_id and team_id. Indeed as this is a computed
field normally we should not have to call the onchange manually, even through
a hackish call to a falsy constraint (see fdc8749, 222cca2, 4e8ebc7 ). You are
all inferior to SM team.
SPECIFIATIONS: DATE_OPEN
Assignment field, namely ``date_open``, has a random definition as it seems
linked to assignation, with several behaviors intended
* ce39ca8a97 : reset only when going from
no salesman to a salesman (aka, keep assignation when changing)
* 8e540558ee: reset when changing salesman
We choose to keep first implementation as it seems a bugfix broken again
by second commit. It will also replace the ``assign_date`` defined in
``website_crm_score`` module.
SIDE EFFECTS
Several side effects occur with this commit. Indeed behavior is not always
exactly the same, notably as code rewriting allowed to fix some issues,
incoherent behavior or was simply not able to achieve exactly the same
result. Notably
* at lead creation: default probability is the one coming from PLS and not
0.0 anymore, since field is already computed. Synchronization with PLS
still works the same way (change probability, you are out of syn);
* various user_id / team_id combinations notably in convert / merge wizards
may change, notably we do not reset team_id if user_id is reset. We
consider we could keep a team_id set without user_id;
LINKS
Task ID 2088565 (crm: from onchange to compute)
Upgrade PR odoo/upgrade#781
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Co-Authored-By: Florent Lejoly <fle@odoo.com>
SPECIFICATIONS
Improve heuristic used to find lead to convert duplicates
* check email_normalized instead of email_from, as it may contain formatted
emails. Normalized email are sanitized and normalized version of emails
and ease comparisons;
* use lead email if its customer has no email;
* if no email is available but a customer is set, use it anyway;
This notably reverts 2917b38f28 . Indeed no reason has been found why
this fix is necessary.
LINKS
Task ID 2088565 (crm: from onchange to compute)
SPECIFICATIONS 1: FORCE_ASSIGNATION
Move and rename force_assignation in convert wizard. Purpose is to move the
force_assignation field from mass convert wizard to its base convert wizard
used through _inherit. It allows to avoid relying on context propagation in
some methods. This field is also renamed as assignation as other meaning in
English.
SPECIFICATIONS 2: OPPORTUNITY_IDS
Improve search of duplicate by always ensuring duplicated are computed using
active_test. Also add the active_test on the field as otherwise computed
results are actually not visible to the user.
Generic opportunity_ids field is also renamed to better indicated it is used
to store duplicates and avoid thinking it holds data related to batch convert
or merge.
LINKS
Task ID 2088565 (crm: from onchange to compute)
Upgrade PR odoo/upgrade#781