How to create new User
How to create new User by OSOE Project.
This tutorial teaches how to create new users in ERP5. The difference between
Person and User is that a Person in ERP5 holds information related to an
individual which is relevant to your organisation (for example a prospect,
client supplier or employee) while a User has access to your ERP5 instance. The
permissions, a user has in ERP5 are defined by assignments.
During this tutorial, you will create two Users:
• Cédric de Saint Martin: Information Systems Manager of your company and
• Yingjie XU: Support Agent of your company.
During this tutorial please replace "VIFIB" with your company name.
openAndWait ${base_url}/Zuite_setUpPersonTest
verifyTextPresent Init Ok
Agenda
• Create a Person
• Start the Assignment
• Create a new User Account
• New User log in
• Created Second User
The process of creating a new User has three steps: Firstly, create and
validate a Person who is the future User of your ERP5 instance. Secondly, add
Assignment to this new User by using the Action item list. Finally, create User
Account for this Person by using the Action item list. Then this new User can
access to your ERP5 instance using the login and password you have set during
the creation.
Create a Person
Create a Person
After reading the tutorial "How to create Persons", you can now try to create a
new Person account for a staff of your company. In our case, we create an
account for a VIFIB manager Cédric de Saint Martin, as shown in the screenshot.
To be able to choose a password, it is critical to enter the Email address,
because a link to choose the password will be sent by email.
waitForElementPresent //button[text()="Person"]
click //input[@name="editable"]
click //button[text()="Person"]
Validate the Person
Validate the Person
Validate the Person you just created before going to next step.
waitForElementPresent //input[@name="field_my_first_name"]
type //input[@name="field_my_first_name"] John
type //input[@name="field_my_last_name"] Doh
type //input[@name="field_my_career_subordination_title"] Z Company
fireEvent //input[@name="field_my_career_subordination_title"] input
waitForElementPresent //ul[@class="search_ul"]//li
click //ul[@class="search_ul"]/li[@name="Organisation"]
select //select[@name="field_my_gender"] Male
select //select[@name= Client
"subfield_field_my_career_role_list_default:list"]
select //select[@name="field_my_career_function"] Marketing/
Marketing Manager
select //select[@name="field_my_career_activity"] Education
select //select[@name="field_my_nationality"] French
type //input[@name="field_my_default_email_coordinate_text"] jdoh@zcompany.com
type //input[@name= +33(0)6-218765/00
"field_default_telephone_my_default_telephone_coordinate_text"]
Action: Add Assignment
Action: Add Assignment 1
Action: Add Assignment 2
Without the assignment, even you has added a user account to the person
document, the person still won't be able to access your ERP5 instance. To check
current Assignments of this person, click on "Assignment" on the sidebar; to
start a new Assignment, click "+Add", choose "Assignment" in the Document Type
List, then click "Create Document".
waitForElementPresent //a[contains(text(), "Add")]
click //a[contains(text(), "Add")]
waitForElementPresent //select[@name="field_your_select_action"]
select //select[@name="field_your_select_action"] Assignment
Edit Assignment
Edit Assignment
Now you are located in the Assignment document. Fill in the fields and save the
data.
Note: there two important fields to fill up. First, you must select the Group
for the Assignment, and the Group must be your company, otherwise the User
won't be able to access your ERP5 instance . Second, fill carefully the
Assignment Start Date and Stop Date. The Assignment is only valid in the
defined interval , which means the User can only login your ERP5 instance in
the defined interval.
waitForElementPresent //input[@name="field_my_title"]
type //input[@name="field_my_title"] SlapOS Community
Manager
type //input[@name= 2021-01-14
"field_my_start_date"]
type //input[@name= 2021-12-22
"field_my_stop_date"]
Action: Start Assignment
Action: Start Assignment 1
Action: Start Assignment 2
After adding an Assignment to the new User, you have to start the Assignment,
if not, the User account will not work. Click on "Start Assignment" on the
sidebar.
waitForElementPresent //p[@id=
"field_my_translated_validation_state_title"]
verifyText //p[@id= Started
"field_my_translated_validation_state_title"]
Assignment "Started"
Assignment "Started"
After the status changed to "Started", you can continue next step: Create User.
Action: Add ERP5 Login
To be able to log in the application, the user will need a login document, that
can be either defined in ERP5 as an "ERP5 Login" document or externally, for
example if using Google or Facebook, you would use "Google Login" or "Facebook
Login" documents here.
Edit Login
Enter the login and save. The password will be defined later.
Validate Login
To be able to use this login, it needs to be validated. Click on "Start
Assignment" on the sidebar.
Use "I forgot my password" to choose a password
From the login page, use "I forgot my password" and enter the user login. This
will send an email to the email address registered on the person.
Choose a password
Click on the link received by email and choose the new password.
New User Login
New User Login
Try to log in your ERP5 instance with the new User Login and Password.
Note: It is important to remember the three steps must be performed correctly.
Don't forget to Validate the login you created and to Start Assignment .
Otherwise it won't be possible to connect to ERP5 using the user created.
Create Second User
• First Name: Yingjie
• Last Name: XU
• Organisation: VIFIB
• Gender: Male
• Role: Internal
• Function: Company / Agent
• User Name: yingjie.xu
Now that your learned how to create a user, please create a second user
"Yingjie Xu". This user will be required to do the following tutorials. Make
sure that you create the Person, the Assignment, start the Assignment and
create the user account just like you did it for Cédric but using the
information presented in this slide.