I need to assign the groups to user through programatically rather than directly selecting the groups from Access Rights screen.
I have created a field called "user_roles" which will give the list of roles such as [Sales, Purchase,so on..].
based on these roles i need to assign groups to user, and to clear other standard groups assigned to user.