Author: |
Savoir-faire Linux |
License: |
LGPL-3 |
Branch: |
40112 |
Repository: |
Numigi/odoo-partner-addons |
Dependencies: |
base,
and
base_view_inheritance_extension |
Languages: |
PO File (69, 15.6%),
Python (216, 49.0%),
XML (107, 24.3%),
and
reStructuredText (49, 11.1%) |
Other branches: |
11.0,
12.0,
14.0,
TA#46412---migration_modules_flex,
TA#47980,
TA#47980---partner_phone_validation,
TA#48575,
TA#50667,
TA#50761,
and
jbreard-patch-1 |
<h1 class="title">Partner Change Parent</h1>
<div class="contents topic" id="table-of-contents">
<p class="topic-title">Table of Contents</p>
<ul class="simple">
<li><a class="reference internal" href="#summary" id="id1">Summary</a></li>
<li><a class="reference internal" href="#usage" id="id2">Usage</a></li>
<li><a class="reference internal" href="#correction-of-the-parent-company" id="id3">Correction Of The Parent Company</a></li>
<li><a class="reference internal" href="#how-the-module-works" id="id4">How the module works</a></li>
<li><a class="reference internal" href="#portal-users" id="id5">Portal Users</a></li>
<li><a class="reference internal" href="#contributors" id="id6">Contributors</a></li>
<li><a class="reference internal" href="#more-information" id="id7">More information</a></li>
</ul>
</div>
<a name="summary"></a>
<h2><a class="toc-backref" href="#id1">Summary</a></h2>
<p>This module adds a button in the partner form view for changing the parent entity of a contact.</p>
<p>Changing a parent entity is a complex operation. The contact may not be merely reassigned
to a different entity, because all documents created under the previous entity will follow
the contact under the next entity.</p>
<p>For example, customer invoices emited in regard to a given entity must not be reassigned to another entity.</p>
<a name="usage"></a>
<h2><a class="toc-backref" href="#id2">Usage</a></h2>
<p>I go to the form view of a contact.</p>
<p>I notice that I the parent entity is readonly.</p>
<img alt="static/description/contact_parent_readonly.png" src="static/description/contact_parent_readonly.png" />
<p>I also notice a new button <code>Change Parent Entity</code>.</p>
<img alt="static/description/contact_change_parent_button.png" src="static/description/contact_change_parent_button.png" />
<p>I click on the button. A wizard is opened, asking me to select a new parent for the contact.</p>
<img alt="static/description/change_parent_wizard.png" src="static/description/change_parent_wizard.png" />
<p>I select a new parent, then I click on <code>Validate</code></p>
<img alt="static/description/change_parent_wizard_validate.png" src="static/description/change_parent_wizard_validate.png" />
<p>The form view of a copy of my contact is opened. This contact has the new parent entity.</p>
<img alt="static/description/new_contact_form.png" src="static/description/new_contact_form.png" />
<p>Using the breadcrumb, I can go back to the original contact.</p>
<img alt="static/description/new_contact_breadcrumb.png" src="static/description/new_contact_breadcrumb.png" />
<p>I notice that the original contact is archived.</p>
<img alt="static/description/old_contact_form.png" src="static/description/old_contact_form.png" />
<a name="correction-of-the-parent-company"></a>
<h2><a class="toc-backref" href="#id3">Correction Of The Parent Company</a></h2>
<p>Since version <code>1.1.0</code> of the module, a new checkbox appears on the wizard.</p>
<img alt="static/description/wizard_correction_checkbox.png" src="static/description/wizard_correction_checkbox.png" />
<p>When the box is checked, instead of archiving the contact and creating a new contact,
the company is directly changed on the contact.</p>
<p>By default, the box is checked.</p>
<p>If you uncheck the box, a warning message is displayed.</p>
<img alt="static/description/wizard_correction_warning.png" src="static/description/wizard_correction_warning.png" />
<p>Most time, when the company needs to be changed on a contact, it is because the company was wrongly filled.
The cases where a contact moves to another company are less frequent.</p>
<p>This mecanism was instored to prevent polluting the database with multiple
duplicates of the same contact.</p>
<a name="how-the-module-works"></a>
<h2><a class="toc-backref" href="#id4">How the module works</a></h2>
<p>The following procedure is applied for changing a contact from an entity to another.</p>
<ul class="simple">
<li>The contact is copied.</li>
<li>The copy is placed under the destination entity.</li>
<li>The old contact is archived.</li>
</ul>
<a name="portal-users"></a>
<h2><a class="toc-backref" href="#id5">Portal Users</a></h2>
<p>If the partner is bound to an active portal user, when changing the parent entity,
a blocking message will be raised.</p>
<img alt="static/description/portal_user_error_message.png" src="static/description/portal_user_error_message.png" />
<p>Before changing the parent, you must go to the form view of the portal user and archive this user.</p>
<img alt="static/description/portal_user_archive.png" src="static/description/portal_user_archive.png" />
<a name="contributors"></a>
<h2><a class="toc-backref" href="#id6">Contributors</a></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>Agathe Mollé (<a class="reference external" href="mailto:agathe.molle@savoirfairelinux.com">agathe.molle@savoirfairelinux.com</a>)</li>
<li>Guillaume Lot</li>
</ul>
<a name="more-information"></a>
<h2><a class="toc-backref" href="#id7">More information</a></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>