Search 1.9 billion lines of Odoo code on GitHub

partner_duplicate_mgmt

Author: Savoir-faire Linux
License: LGPL-3
Branch: TA#47980
Repository: Numigi/odoo-partner-addons
Dependencies: account, base, base_view_inheritance_extension, contacts, crm, and mail
Languages: PO File (281, 15.4%), Python (1096, 60.2%), XML (364, 20.0%), and reStructuredText (81, 4.4%)
Other branches: 11.0, 12.0, 14.0, 40112, TA#46412---migration_modules_flex, TA#47980---partner_phone_validation, TA#48575, TA#50667, TA#50761, and jbreard-patch-1

<h1 class="title">Partner Duplicate Mgmt</h1> <p>This module improves the user experience for managing duplicate partners.</p> <a name="finding-duplicate-partners"></a> <h2>Finding duplicate partners</h2> <p>When a partner is created or his name changes, the system will automatically search partners with similar names.</p> <p>A smart button 'Duplicates' in the partner form view will appear if any potential duplicate is found. If you click on the button, the list of duplicates will appear.</p> <p>This list contains 3 columns</p> <table class="docutils"> <colgroup> <col width="4%" /> <col width="37%" /> <col width="41%" /> <col width="18%" /> </colgroup> <thead valign="bottom"> <tr><th class="head" rowspan="2">&nbsp;</th> <th class="head" rowspan="2">Partner 1</th> <th class="head" rowspan="2">Partner 2</th> <th class="head" rowspan="2">State</th> </tr> <tr></tr> </thead> <tbody valign="top"> <tr><td rowspan="2">[ ]</td> <td rowspan="2">Michelle Fletcher</td> <td rowspan="2">Agrolait, Michel Fletcher</td> <td rowspan="2">To Validate</td> </tr> <tr></tr> </tbody> </table> <p>Then, you may select your duplicate row and click on Action -&gt; Merge Partners.</p> <p>A wizard will appear, asking you which partner you would like to keep. Then, you may select the field values to keep from each partner.</p> <p>Preserved Partner: Agrolait, Michel Fletcher</p> <p>Partner 1: Michelle Fletcher Partner 2: Agrolait, Michel Fletcher</p> <table class="docutils"> <colgroup> <col width="16%" /> <col width="29%" /> <col width="11%" /> <col width="33%" /> <col width="11%" /> </colgroup> <thead valign="bottom"> <tr><th class="head" rowspan="2">Field</th> <th class="head" rowspan="2">Partner 1 Value</th> <th class="head" rowspan="2">Selected</th> <th class="head" rowspan="2">Partner 2 Value</th> <th class="head" rowspan="2">Selected</th> </tr> <tr></tr> </thead> <tbody valign="top"> <tr><td rowspan="2">Name</td> <td rowspan="2">Michelle Fletcher</td> <td rowspan="2">[x]</td> <td rowspan="2">Michel Fletcher</td> <td rowspan="2">[ ]</td> </tr> <tr></tr> <tr><td rowspan="2">Postal Code</td> <td rowspan="2">G1G 3J9</td> <td rowspan="2">[x]</td> <td rowspan="2">G1G 3J9</td> <td rowspan="2">[ ]</td> </tr> <tr></tr> <tr><td rowspan="2">Parent</td> <td rowspan="2">&nbsp;</td> <td rowspan="2">[ ]</td> <td rowspan="2">Agrolait</td> <td rowspan="2">[x]</td> </tr> <tr></tr> </tbody> </table> <p>Then, you must click on the button Merge Partners. The behavior will be the following:</p> <ul class="simple"> <li>The system will merge the origin partner into the preserved partner.</li> <li>The values of the preserved partner will be updated.</li> <li>User's actions are registred in the chatter</li> <li>The source partner will be set to inactive (instead of deleted).</li> </ul> <p>A new list view shows alls duplicates. The user can:</p> <ul class="simple"> <li>merge (like previous step),</li> <li>exclude the duplicate by choice</li> </ul> <a name="merging-partners"></a> <h2>Merging Partners</h2> <p>It is possible to merge partners that are either both companies or both contacts.</p> <a name="merging-contacts-with-account-moves"></a> <h2>Merging Contacts with Account Moves</h2> <p>To merge contacts that are linked to account moves, the user must be part of the group &quot;Contacts Merge With Account Moves&quot;, if not the merger won't be possible.</p> <a name="adjusting-the-list-of-fields"></a> <h2>Adjusting the list of fields</h2> <p>The list of fields that appear in the merge wizard is configurable from the menu Contacts -&gt; Duplicate Management -&gt; Partner Duplicate Fields.</p> <a name="adjusting-the-similarity-level"></a> <h2>Adjusting the similarity level</h2> <p>The similarity of two strings is computed using a trigram index. There are 3 levels of similarity:</p> <table class="docutils"> <colgroup> <col width="42%" /> <col width="28%" /> <col width="30%" /> </colgroup> <thead valign="bottom"> <tr><th class="head" rowspan="2">Name of the system parameter</th> <th class="head" rowspan="2">Default Value</th> <th class="head" rowspan="2">String length</th> </tr> <tr></tr> </thead> <tbody valign="top"> <tr><td rowspan="2">partner_name_similarity_1</td> <td rowspan="2">0.5</td> <td rowspan="2">Between 0 and 9</td> </tr> <tr></tr> <tr><td rowspan="2">partner_name_similarity_2</td> <td rowspan="2">0.6</td> <td rowspan="2">Between 10 and 17</td> </tr> <tr></tr> <tr><td rowspan="2">partner_name_similarity_3</td> <td rowspan="2">0.7</td> <td rowspan="2">More than 18</td> </tr> <tr></tr> </tbody> </table> <p>The level of similarity required so that 2 partners whose names length are less than 9 are considered duplicates is 0.5 by default. These values may be changed in system parameters.</p> <a name="dependencies"></a> <h2>Dependencies</h2> <p>The module uses trigrams to compare names of partners. The postgresql extension pg_trgm is required for this purpose. If your Odoo user is not superuser on the database (which is mostlikely the case in production), the module might not install properly.</p> <p>In order to install the extension, you may log in to your database as superuser and run:</p> <p>&gt; CREATE EXTENSION pg_trgm</p> <a name="roadmap"></a> <h2>Roadmap</h2> <p>This module is financed and answered to customer needs.</p> <ul class="simple"> <li>Add parameters in the user's interface to set the field wanted in comparison</li> </ul> <a name="contributors"></a> <h2>Contributors</h2> <ul class="simple"> <li>Numigi (tm) and all its contributors (<a class="reference external" href="https://bit.ly/numigiens">https://bit.ly/numigiens</a>)</li> <li>Yasmine El Mrini (<a class="reference external" href="mailto:yasmine.elmrini&#64;savoirfairelinux.com">yasmine.elmrini&#64;savoirfairelinux.com</a>)</li> </ul> <a name="more-information"></a> <h2>More information</h2> <ul class="simple"> <li>Meet us at <a class="reference external" href="https://bit.ly/numigi-com">https://bit.ly/numigi-com</a></li> </ul>