update employee and user records
This commit is contained in:
parent
99c064305f
commit
fa7c8a9f8b
@ -2,71 +2,91 @@
|
||||
{
|
||||
"date_of_birth": "1982-01-03",
|
||||
"date_of_joining": "2001-10-10",
|
||||
"employee_name": "Dikman Shervashidze Shervashidze",
|
||||
"employee_name": "Diana Prince",
|
||||
"first_name": "Diana",
|
||||
"last_name": "Prince",
|
||||
"gender": "Female",
|
||||
"user_id": "DikmanShervashidze@example.com"
|
||||
"user_id": "DianaPrince@example.com"
|
||||
},
|
||||
{
|
||||
"date_of_birth": "1959-02-03",
|
||||
"date_of_joining": "1976-09-16",
|
||||
"employee_name": "Zukutakitoteka",
|
||||
"employee_name": "Zatanna Zatara",
|
||||
"gender": "Female",
|
||||
"user_id": "Zukutakitoteka@example.com"
|
||||
"user_id": "ZatannaZatara@example.com",
|
||||
"first_name": "Zatanna",
|
||||
"last_name": "Zatara"
|
||||
},
|
||||
{
|
||||
"date_of_birth": "1982-03-03",
|
||||
"date_of_joining": "2000-06-16",
|
||||
"employee_name": "Hatsue Kashiwagi",
|
||||
"employee_name": "Holly Granger",
|
||||
"gender": "Female",
|
||||
"user_id": "HatsueKashiwagi@example.com"
|
||||
"user_id": "HollyGranger@example.com",
|
||||
"first_name": "Holly",
|
||||
"last_name": "Granger"
|
||||
},
|
||||
{
|
||||
"date_of_birth": "1945-04-04",
|
||||
"date_of_joining": "1969-07-01",
|
||||
"employee_name": "Nuran Verkleij",
|
||||
"employee_name": "Neptunia Aquaria",
|
||||
"gender": "Female",
|
||||
"user_id": "NuranVerkleij@example.com"
|
||||
"user_id": "NeptuniaAquaria@example.com",
|
||||
"first_name": "Neptunia",
|
||||
"last_name": "Aquaria"
|
||||
},
|
||||
{
|
||||
"date_of_birth": "1978-05-03",
|
||||
"date_of_joining": "1999-12-24",
|
||||
"employee_name": "\u0414\u043c\u0438\u0442\u0440\u0438\u0439 \u041f\u0438\u0440\u043e\u0433\u043e\u0432",
|
||||
"employee_name": "Arthur Curry",
|
||||
"gender": "Male",
|
||||
"user_id": "aromn@example.com"
|
||||
"user_id": "ArthurCurry@example.com",
|
||||
"first_name": "Arthur",
|
||||
"last_name": "Curry"
|
||||
},
|
||||
{
|
||||
"date_of_birth": "1964-06-03",
|
||||
"date_of_joining": "1981-08-05",
|
||||
"employee_name": "Tilde Lindqvist",
|
||||
"employee_name": "Thalia Al Ghul",
|
||||
"gender": "Female",
|
||||
"user_id": "TildeLindqvist@example.com"
|
||||
"user_id": "ThaliaAlGhul@example.com",
|
||||
"first_name": "Thalia",
|
||||
"last_name": "Al Ghul"
|
||||
},
|
||||
{
|
||||
"date_of_birth": "1982-07-03",
|
||||
"date_of_joining": "2006-06-10",
|
||||
"employee_name": "Micha\u0142 Sobczak",
|
||||
"employee_name": "Maxwell Lord",
|
||||
"gender": "Male",
|
||||
"user_id": "MichalSobczak@example.com"
|
||||
"user_id": "MaxwellLord@example.com",
|
||||
"first_name": "Maxwell",
|
||||
"last_name": "Lord"
|
||||
},
|
||||
{
|
||||
"date_of_birth": "1969-08-03",
|
||||
"date_of_joining": "1993-10-21",
|
||||
"employee_name": "Gabrielle Loftus",
|
||||
"employee_name": "Grace Choi",
|
||||
"gender": "Female",
|
||||
"user_id": "GabrielleLoftus@example.com"
|
||||
"user_id": "GraceChoi@example.com",
|
||||
"first_name": "Grace",
|
||||
"last_name": "Choi"
|
||||
},
|
||||
{
|
||||
"date_of_birth": "1982-09-03",
|
||||
"date_of_joining": "2005-09-06",
|
||||
"employee_name": "Vakhita Ryzaev",
|
||||
"employee_name": "Vandal Savage",
|
||||
"gender": "Male",
|
||||
"user_id": "VakhitaRyzaev@example.com"
|
||||
"user_id": "VandalSavage@example.com",
|
||||
"first_name": "Vandal",
|
||||
"last_name": "Savage"
|
||||
},
|
||||
{
|
||||
"date_of_birth": "1985-10-03",
|
||||
"date_of_joining": "2007-12-25",
|
||||
"employee_name": "Charmaine Gaudreau",
|
||||
"employee_name": "Caitlin Snow",
|
||||
"gender": "Female",
|
||||
"user_id": "CharmaineGaudreau@example.com"
|
||||
"user_id": "CaitlinSnow@example.com",
|
||||
"first_name": "Caitlin",
|
||||
"last_name": "Snow"
|
||||
}
|
||||
]
|
@ -5,104 +5,104 @@
|
||||
"last_name": "User"
|
||||
},
|
||||
{
|
||||
"email": "DikmanShervashidze@example.com",
|
||||
"first_name": "Dikman",
|
||||
"last_name": "Shervashidze"
|
||||
"email": "DianaPrince@example.com",
|
||||
"first_name": "Diana",
|
||||
"last_name": "Prince"
|
||||
},
|
||||
{
|
||||
"email": "Zukutakitoteka@example.com",
|
||||
"first_name": "Zukutakitoteka",
|
||||
"last_name": null
|
||||
"email": "ZatannaZatara@example.com",
|
||||
"first_name": "Zatanna",
|
||||
"last_name": "Zatara"
|
||||
},
|
||||
{
|
||||
"email": "HatsueKashiwagi@example.com",
|
||||
"first_name": "Hatsue",
|
||||
"last_name": "Kashiwagi"
|
||||
"email": "HollyGranger@example.com",
|
||||
"first_name": "Holly",
|
||||
"last_name": "Granger"
|
||||
},
|
||||
{
|
||||
"email": "NuranVerkleij@example.com",
|
||||
"first_name": "Nuran",
|
||||
"last_name": "Verkleij"
|
||||
"email": "NeptuniaAquaria@example.com",
|
||||
"first_name": "Neptunia",
|
||||
"last_name": "Aquaria"
|
||||
},
|
||||
{
|
||||
"email": "aromn@example.com",
|
||||
"first_name": "Arom",
|
||||
"last_name": "Nolan"
|
||||
"email": "ArthurCurry@example.com",
|
||||
"first_name": "Arthur",
|
||||
"last_name": "Curry"
|
||||
},
|
||||
{
|
||||
"email": "TildeLindqvist@example.com",
|
||||
"first_name": "Tilde",
|
||||
"last_name": "Lindqvist"
|
||||
"email": "ThaliaAlGhul@example.com",
|
||||
"first_name": "Thalia",
|
||||
"last_name": "Al Ghul"
|
||||
},
|
||||
{
|
||||
"email": "MichalSobczak@example.com",
|
||||
"first_name": "Micha\u0142",
|
||||
"last_name": "Sobczak"
|
||||
"email": "MaxwellLord@example.com",
|
||||
"first_name": "Maxwell",
|
||||
"last_name": "Lord"
|
||||
},
|
||||
{
|
||||
"email": "GabrielleLoftus@example.com",
|
||||
"first_name": "Gabrielle",
|
||||
"last_name": "Loftus"
|
||||
"email": "GraceChoi@example.com",
|
||||
"first_name": "Grace",
|
||||
"last_name": "Choi"
|
||||
},
|
||||
{
|
||||
"email": "VakhitaRyzaev@example.com",
|
||||
"first_name": "Vakhita",
|
||||
"last_name": "Ryzaev"
|
||||
"email": "VandalSavage@example.com",
|
||||
"first_name": "Vandal",
|
||||
"last_name": "Savage"
|
||||
},
|
||||
{
|
||||
"email": "CharmaineGaudreau@example.com",
|
||||
"first_name": "Charmaine",
|
||||
"last_name": "Gaudreau"
|
||||
"email": "CaitlinSnow@example.com",
|
||||
"first_name": "Caitlin",
|
||||
"last_name": "Snow"
|
||||
},
|
||||
{
|
||||
"email": "RafaelaMaartens@example.com",
|
||||
"first_name": "Rafa\u00ebla",
|
||||
"last_name": "Maartens"
|
||||
"email": "RipHunter@example.com",
|
||||
"first_name": "Rip",
|
||||
"last_name": "Hunter"
|
||||
},
|
||||
{
|
||||
"email": "NuguseYohannes@example.com",
|
||||
"first_name": "Nuguse",
|
||||
"last_name": "Yohannes"
|
||||
"email": "NicholasFury@example.com",
|
||||
"first_name": "Nicholas",
|
||||
"last_name": "Fury"
|
||||
},
|
||||
{
|
||||
"email": "panca@example.com",
|
||||
"first_name": "\u0420\u0430\u0438\u0441\u0430",
|
||||
"last_name": "\u0411\u0435\u043b\u044f\u043a\u043e\u0432\u0430"
|
||||
"email": "PeterParker@example.com",
|
||||
"first_name": "Peter",
|
||||
"last_name": "Parker"
|
||||
},
|
||||
{
|
||||
"email": "CaYinLong@example.com",
|
||||
"first_name": "\u80e4\u9686",
|
||||
"last_name": "\u8521"
|
||||
"email": "JohnConstantine@example.com",
|
||||
"first_name": "John",
|
||||
"last_name": "Constantine"
|
||||
},
|
||||
{
|
||||
"email": "FreddieScott@example.com",
|
||||
"first_name": "Freddie",
|
||||
"last_name": "Scott"
|
||||
"email": "HalJordan@example.com",
|
||||
"first_name": "Hal",
|
||||
"last_name": "Jordan"
|
||||
},
|
||||
{
|
||||
"email": "BergoraVigfusdottir@example.com",
|
||||
"first_name": "Berg\u00fe\u00f3ra",
|
||||
"last_name": "Vigf\u00fasd\u00f3ttir"
|
||||
"email": "VictorStone@example.com",
|
||||
"first_name": "Victor",
|
||||
"last_name": "Stone"
|
||||
},
|
||||
{
|
||||
"email": "WardNajmalDinKalb@example.com",
|
||||
"first_name": "Ward",
|
||||
"last_name": "Kalb"
|
||||
"email": "BruceWayne@example.com",
|
||||
"first_name": "Bruce",
|
||||
"last_name": "Wayne"
|
||||
},
|
||||
{
|
||||
"email": "WanMai@example.com",
|
||||
"first_name": "Wan",
|
||||
"last_name": "Mai"
|
||||
"email": "ClarkKent@example.com",
|
||||
"first_name": "Clark",
|
||||
"last_name": "Kent"
|
||||
},
|
||||
{
|
||||
"email": "LeonAbdulov@example.com",
|
||||
"first_name": "Leon",
|
||||
"last_name": "Abdulov"
|
||||
"email": "BarryAllen@example.com",
|
||||
"first_name": "Barry",
|
||||
"last_name": "Allen"
|
||||
},
|
||||
{
|
||||
"email": "SabinaNovotna@example.com",
|
||||
"first_name": "Sabina",
|
||||
"last_name": "Novotn\u00e1"
|
||||
"email": "KaraZorEl@example.com",
|
||||
"first_name": "Kara",
|
||||
"last_name": "Zor El"
|
||||
},
|
||||
{
|
||||
"email": "demo@erpnext.com",
|
||||
|
@ -14,7 +14,7 @@ def setup(domain):
|
||||
setup_fiscal_year()
|
||||
setup_holiday_list()
|
||||
setup_user()
|
||||
#setup_employee()
|
||||
setup_employee()
|
||||
setup_user_roles()
|
||||
setup_role_permissions()
|
||||
|
||||
@ -184,52 +184,52 @@ def setup_user_roles():
|
||||
'Nursing User', 'Patient')
|
||||
|
||||
if not frappe.db.get_global('demo_hr_user'):
|
||||
user = frappe.get_doc('User', 'CharmaineGaudreau@example.com')
|
||||
user = frappe.get_doc('User', 'CaitlinSnow@example.com')
|
||||
user.add_roles('HR User', 'HR Manager', 'Accounts User')
|
||||
frappe.db.set_global('demo_hr_user', user.name)
|
||||
|
||||
if not frappe.db.get_global('demo_sales_user_1'):
|
||||
user = frappe.get_doc('User', 'VakhitaRyzaev@example.com')
|
||||
user = frappe.get_doc('User', 'VandalSavage@example.com')
|
||||
user.add_roles('Sales User')
|
||||
frappe.db.set_global('demo_sales_user_1', user.name)
|
||||
|
||||
if not frappe.db.get_global('demo_sales_user_2'):
|
||||
user = frappe.get_doc('User', 'GabrielleLoftus@example.com')
|
||||
user = frappe.get_doc('User', 'GraceChoi@example.com')
|
||||
user.add_roles('Sales User', 'Sales Manager', 'Accounts User')
|
||||
frappe.db.set_global('demo_sales_user_2', user.name)
|
||||
|
||||
if not frappe.db.get_global('demo_purchase_user'):
|
||||
user = frappe.get_doc('User', 'MichalSobczak@example.com')
|
||||
user = frappe.get_doc('User', 'MaxwellLord@example.com')
|
||||
user.add_roles('Purchase User', 'Purchase Manager', 'Accounts User', 'Stock User')
|
||||
frappe.db.set_global('demo_purchase_user', user.name)
|
||||
|
||||
if not frappe.db.get_global('demo_manufacturing_user'):
|
||||
user = frappe.get_doc('User', 'NuranVerkleij@example.com')
|
||||
user = frappe.get_doc('User', 'NeptuniaAquaria@example.com')
|
||||
user.add_roles('Manufacturing User', 'Stock User', 'Purchase User', 'Accounts User')
|
||||
frappe.db.set_global('demo_manufacturing_user', user.name)
|
||||
|
||||
if not frappe.db.get_global('demo_stock_user'):
|
||||
user = frappe.get_doc('User', 'HatsueKashiwagi@example.com')
|
||||
user = frappe.get_doc('User', 'HollyGranger@example.com')
|
||||
user.add_roles('Manufacturing User', 'Stock User', 'Purchase User', 'Accounts User')
|
||||
frappe.db.set_global('demo_stock_user', user.name)
|
||||
|
||||
if not frappe.db.get_global('demo_accounts_user'):
|
||||
user = frappe.get_doc('User', 'LeonAbdulov@example.com')
|
||||
user = frappe.get_doc('User', 'BarryAllen@example.com')
|
||||
user.add_roles('Accounts User', 'Accounts Manager', 'Sales User', 'Purchase User')
|
||||
frappe.db.set_global('demo_accounts_user', user.name)
|
||||
|
||||
if not frappe.db.get_global('demo_projects_user'):
|
||||
user = frappe.get_doc('User', 'panca@example.com')
|
||||
user = frappe.get_doc('User', 'PeterParker@example.com')
|
||||
user.add_roles('HR User', 'Projects User')
|
||||
frappe.db.set_global('demo_projects_user', user.name)
|
||||
|
||||
if not frappe.db.get_global('demo_education_user'):
|
||||
user = frappe.get_doc('User', 'aromn@example.com')
|
||||
user = frappe.get_doc('User', 'ArthurCurry@example.com')
|
||||
user.add_roles('Academics User')
|
||||
frappe.db.set_global('demo_education_user', user.name)
|
||||
|
||||
#Add Expense Approver
|
||||
user = frappe.get_doc('User', 'WanMai@example.com')
|
||||
user = frappe.get_doc('User', 'ClarkKent@example.com')
|
||||
user.add_roles('Expense Approver')
|
||||
|
||||
def setup_leave_allocation():
|
||||
|
Loading…
x
Reference in New Issue
Block a user