Commit da326616 authored by Boxiang Sun's avatar Boxiang Sun

erp5_user_tutorial: Update user-Howto.Link.Persons.and.Organisations

parent 74904b5c
<section class="master">
<h1>How to Link People to Organisations</h1>
<img type="image/svg+xml" src="http://img.erp5.cn/user-Howto.Link.People.To.Organisations.Front.Page.John.Scott.Doh.Z.Company?format=png" alt="The photo of John Scott Doe and Z Commpany" title="Link people to organisations : John Scott Doe and Z Company">
<footer>
by <a href="http://www.osoe-project.org/contact">OSOE Team</a>.
</footer>
<details open="open">
<p>In this tutorial you will learn how to link people and organisations. You might have noticed in the previous tutorials that persons and organisations are very important in ERP5, because they are the core of your business.</p><p>We have already showed you how to link people to his/her organisation through the person creation process, but now we will examine some of the details in depth to show you how to link a person to an existing organisation or to a new organisation. As we have used the VIFIB example to create a person and an organisation in the previous two tutorials, now we will continue using those two entities to explain how to link them together.</p>
</details>
<test>
<table class="test" style="display: none;">
<tbody>
<tr style="opacity: 1;">
<td colspan="3">&lt;span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/init_test_environment"&gt;init&lt;/span&gt;</td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/Zuite_setUpPersonAndOrganisationLinkingTest</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Init Ok</td>
<td></td>
</tr>
<tr style="opacity: 1;">
<td colspan="3">&lt;span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"&gt; Wait for activities &lt;/span&gt;</td>
</tr>
<tr style="opacity: 1;">
<td colspan="3">&lt;span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_functional_test_user"&gt;Login As Functional Test User&lt;/span&gt;</td>
</tr>
</tbody>
</table>
</test>
</section><section>
<h1>Agenda</h1>
<ul>
<li>How to link a person to an existing organisation</li>
<li>How to link a person to a new organisation</li>
</ul>
<test>
<table class="test" style="display: none;">
<tbody></tbody>
</table>
</test>
</section><section class="illustration">
<h1>Example</h1>
<img title="Link people to organisations example: John Scott Doh and Z Company" alt="Link people to organisations example: John Scott Doh and Z Company" type="image/svg+xml" src="http://img.erp5.cn/user-Howto.Link.People.To.Organisations.Example.John.Scott.Doh.Z.Company?format=png">
<details open="open">
<p>We have already created a person and an organisation in the first two tutorials. Now, we are going to use those two entities to explain how to link them together.</p>
</details>
<test>
<table class="test" style="display: none;">
<tbody></tbody>
</table>
</test>
</section><section class="screenshot">
<h1>Linking to an existing organisation</h1>
<img alt="Link people to exisiting organization in ERP5: Z Company" src="http://img.erp5.cn/user-Howto.Link.People.To.Existing.Organisations.Z.Company?format=png" type="image/svg+xml" title="Link people to exisiting organization in ERP5: Z Company">
<p>
Already created in ERP5: <span style="color: green;">YES</span>
</p><details open="open">
<p>The easiest way to link a person to an organisation, is to create the organisation first. Once the organisation is created, you can link people to it by browsing the person's details and set the relationship with the existing organisation. As described in the previous tutorial, Z Company has already been created in ERP5, (see Tutorial "How to create Organisations"), we'll follow the organisation creation process to explain how to link a person to an existing organisation in ERP5.</p>
</details>
<test>
<table class="test" style="display: none;">
<tbody></tbody>
</table>
</test>
</section><section class="screenshot">
<h1>Go to the person's page (1) From ERP5 home menu</h1>
<img title="Browse the 'Persons' database to reach the person's page" type="image/svg+xml" src="http://img.erp5.cn/user-Howto.Add.People.Check.Creation.Browse.Persons.Base.Screenshot?format=png" alt="Browse the 'Persons' database to reach the person's page">
<details open="open">
<p>First, you need to go to the page of the person you want to link to the existing organisation. You can find this page through the "Browser" option from the home menu, or by clicking on “persons” in the “ERP5 modules” item list.</p><p>Click on “ERP5” on the bread crumb =&gt; Click on the “browse” tab =&gt; Click on "Persons"</p>
</details>
<test>
<table class="test" style="display: none;">
<tbody></tbody>
</table>
</test>
</section><section class="screenshot">
<h1>Go to the person's page (1) From the “ERP5 Modules” item list</h1>
<img type="image/svg+xml" src="http://img.erp5.cn/user-Howto.Link.People.To.Existing.Organisations.Reach.Persons.Page.ERP5.Modules?format=png" alt="Open the ERP5 Modules list to reach the person's page" title="Open the ERP5 Modules list to reach the person's page">
<details open="open">
<p>Open the “ERP5 Modules” item list =&gt; Click on "Persons"</p><p>Both ways will open the stored person list of ERP5.</p>
</details>
<test>
<table class="test" style="display: none;">
<tbody>
<tr>
<td>open</td>
<td>${base_url}/view</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>//select[@name="select_module"]</td>
<td>Persons</td>
</tr>
</tbody>
</table>
</test>
</section><section class="screenshot">
<h1>Go to the person's page (2)</h1>
<img type="image/svg+xml" title="Click on person's line to reach person's page" src="http://img.erp5.cn/user-Howto.Link.People.To.Existing.Organisations.Persons.Line?format=png" alt="Click on person's line to reach person's page">
<details open="open">
<p>Click on the line with person´s name, who's details you wish to browse.</p><p>In our case, simply click on the line “John Doe”. Then you will reach the page of John Doe.If you don't see that line, please search for the person by typing "%John Doe%" in the tab "Usual Name" (You can use Fuzzy Enquiry method in ERP5 base data list page to search for any information you need). After you press the enter button, the line of John Doe will appear if you have created the person correctly according to the previous tutorial "How to create Persons"</p>
</details>
<test>
<table class="test" style="display: none;">
<tbody>
<tr style="opacity: 1;">
<td colspan="3">&lt;tal:block tal:content="structure python: here.Zuite_generateListboxBrowsing(listbox_selection=(['title', here.Zuite_getHowToInfo()['link_howto_person_title']],), enter_object=True)"/&gt;</td>
</tr>
<tr>
<td>assertValue</td>
<td>//input[@name="field_my_first_name"]</td>
<td>ZUITE-TEST-LINK</td>
</tr>
<tr>
<td>assertValue</td>
<td>//input[@name="field_my_last_name"]</td>
<td>USER-001</td>
</tr>
<tr>
<td>storeLocation</td>
<td>person</td>
<td></td>
</tr>
</tbody>
</table>
</test>
</section><section class="screenshot">
<h1>Click on the "wheel"</h1>
<img type="image/svg+xml" title="Set relation: Click on the 'wheel'" src="http://img.erp5.cn/user-Howto.Link.People.To.Existing.Organisations.Set.Relation.Click.Wheel?format=png" alt="Set relation: Click on the 'wheel'">
<details open="open">
<p>Now you should have landed on John Doh's View page, from which we are going to set a relation between him and his company "Z Company", which we already created in the previous tutorial.</p><p>Just next to the “organisation” field, you can see a wheel. This is the tool in ERP5 which allows you to set relations between different items. Here you use the wheel to link a person to an organisation that has been previously created in ERP5. So just click on this wheel, then it will open a list of all existing organisations.In our example, we want to link John Doe to Z Company, we have opened the page of John Doe, now after we click on the wheel, we can see the different existing organisations (as shown in the following screenshot), and then choose Z Company that John Doe should be linked to.</p>
</details>
<test>
<table class="test" style="display: none;">
<tbody>
<tr>
<td>clickAndWait</td>
<td>//input[@name="portal_selections/viewSearchRelatedDocumentDialog0:method"]</td>
<td></td>
</tr>
</tbody>
</table>
</test>
</section><section class="screenshot">
<h1>Choose the organisation and set the relation</h1>
<img type="image/svg+xml" src="http://img.erp5.cn/user-Howto.Link.People.To.Existing.Organisations.Set.Relation.Choose.Existing.Organisation?format=png" alt="Set relation: choose the existing organisation" title="Set relation: choose the existing organisation">
<details open="open">
<p>Here are three points you need to pay attention to in this step</p><p>
<strong>(1)Choose the appropriate organisation:</strong>
<br>
Once the list of organisations is open, select the organisation you want to link the person with by checking the box on the left of the screen, in front of the appropriate organisation name.
</p><p>In our example, we want to link John Doe to Z Company, so we check the box on the left of Z Company, as you can see in the screenshot.</p><p>
<strong>(2)Set relation:</strong>
<br>
When the appropriate box is checked, click the “set relation” button. This will link the person to the selected organisation, and lead you back to the person's details and save the data.
</p><p>In our example, when the box next to Z Company has been checked, we can press the "set relation" button, which will link John Doe to Z Organisation, leading us back to John's page, and saving the operation.</p><p>
<strong>(3)Check the "plane" icon:</strong>
<br>
After you have set the relation, the "wheel" icon will change to a "plane" icon (as you can see in the following screenshot), which meens that you have set a relation between two items in ERP5, and this "plane" icon can lead you to the related subject. In our example, once the "wheel" turns into the "plane", John Doe is linked to Z Company, and then you can check the relation by clicking on the "plane" to go to the page of Z Company.
</p>
</details>
<test>
<table class="test" style="display: none;">
<tbody>
<tr>
<td>type</td>
<td>listbox_title</td>
<td>ZUITE-TEST-LINK-ORGANISATION-001</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>dialog_update_button</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@id="dialog_submit_button"]</td>
<td>ZUITE-TEST-LINK-ORGANISATION-001</td>
</tr>
<tr>
<td>assertValue</td>
<td>//input[@name="field_my_career_subordination_title"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@name="portal_selections/viewSearchRelatedDocumentDialog0:method"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>listbox_title</td>
<td>ZUITE-TEST-LINK-ORGANISATION-001</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>dialog_update_button</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[text()='ZUITE-TEST-LINK-ORGANISATION-001']/../../td[1]/input</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@id="dialog_submit_button"]</td>
<td></td>
</tr>
<tr>
<td>verifyText</td>
<td>//div[@id="transition_message"]</td>
<td>Data updated.</td>
</tr>
</tbody>
</table>
</test>
</section><section class="screenshot">
<h1>Check the relation (1)</h1>
<img type="image/svg+xml" src="http://img.erp5.cn/user-Howto.Link.People.To.Existing.Organisations.Check.Relation.1.Click.Plane?format=png" title="Check relation: Click on the 'plane'" alt="Check relation: Click on the 'plane'">
<details open="open">
<p>Now that the relation is set, we will check that the operation worked correctly. To do this, go to the appropriate organisation's page, and make sure that the person is related to it.</p><p>To go to the organisation's page, you can either use one of the methods you learned in the previous tutorials (eg, browse the base data in the ERP5 home page, or use the “ERP5 Modules” item list on top of the page), or use this new method - the "plane"</p>
<p>In our example, now that we have set the relation between John Doe and Z Company, on John Doe's page, we can click on the “plane” icon next to his organisation Z Company, which opens the view page of Z Company.</p>
</details>
<test>
<table class="test" style="display: none;">
<tbody>
<tr>
<td>assertValue</td>
<td>//input[@name="field_my_career_subordination_title"]</td>
<td>ZUITE-TEST-LINK-ORGANISATION-001</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@name="field_my_career_subordination_title"]/following-sibling::*[2]</td>
<td></td>
</tr>
<tr>
<td>assertValue</td>
<td>//input[@name="field_my_title"]</td>
<td>ZUITE-TEST-LINK-ORGANISATION-001</td>
</tr>
</tbody>
</table>
</test>
</section><section class="screenshot">
<h1>Check the relation (2)</h1>
<img type="image/svg+xml" src="http://img.erp5.cn/Howto.Link.People.To.Existing.Organisations.Check.Relation.2.Check.Person.Line?format=png" title="Check relation: Check the person's line" alt="Check relation: Check the person's line">
<details open="open">
<p>
<strong>2. Check on the linked person's information line.</strong>
</p><p>Check on the bottom of the organisation's page you have just reached and then click on the line of the appropriate person who has been linked to it. In our example, on the bottom of the page of Z Company, we can see the line “John Doe”with his basic information. This line confirms that John Doe has been linked to his company Z Company, as a Marketing Manager.</p>
</details>
<test>
<table class="test" style="display: none;">
<tbody>
<tr style="opacity: 1; z-index: 0;" class="">
<td>storeLocation</td>
<td>organisation</td>
<td></td>
</tr>
<tr>
<td colspan="3">&lt;span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"&gt; Wait for activities &lt;/span&gt;</td>
</tr>
<tr>
<td>openAndWait</td>
<td>${organisation}</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=ZUITE-TEST-LINK</td>
<td></td>
</tr>
<tr style="opacity: 1; z-index: 0;" class="">
<td>assertValue</td>
<td>//input[@name="field_my_first_name"]</td>
<td>ZUITE-TEST-LINK</td>
</tr>
</tbody>
</table>
</test>
</section><section class="screenshot">
<h1>Linking to a new organisation</h1>
<img alt="Link people to new organization Y Company" src="http://img.erp5.cn/user-Howto.Link.People.To.New.Organisation?format=png" type="image/svg+xml" title="Link people to new organization Y Company">
<p>
Already created in ERP5: <span style="color: red;">No</span>
</p><details open="open">
<p>ERP5 allows you to create a new organisation directly from a person's View page, in this way you can link a person to the organisation directly.</p><p>Now let's see a new example: Lei XU is working for the Y Company. First, create the person, just like you learned to create a new person in the tutorial "How to create Persons". Now let's see how can we link him directly to the new company.</p>
</details>
<test>
<table class="test" style="display: none;">
<tbody></tbody>
</table>
</test>
</section><section class="screenshot">
<h1>Go to the person's page</h1>
<img type="image/svg+xml" src="http://img.erp5.cn/user-Howto.Link.People.To.New.Organisations.Go.To.Persons.Page?format=png" alt="Set relation: go to person's page" title="Set relation: go to person's page">
<details open="open">
<p>First you need to search the person you want to link to the organisation, using the Biew page.</p>
</details>
<test>
<table class="test" style="display: none;">
<tbody>
<tr style="opacity: 1; z-index: 0;" class="">
<td>openAndWait</td>
<td>${person}</td>
<td></td>
</tr>
</tbody>
</table>
</test>
</section><section class="screenshot">
<h1>Type the organisation's name</h1>
<img type="image/svg+xml" src="http://img.erp5.cn/user-Howto.Link.People.To.New.Organisations.Type.Organisations.Name.And.Save?format=png" alt="Set relation: type new organisation's name and save" title="Set relation: type new organisation's name and save">
<details open="open">
<p>Once Lei XU is created, just type the name of his/her organisation in the “organisation” field. When you are ready, click the save button on the right of the screen.</p>
</details>
<test>
<table class="test" style="display: none;">
<tbody>
<tr style="opacity: 1; z-index: 0;" class="">
<td>type</td>
<td>//input[@name="field_my_career_subordination_title"]</td>
<td>ZUITE-TEST-LINK-ORGANISATION-002</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@name="Base_edit:method"]</td>
<td></td>
</tr>
<tr>
<td>verifyText</td>
<td>//div[@id="information_area"]</td>
<td>Input data has errors. Please look at the error messages below.</td>
</tr>
<tr>
<td>verifyText</td>
<td>//span[@class="error"]</td>
<td>No such document was found.</td>
</tr>
</tbody>
</table>
</test>
</section><section class="screenshot">
<h1>Add organisation</h1>
<img type="image/svg+xml" src="http://img.erp5.cn/user-Howto.Link.People.To.New.Organisations.Add.Organisations?format=png" alt="Set relation: add new organisation" title="Set relation: add new organisation">
<details open="open">
<p>
ERP5 will alert you that the organisation that you try to link your person to does not exist, but offers you to create it. If you accept, the related organisation will be created, and the person will be directly linked to it.
<br>
To do this, first browse the item menu circled in red, then click on “add organisation”. This will create the organisation and save the operation automatically.
</p><p>You can now check that everything worked fine by going to the related organisation's page. To do this, you can use one of the methods you learned in the first tutorials, or simply click on the "plane" icon next to the "organisation” field. This will lead you to the related organisation's page (as described in the first part of this tutorial).</p>
</details>
<test>
<table class="test" style="display: none;">
<tbody>
<tr style="opacity: 1; z-index: 0;" class="">
<td>select</td>
<td>//select[@name="subfield_field_my_career_subordination_title_relation"]</td>
<td>Add Organisation</td>
</tr>
<tr style="opacity: 1; z-index: 0;" class="">
<td>clickAndWait</td>
<td>//button[@name="Base_edit:method"]</td>
<td></td>
</tr>
<tr style="opacity: 1; z-index: 0;" class="">
<td>verifyTextNotPresent</td>
<td>Input data has errors. Please look at the error messages below.</td>
<td></td>
</tr>
<tr style="opacity: 1; z-index: 0;" class="">
<td colspan="3">&lt;span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"&gt; Wait for activities &lt;/span&gt;</td>
</tr>
<tr style="opacity: 1;">
<td colspan="3">&lt;span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_manager"&gt;Login As Manager&lt;/span&gt;</td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/Zuite_tearDownPersonAndOrganisationLinkingTest</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Clean Ok</td>
<td></td>
</tr>
<tr style="opacity: 1;">
<td colspan="3">&lt;span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"&gt; Wait for activities &lt;/span&gt;</td>
</tr>
</tbody>
</table>
</test>
</section>
\ No newline at end of file
<section class="master">
<h1>How to Link People to Organisations</h1>
<img alt="The photo of John Scott Doe and Z Commpany" src="http://img.erp5.cn/user-Howto.Link.People.To.Organisations.Front.Page.John.Scott.Doh.Z.Company?format=png" title="Link people to organisations : John Scott Doe and Z Company" type="image/svg+xml" />
<footer>by <a href="http://www.osoe-project.org/contact">OSOE Team</a>.</footer>
<details open="open">
<p>In this tutorial you will learn how to link people and organisations. You might have noticed in the previous tutorials that persons and organisations are very important in ERP5, because they are the core of your business.</p>
<p>We have already showed you how to link people to his/her organisation through the person creation process, but now we will examine some of the details in depth to show you how to link a person to an existing organisation or to a new organisation. As we have used the VIFIB example to create a person and an organisation in the previous two tutorials, now we will continue using those two entities to explain how to link them together.</p>
</details>
<test>
<table class="test" style="display: none;">
<tbody>
<tr style="opacity: 1;">
<td colspan="3">&lt;span metal:use-macro=&quot;container/Zuite_viewTestMacroLibrary/macros/init_test_environment&quot;&gt;init&lt;/span&gt;</td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/Zuite_setUpPersonAndOrganisationLinkingTest</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Init Ok</td>
<td>&nbsp;</td>
</tr>
<tr style="opacity: 1;">
<td colspan="3">&lt;span metal:use-macro=&quot;container/Zuite_viewTestMacroLibrary/macros/wait_for_activities&quot;&gt; Wait for activities &lt;/span&gt;</td>
</tr>
<tr style="opacity: 1;">
<td colspan="3">&lt;span metal:use-macro=&quot;container/Zuite_viewTestMacroLibrary/macros/login_as_functional_test_user&quot;&gt;Login As Functional Test User&lt;/span&gt;</td>
</tr>
</tbody>
</table>
</test></section>
<section>
<h1>Agenda</h1>
<ul>
<li>How to link a person to an existing organisation</li>
<li>How to link a person to a new organisation</li>
</ul>
<test>
<table class="test" style="display: none;">
<tbody>
</tbody>
</table>
</test></section>
<section class="illustration">
<h1>Example</h1>
<img alt="Link people to organisations example: John Scott Doh and Z Company" src="http://img.erp5.cn/user-Howto.Link.People.To.Organisations.Example.John.Scott.Doh.Z.Company?format=png" title="Link people to organisations example: John Scott Doh and Z Company" type="image/svg+xml" />
<details open="open">
<p>We have already created a person and an organisation in the first two tutorials. Now, we are going to use those two entities to explain how to link them together.</p>
</details>
<test>
<table class="test" style="display: none;">
<tbody>
</tbody>
</table>
</test></section>
<section class="screenshot">
<h1>Linking to an existing organisation</h1>
<img alt="Link people to exisiting organization in ERP5: Z Company" src="http://img.erp5.cn/user-Howto.Link.People.To.Existing.Organisations.Z.Company?format=png" title="Link people to exisiting organization in ERP5: Z Company" type="image/svg+xml" />
<p>Already created in ERP5: <span style="color: green;">YES</span></p>
<details open="open">
<p>The easiest way to link a person to an organisation, is to create the organisation first. Once the organisation is created, you can link people to it by browsing the person&#39;s details and set the relationship with the existing organisation. As described in the previous tutorial, Z Company has already been created in ERP5, (see Tutorial &quot;How to create Organisations&quot;), we&#39;ll follow the organisation creation process to explain how to link a person to an existing organisation in ERP5.</p>
</details>
<test>
<table class="test" style="display: none;">
<tbody>
</tbody>
</table>
</test></section>
<section class="screenshot">
<h1>Go to the person&#39;s page (1) From ERP5 home menu</h1>
<img alt="Browse the 'Persons' database to reach the person's page" src="http://img.erp5.cn/user-Howto.Add.People.Check.Creation.Browse.Persons.Base.Screenshot?format=png" title="Browse the 'Persons' database to reach the person's page" type="image/svg+xml" />
<details open="open">
<p>First, you need to go to the page of the person you want to link to the existing organisation. You can find this page through the &quot;Browser&quot; option from the home menu, or by clicking on &ldquo;persons&rdquo; in the &ldquo;ERP5 modules&rdquo; item list.</p>
<p>Click on &ldquo;ERP5&rdquo; on the bread crumb =&gt; Click on the &ldquo;browse&rdquo; tab =&gt; Click on &quot;Persons&quot;</p>
</details>
<test>
<table class="test" style="display: none;">
<tbody>
</tbody>
</table>
</test></section>
<section class="screenshot">
<h1>Go to the person&#39;s page (1) From the &ldquo;ERP5 Modules&rdquo; item list</h1>
<img alt="Open the ERP5 Modules list to reach the person's page" src="http://img.erp5.cn/user-Howto.Link.People.To.Existing.Organisations.Reach.Persons.Page.ERP5.Modules?format=png" title="Open the ERP5 Modules list to reach the person's page" type="image/svg+xml" />
<details open="open">
<p>Open the &ldquo;ERP5 Modules&rdquo; item list =&gt; Click on &quot;Persons&quot;</p>
<p>Both ways will open the stored person list of ERP5.</p>
</details>
<test>
<table class="test" style="display: none;">
<tbody>
<tr>
<td colspan="3">&lt;tal:block tal:define=&quot;click_configuration python: {&#39;text&#39;: &#39;Modules&#39;}&quot;&gt; &lt;tal:block metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link&quot; /&gt; &lt;/tal:block&gt;</td>
</tr>
<tr>
<td colspan="3">&lt;tal:block metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded&quot;&gt; &lt;/tal:block&gt;</td>
</tr>
<tr>
<td colspan="3">&lt;tal:block tal:define=&quot;click_configuration python: {&#39;text&#39;: &#39;Persons&#39;}&quot;&gt; &lt;tal:block metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link&quot;&gt; &lt;/tal:block&gt; &lt;/tal:block&gt;</td>
</tr>
<tr>
<td colspan="3">&lt;tal:block metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded&quot;&gt;&lt;/tal:block&gt;</td>
</tr>
<tr>
<td colspan="3">&lt;tal:block metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded&quot; /&gt;</td>
</tr>
</tbody>
</table>
</test></section>
<section class="screenshot">
<h1>Go to the person&#39;s page (2)</h1>
<img alt="Click on person's line to reach person's page" src="http://img.erp5.cn/user-Howto.Link.People.To.Existing.Organisations.Persons.Line?format=png" title="Click on person's line to reach person's page" type="image/svg+xml" />
<details open="open">
<p>Click on the line with person&acute;s name, who&#39;s details you wish to browse.</p>
<p>In our case, simply click on the line &ldquo;John Doe&rdquo;. Then you will reach the page of John Doe.If you don&#39;t see that line, please search for the person by typing &quot;%John Doe%&quot; in the tab &quot;Usual Name&quot; (You can use Fuzzy Enquiry method in ERP5 base data list page to search for any information you need). After you press the enter button, the line of John Doe will appear if you have created the person correctly according to the previous tutorial &quot;How to create Persons&quot;</p>
</details>
<test>
<table class="test" style="display: none;">
<tbody>
<tr>
<td>click</td>
<td>//a[text()=&quot;ZUITE-TEST-LINK USER-001&quot;]</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="3">&lt;tal:block metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded&quot;&gt; &lt;/tal:block&gt;</td>
</tr>
<tr>
<td>click</td>
<td>//input[@name=&quot;editable&quot;]</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="3">&lt;tal:block metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded&quot;&gt; &lt;/tal:block&gt;</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name=&quot;field_my_first_name&quot;]</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>assertValue</td>
<td>//input[@name=&quot;field_my_last_name&quot;]</td>
<td>USER-001</td>
</tr>
<tr>
<td>storeLocation</td>
<td>person</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="3">&lt;span metal:use-macro=&quot;container/Zuite_viewTestMacroLibrary/macros/wait_for_activities&quot;&gt; Wait for activities &lt;/span&gt;</td>
</tr>
</tbody>
</table>
</test></section>
<section class="screenshot">
<h1>Click on the &quot;wheel&quot;</h1>
<img alt="Set relation: Click on the 'wheel'" src="http://img.erp5.cn/user-Howto.Link.People.To.Existing.Organisations.Set.Relation.Click.Wheel?format=png" title="Set relation: Click on the 'wheel'" type="image/svg+xml" />
<details open="open">
<p>Now you should have landed on John Doh&#39;s View page, from which we are going to set a relation between him and his company &quot;Z Company&quot;, which we already created in the previous tutorial.</p>
<p>Just next to the &ldquo;organisation&rdquo; field, you can see a wheel. This is the tool in ERP5 which allows you to set relations between different items. Here you use the wheel to link a person to an organisation that has been previously created in ERP5. So just click on this wheel, then it will open a list of all existing organisations.In our example, we want to link John Doe to Z Company, we have opened the page of John Doe, now after we click on the wheel, we can see the different existing organisations (as shown in the following screenshot), and then choose Z Company that John Doe should be linked to.</p>
</details>
<test>
<table class="test" style="display: none;">
<tbody>
<tr>
<td>open</td>
<td>${person}</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="3">&lt;tal:block metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded&quot;&gt; &lt;/tal:block&gt;</td>
</tr>
<tr>
<td>click</td>
<td>//div[@class=&quot;relation-input ui-input-text&quot;]/button</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="3">&lt;tal:block metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded&quot;&gt; &lt;/tal:block&gt;</td>
</tr>
<tr>
<td colspan="3">&lt;tal:block metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded&quot; /&gt;</td>
</tr>
</tbody>
</table>
</test></section>
<section class="screenshot">
<h1>Choose the organisation and set the relation</h1>
<img alt="Set relation: choose the existing organisation" src="http://img.erp5.cn/user-Howto.Link.People.To.Existing.Organisations.Set.Relation.Choose.Existing.Organisation?format=png" title="Set relation: choose the existing organisation" type="image/svg+xml" />
<details open="open">
<p>Here are three points you need to pay attention to in this step</p>
<p><strong>(1)Choose the appropriate organisation:</strong><br />
Once the list of organisations is open, select the organisation you want to link the person with by checking the box on the left of the screen, in front of the appropriate organisation name.</p>
<p>In our example, we want to link John Doe to Z Company, so we check the box on the left of Z Company, as you can see in the screenshot.</p>
<p><strong>(2)Set relation:</strong><br />
When the appropriate box is checked, click the &ldquo;set relation&rdquo; button. This will link the person to the selected organisation, and lead you back to the person&#39;s details and save the data.</p>
<p>In our example, when the box next to Z Company has been checked, we can press the &quot;set relation&quot; button, which will link John Doe to Z Organisation, leading us back to John&#39;s page, and saving the operation.</p>
<p><strong>(3)Check the &quot;plane&quot; icon:</strong><br />
After you have set the relation, the &quot;wheel&quot; icon will change to a &quot;plane&quot; icon (as you can see in the following screenshot), which meens that you have set a relation between two items in ERP5, and this &quot;plane&quot; icon can lead you to the related subject. In our example, once the &quot;wheel&quot; turns into the &quot;plane&quot;, John Doe is linked to Z Company, and then you can check the relation by clicking on the &quot;plane&quot; to go to the page of Z Company.</p>
</details>
<test>
<table class="test" style="display: none;">
<tbody>
<tr>
<td>assertElementPresent</td>
<td>//a[text()=&quot;ZUITE-TEST-LINK-ORGANISATION-001&quot;]</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>click</td>
<td>//a[text()=&quot;ZUITE-TEST-LINK-ORGANISATION-001&quot;]</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="3">&lt;tal:block metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded&quot;&gt; &lt;/tal:block&gt;</td>
</tr>
<tr>
<td colspan="3">&lt;tal:block metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/save&quot;&gt; &lt;tal:block metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded&quot;&gt; &lt;/tal:block&gt; &lt;/tal:block&gt;</td>
</tr>
</tbody>
</table>
</test></section>
<section class="screenshot">
<h1>Check the relation (1)</h1>
<img alt="Check relation: Click on the 'plane'" src="http://img.erp5.cn/user-Howto.Link.People.To.Existing.Organisations.Check.Relation.1.Click.Plane?format=png" title="Check relation: Click on the 'plane'" type="image/svg+xml" />
<details open="open">
<p>Now that the relation is set, we will check that the operation worked correctly. To do this, go to the appropriate organisation&#39;s page, and make sure that the person is related to it.</p>
<p>To go to the organisation&#39;s page, you can either use one of the methods you learned in the previous tutorials (eg, browse the base data in the ERP5 home page, or use the &ldquo;ERP5 Modules&rdquo; item list on top of the page), or use this new method - the &quot;plane&quot;</p>
<p>In our example, now that we have set the relation between John Doe and Z Company, on John Doe&#39;s page, we can click on the &ldquo;plane&rdquo; icon next to his organisation Z Company, which opens the view page of Z Company.</p>
</details>
<test>
<table class="test" style="display: none;">
<tbody>
<tr>
<td>assertValue</td>
<td>//input[@name=&quot;field_my_career_subordination_title&quot;]</td>
<td>ZUITE-TEST-LINK-ORGANISATION-001</td>
</tr>
<tr>
<td>click</td>
<td>//div[@class=&quot;relation-input ui-input-text&quot;]/a</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="3">&lt;tal:block metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded&quot;&gt; &lt;/tal:block&gt;</td>
</tr>
<tr>
<td>assertValue</td>
<td>//input[@name=&quot;field_my_title&quot;]</td>
<td>ZUITE-TEST-LINK-ORGANISATION-001</td>
</tr>
</tbody>
</table>
</test></section>
<section class="screenshot">
<h1>Check the relation (2)</h1>
<img alt="Check relation: Check the person's line" src="http://img.erp5.cn/Howto.Link.People.To.Existing.Organisations.Check.Relation.2.Check.Person.Line?format=png" title="Check relation: Check the person's line" type="image/svg+xml" />
<details open="open">
<p><strong>2. Check on the linked person&#39;s information line.</strong></p>
<p>Check on the bottom of the organisation&#39;s page you have just reached and then click on the line of the appropriate person who has been linked to it. In our example, on the bottom of the page of Z Company, we can see the line &ldquo;John Doe&rdquo;with his basic information. This line confirms that John Doe has been linked to his company Z Company, as a Marketing Manager.</p>
</details>
<test>
<table class="test" style="display: none;">
<tbody>
<tr style="opacity: 1; z-index: 0;">
<td>storeLocation</td>
<td>organisation</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="3">&lt;span metal:use-macro=&quot;container/Zuite_viewTestMacroLibrary/macros/wait_for_activities&quot;&gt; Wait for activities &lt;/span&gt;</td>
</tr>
<tr>
<td>open</td>
<td>${organisation}</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="3">&lt;tal:block metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded&quot;&gt; &lt;/tal:block&gt;</td>
</tr>
<tr>
<td colspan="3">&lt;tal:block metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded&quot; /&gt;</td>
</tr>
<tr>
<td>click</td>
<td>//a[text()=&quot;ZUITE-TEST-LINK&quot;]</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="3">&lt;tal:block metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded&quot;&gt; &lt;/tal:block&gt;</td>
</tr>
<tr style="opacity: 1; z-index: 0;">
<td>assertValue</td>
<td>//input[@name=&quot;field_my_first_name&quot;]</td>
<td>ZUITE-TEST-LINK</td>
</tr>
</tbody>
</table>
</test></section>
<section class="screenshot">
<h1>Linking to a new organisation</h1>
<img alt="Link people to new organization Y Company" src="http://img.erp5.cn/user-Howto.Link.People.To.New.Organisation?format=png" title="Link people to new organization Y Company" type="image/svg+xml" />
<p>Already created in ERP5: <span style="color: red;">No</span></p>
<details open="open">
<p>ERP5 allows you to create a new organisation directly from a person&#39;s View page, in this way you can link a person to the organisation directly.</p>
<p>Now let&#39;s see a new example: Lei XU is working for the Y Company. First, create the person, just like you learned to create a new person in the tutorial &quot;How to create Persons&quot;. Now let&#39;s see how can we link him directly to the new company.</p>
</details>
<test>
<table class="test" style="display: none;">
<tbody>
</tbody>
</table>
</test></section>
<section class="screenshot">
<h1>Go to the person&#39;s page</h1>
<img alt="Set relation: go to person's page" src="http://img.erp5.cn/user-Howto.Link.People.To.New.Organisations.Go.To.Persons.Page?format=png" title="Set relation: go to person's page" type="image/svg+xml" />
<details open="open">
<p>First you need to search the person you want to link to the organisation, using the Biew page.</p>
</details>
<test>
<table class="test" style="display: none;">
<tbody>
</tbody>
</table>
</test></section>
<section class="screenshot">
<h1>Type the organisation&#39;s name</h1>
<img alt="Set relation: type new organisation's name and save" src="http://img.erp5.cn/user-Howto.Link.People.To.New.Organisations.Type.Organisations.Name.And.Save?format=png" title="Set relation: type new organisation's name and save" type="image/svg+xml" />
<details open="open">
<p>Once Lei XU is created, just type the name of his/her organisation in the &ldquo;organisation&rdquo; field. When you are ready, click the save button on the right of the screen.</p>
</details>
<test>
<table class="test" style="display: none;">
<tbody>
</tbody>
</table>
</test></section>
<section class="screenshot">
<h1>Add organisation</h1>
<img alt="Set relation: add new organisation" src="http://img.erp5.cn/user-Howto.Link.People.To.New.Organisations.Add.Organisations?format=png" title="Set relation: add new organisation" type="image/svg+xml" />
<details open="open">
<p>ERP5 will alert you that the organisation that you try to link your person to does not exist, but offers you to create it. If you accept, the related organisation will be created, and the person will be directly linked to it.<br />
To do this, first browse the item menu circled in red, then click on &ldquo;add organisation&rdquo;. This will create the organisation and save the operation automatically.</p>
<p>You can now check that everything worked fine by going to the related organisation&#39;s page. To do this, you can use one of the methods you learned in the first tutorials, or simply click on the &quot;plane&quot; icon next to the &quot;organisation&rdquo; field. This will lead you to the related organisation&#39;s page (as described in the first part of this tutorial).</p>
</details>
<test>
<table class="test" style="display: none;">
<tbody>
<tr style="opacity: 1;">
<td colspan="3">&lt;span metal:use-macro=&quot;container/Zuite_viewTestMacroLibrary/macros/login_as_manager&quot;&gt;Login As Manager&lt;/span&gt;</td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/Zuite_tearDownPersonAndOrganisationLinkingTest</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Clean Ok</td>
<td>&nbsp;</td>
</tr>
<tr style="opacity: 1;">
<td colspan="3">&lt;span metal:use-macro=&quot;container/Zuite_viewTestMacroLibrary/macros/wait_for_activities&quot;&gt; Wait for activities &lt;/span&gt;</td>
</tr>
</tbody>
</table>
</test></section>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment