conv_bal
watcha.h@almacom.co.th 2015-03-11 21:32:16 +07:00
parent 1b452435d7
commit c2a1e047f4
1 changed files with 5 additions and 2 deletions

View File

@ -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()