Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Rushabh Mehta
2012-12-25 15:09:58 +05:30
38 changed files with 470 additions and 431 deletions

View File

@@ -239,13 +239,13 @@ class DocType:
def add_roles(self, pr):
roles_list = ['Accounts Manager', 'Accounts User', 'Blogger', 'HR Manager', 'HR User', 'Maintenance User', 'Maintenance Manager', 'Material Manager', 'Material User', 'Material Master Manager', 'Manufacturing Manager', 'Manufacturing User', 'Projects User', 'Purchase Manager', 'Purchase User', 'Purchase Master Manager', 'Quality Manager', 'Sales Manager', 'Sales User', 'Sales Master Manager', 'Support Manager', 'Support Team', 'System Manager', 'Website Manager']
for r in roles_list:
d = addchild(pr, 'userroles', 'UserRole', 1)
d = addchild(pr, 'userroles', 'UserRole')
d.role = r
d.save(1)
# Add roles to Administrator profile
pr = Document('Profile','Administrator')
for r in roles_list:
d = addchild(pr,'userroles', 'UserRole', 1)
d = addchild(pr,'userroles', 'UserRole')
d.role = r
d.save(1)