xxx
parent
1b452435d7
commit
c2a1e047f4
|
@ -40,12 +40,15 @@ class Department(Model):
|
|||
return
|
||||
except_perms=['Clinic Menu Settings','Clinic Staff Tab Accounting']
|
||||
other_perms=[]
|
||||
for otp in get_model('permission').search(['name','ilike','clinic'],['name']):
|
||||
for otp in get_model('permission').search_read(['name','ilike','clinic'],['name']):
|
||||
name=otp['name']
|
||||
if name in except_perms:
|
||||
continue
|
||||
other_perms.append(otp['id'])
|
||||
for model in get_model('model').search_read([['name','ilike','clinic']],['name']):
|
||||
pass
|
||||
get_model('profile').create({
|
||||
'perms': perms,
|
||||
'code': code,
|
||||
'name': code,
|
||||
'other_perms': [('set',other_perms)],
|
||||
|
@ -61,7 +64,7 @@ class Department(Model):
|
|||
'active_id': obj.id,
|
||||
'mode': 'form',
|
||||
},
|
||||
'flash': 'Department % s is shared sucessfully'%obj.name,
|
||||
'flash': 'Department %s is shared sucessfully'%obj.code,
|
||||
}
|
||||
|
||||
Department.register()
|
||||
|
|
Loading…
Reference in New Issue