This visual guide is part of a collection of documents created by the One Student One ERP (OSOE) project in collaboration with Institut Mines Telecom, Telecom Bretagne, Dresden University of Technology and the South Westfalia University of Applied Sciences. It can be used to teach modern ERP theory and practice to undergraduate students or professionals.
Copyright: You are free to copy, distribute, display, and perform the work under the following conditions: you must attribute the work in the manner specified by the author or licensor; you may not use this work for any commercial purposes including training, consulting, advertising, self-advertising, publishing, etc.; you may not alter, transform, or build upon this work. For any reuse or distribution, you must make clear to others the license terms of this work. Any of these conditions can be waived if you get permission from the copyright holder through a commercial license or an educational license. For more information, contact info@nexedi.com
Now you know how to create the related organisation of a person when he/she is created. But we can also use the organisation creation function which is independent from the person creation function, but which is quite similar to the person creation process, to create and manage organisations in ERP5.
As we have seen from the previous tutorial, in ERP5, the creation of organisation is the premise to the creation of person. Organisations are really important because people are linked to them. For example, when you sell a product or a service to a person, you indirectly sell it to his/her organisation. The organisation creation function is also very practical because of the attributes you are going to define the different organisations with: sometimes you might be looking for specific types of organisations, for instance, press agencies when you have an announcement to make. Now this is really easy with ERP5, just search for the organisations you defined as press agencies. You can also go deeper into details: you might be looking for American press agencies if the product you want to communicate about is exclusively targeting the US market, then search in ERP5 for your American press agencies...
Now, let's see how you can create and define an organisation with the help of ERP5.
<tal:block metal:use-macro="here/Zuite_viewTestMacroLibrary/macros/init_test_environment" /> | ||
openAndWait | ${base_url}/Zuite_setUpOrganisationTest | |
verifyTextPresent | Init Ok | |
<tal:block metal:use-macro="here/Zuite_viewTestMacroLibrary/macros/wait_for_activities" /> | ||
<tal:block metal:use-macro="here/Zuite_viewTestMacroLibrary/macros/login_as_functional_test_user" /> | ||
<tal:block tal:define="click_configuration python: {'text': 'Modules'}"> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" /> </tal:block> | ||
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"> </tal:block> | ||
<tal:block tal:define="click_configuration python: {'text': 'Organisations'}"> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link"> </tal:block> </tal:block> | ||
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"></tal:block> | ||
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> | ||
waitForElementPresent | //a[contains(text(), "Z Company")] | |
click | //a[contains(text(), "Z Company")] | |
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"> </tal:block> |
This tutorial continues with the example of the organisation "Z Company", which is our client.
From the ERP5 home page you have reached after login, click on “New”on the sidebar, you will see the base area on the left. The base area gathers the person, organisation and currency creation functions. To create a new organisation, you would just click on the link called "Organisations". But since we already created the Z Company when adding the Person John Doe in the tutorial "How to create Persons", we will go to the "Modules" on the sidebar instead to find our existing client "Z Company" and fill the details.
waitForElementPresent | //p[@id="field_my_title"] | |
click | //input[@name="editable"] | |
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"> </tal:block> |
Click on the "Modules" on the sidebar and then on "Organisations" to find our client Z Company.
You will find our client Z Company in the Organisation Module. Click on the line to open the organisation.
You will now be led to the details page of the Z Company page which has existed. As you can see, there are many fields to fill, which allow you to be really precise about the different organisations stored in ERP5. You just have to enter its detail information and then save it.
Summary: we had created a person named John Doh, who is the marketing manager of Z Company, one of VIFIB clients. If you remember well, the organisation Z Company had been created directly through the person creation module (cf. “How to add people” tutorial) by "Add Organisation", but had not been taken care of. Now we are going to enter some details in "view" tab about the organisation Z Company: Z Company Ltd is an international electricity supplier, which has been using the services of VIFIB for quite a long time as a client. Here is the address of the Company: 12 Zorro Street, 93210 Beverly Hills.
After you have filled the “view” tab, save the data by clicking on "Save".
But please note that the organisations can also be created through the organisation creation module from the New tab in ERP5 home page sidebar, as you have seen in the previous tutorial “How to add people”.
waitForElementPresent | //input[@name="field_my_title"] | |
type | //input[@name="field_my_title"] | Z Company |
type | //input[@name="field_my_corporate_name"] | Z Company |
select | //select[@name="subfield_field_my_role_list_default:list"] | Client |
select | //select[@name="field_my_function"] | Sales |
type | //textarea[@name="field_my_default_address_street_address"] | 12 Zorro Street |
type | //input[@name="field_my_default_address_city"] | Beverly Hills |
type | //input[@name="field_my_default_address_zip_code"] | 90210 |
select | //select[@name="field_my_default_address_region"] | Brazil |
type | //input[@name="field_my_default_email_coordinate_text"] | info@zcompany.com |
type | //input[@name="field_default_telephone_my_default_telephone_coordinate_text"] | +55(0)22 2222 2222 |
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/save"> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"> </tal:block> </tal:block> |
In "Details" tab, you can fill in the details and save the changes.
<tal:block tal:define="click_configuration python: {'text': 'Details'}"> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link"> </tal:block> </tal:block> | ||
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"> </tal:block> |
Similar to creating people, there are some tabs that will automatically be updated by ERP5, such as “Transactions”, “Financial informations” and “Documents”. The application will update those tabs whenever necessary, for example, to trace a transaction that occurred between VIFIB and the client Z Company.
When you have entered all information of the created company and saved it, it is time to validate the organisation, which works exactly the same way as person's validation.
Click on the “Actions”.
Click on the“Validate”.
<tal:block tal:define="click_configuration python: {'text': 'Validate'}"> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link"> </tal:block> </tal:block> | ||
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"> </tal:block> | ||
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog"> </tal:block> | ||
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"> </tal:block> |
Check the update status.
When everything has been done correctly (i.e. you have entered the data, saved and validated the organisation you created), it is time to check that Z Company appears in the organisation list of ERP5. Once again, this works the same way as for creating a person.
<tal:block tal:define="click_configuration python: {'text': 'View'}"> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link"> </tal:block> </tal:block> | ||
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"> </tal:block> | ||
verifyText | //p[@id="field_my_translated_validation_state_title"] | Validated |
To check the new organisation, you will have to navigate to the list of existing organisations.
Click on the “Modules”on the sidebar and click on “organisations”, this will lead you to the organisations' list.
<tal:block tal:define="click_configuration python: {'text': 'Modules'}"> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link"> </tal:block> </tal:block> | ||
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"> </tal:block> |
The final step is to check that Z Company is on the list. We can see that the creation was successful because Z Company has been added to the list. If you want to see or modify the details of any organisation, just click on its line to open its dedicated page.
<tal:block tal:define="click_configuration python: {'text': 'Organisations'}"> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link"> </tal:block> </tal:block> | ||
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"> </tal:block> | ||
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded"> </tal:block> | ||
waitForElementPresent | //a[contains(text(), "Z Company")] |
You can use the "Modules" tab in the home page sidebar to check the “Currencies”, “Organisations” and“Persons”stored in your ERP5 database. Just click on the related name under the “Base”module.
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_manager">Login As Manager</span> | ||
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities </span> | ||
openAndWait | ${base_url}/Zuite_tearDownOrganisationTest | |
verifyTextPresent | Clean Ok |
For more information, please contact Jean-Paul, CEO of Rapid.Space (+33 629 02 44 25).